相关分类: Java技术 C/C++ VB delphi
  • 图论水题但是没想到

    图论水题但是没想到 Note that this is the first problem of the two similar problems. You can hack this problem only if you solve both problems. You are given a tree with n nnodes. In the beginning, 0 0is written on all edges. In one operation, you ca...

    2019-08-16 07:56:38

  • 洛谷 P2947 [USACO09MAR]向右看齐Look Up

    洛谷 P2947 [USACO09MAR]向右看齐Look Up 目录 题目 思路 $Code$ 题目 戳 思路 单调栈裸题 $Code$ #includestack#includecstdio#includestring#includecstring#includeiostream#define MAXN 100001#define rr registerusing namespace std;int n,ans[MAXN];struct mu{...

    2019-08-16 07:56:36

  • EffectiveC++

    EffectiveC++ 宁可以编译器替换预处理器 define 不被视为语言的一部分,因此也就有可能在预处理阶段被优化掉,导致相关变量出现错误。 #define ASPECT_RATIO 1.63//可以尝试将其替换为const double AspectRatio=1.63 这里注意一下大写名称常用于宏,因此,转写时候将相...

    2019-08-16 07:56:23

  • 洛谷 P1901 发射站

    洛谷 P1901 发射站 目录 题目 思路 $Code$ 题目 戳 思路 利用单调栈求出比他高的发射站中离它最近的哪一个,在暴力加一下,求出最终答案。 $Code$ #includebits/stdc++.h#define max_(a,b) ab?a:b;#define MAXN 1000001#define rr registerusing namespace std;int n,m...

    2019-08-16 07:56:31

  • DP_Sumsets

    DP_Sumsets Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbers that are an integer power of 2. Here are the possible sets of numbers that sum to 7: 1) 1+1+1+1+1+1+1 2) 1+1+1+1+...

    2019-08-16 07:56:28

  • CF 803D Magazine Ad 题解

    CF 803D Magazine Ad 题解 题面 正解:一道二分大水题! A:为什么我得不到满分? B : 评测的系统不一样啊! A : 蛤? 正常情况下我们日常练习均使用的是windows系统,在windows下,string 本身是可以存储'\0'字符,'\0'字符只是char 数组的结束符。如果是一个字符一个...

    2019-08-16 07:56:24

  • ffmpeg AVPacket结构体及其相关函数

    ffmpeg AVPacket结构体及其相关函数 0. 简介 AVPacket结构体并不是很复杂, 但是在ffmpeg中用的非常多. 与其相关的函数也是比较多. AVPacket保存了解复用之后, 解码之前的数据, 和这些数据相关的一些附加信息. 对于视频来说, AVPacket通常包含一个压缩的frame; 而音频可...

    2019-08-16 07:56:18

  • The Xor-longest Path(trie树)

    The Xor-longest Path(trie树) 题目: #10056. 「一本通 2.3 练习 5」The XOR-longest Path 解析: 做完#10051后就不是很难了 继续利用异或的性质有 \(dis(u,v) = dis(1,u)\oplus dis(1,v)\) 把边权放到点上,然后字典树求最大异或值 代码 #include bits/stdc++.husing...

    2019-08-16 07:56:14

  • CentOS7安装高版本gcc

    CentOS7安装高版本gcc CentOS7安装高版本gcc 下载 从hust镜像站下载gcc源码包。 http://mirror.hust.edu.cn/gnu/gcc/ 我选择的是gcc-8.3.0.tar.gz。 cd mkdir softwarecd softwarewget http://mirror.hust.edu.cn/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.gztar zxvf gcc-8.3....

    2019-08-16 07:56:16

  • JZOJ.1153【贪心算法】硬币交换

    JZOJ.1153【贪心算法】硬币交换 好难啊!!! 可聪明的我还是解出来了!(逃 题目描述 小z最近迷上了一款游戏――To Be A Farmer,他在游戏中控制的人物是一个叫FZ的Farmer。FZ身上有G1个金币、S1个银币和B1个铜币,而他至少需要G2个金币、S2个银币和B2个铜币。为了完...

    2019-08-16 07:56:06

2