Number Description Input Output Sample Input 12345 5 Sample Output 24 HINT Solution 我们运用状压DP,令 f[j][opt] 表示当前余数为 j,状态为opt的方案。 状态记录的是:各个数字被用了几次。 那么我们就可 ...
分类:
其他好文 时间:
2017-09-16 22:04:37
阅读次数:
130
3211: 花神游历各国 Description Input Output 每次x=1时,每行一个整数,表示这次旅行的开心度 每次x=1时,每行一个整数,表示这次旅行的开心度 Sample Input 4 1 100 5 5 5 1 1 2 2 1 2 1 1 2 2 2 3 1 1 4 Sampl ...
分类:
其他好文 时间:
2017-09-13 01:38:02
阅读次数:
141
Chapter 17 Input,Output,and Files ## An Overview of C++ Input and Output# # Streams and Buffers An input stream needs two connections, one at end. The ...
分类:
其他好文 时间:
2017-09-12 20:53:04
阅读次数:
190
D. Choosing Capital for Treeland time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output D. Choo ...
Given an unsorted array of integers, find the length of longest continuous increasing subsequence.Example 1:Input: [1,3,5,4,7] Output: 3 Explanation: ... ...
分类:
其他好文 时间:
2017-09-10 18:45:50
阅读次数:
382
Walk Description Input Output Sample Input 3 1 2 3 1 3 9 Sample Output 9 3 0 HINT Solution 其实吧,就是每次枚举一个d,重新构图,把权值是 d 的倍数的边加入。然后Dfs暴力求一遍直径L,显然 [1, L] 都 ...
分类:
其他好文 时间:
2017-09-09 21:41:12
阅读次数:
157
3236: [Ahoi2013]作业 Description Input Output Sample Input 3 4 1 2 2 1 2 1 3 1 2 1 1 1 3 1 3 2 3 2 3 Sample Output 2 2 1 1 3 2 2 1 HINT N=100000,M=10000 ...
分类:
其他好文 时间:
2017-09-08 22:49:04
阅读次数:
246
Description Input Output ...
分类:
其他好文 时间:
2017-09-06 12:55:19
阅读次数:
125
1911: [Apio2010]特别行动队 Description Input Output Sample Input 4 -1 10 -20 2 2 3 4 Sample Output 9 HINT 斜率优化的式子搞出来之后,a是负的,所以要么不除过去,要么除过去变号 #include<cstdi ...
uniq是去重,不相邻的行不算重复值。 uniq [OPTION]... [INPUT [OUTPUT]] 选项说明: -c:统计出现的次数(count)。 -d:只显示被计算为重复的行。 -D:显示所有被计算为重复的行。 -u:显示唯一值,即没有重复值的行。 -i:忽略大小写。 -z:在末尾使用\ ...
分类:
其他好文 时间:
2017-09-05 13:30:27
阅读次数:
135