#include#includeint HARSH[1066];int main(){ memset(HARSH,0,sizeof(HARSH)); int n,m; scanf("%d%d",&n,&m); for(int i=0 ; i0) { if(i==m-i && ...
分类:
其他好文 时间:
2015-03-04 00:58:14
阅读次数:
147
#include#includeusing namespace std;int arr1[1000066];int arr2[1000066];int main(){ int n1,n2; scanf("%d",&n1); for(int i=0 ; i<n1 ; ++i) { sca...
分类:
其他好文 时间:
2015-03-04 00:54:16
阅读次数:
140
With highways available, driving a car from Hangzhou to any other city is easy. But since the tank capacity of a car is limited, we have to find gas stations on the way from time to time. Different ga...
分类:
其他好文 时间:
2015-03-03 22:14:52
阅读次数:
212
To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For example,...
分类:
其他好文 时间:
2015-03-03 18:41:39
阅读次数:
140
Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The...
分类:
其他好文 时间:
2015-03-03 18:41:32
阅读次数:
144
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 dig...
分类:
其他好文 时间:
2015-03-03 18:41:14
阅读次数:
133
Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The...
分类:
其他好文 时间:
2015-03-03 13:43:53
阅读次数:
168
Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as:
h d
e l
l r
lowo
That is, the characters must be pr...
分类:
其他好文 时间:
2015-03-03 13:37:59
阅读次数:
154
#include#includeusing namespace std;bool HARSH[10066]; //实际上申请来之后初试都是falsebool cmp(int a,int b){ return a>b;}int main(){ fill(HARSH,HARSH+1066,...
分类:
其他好文 时间:
2015-03-03 13:31:23
阅读次数:
171
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 dig...
分类:
其他好文 时间:
2015-03-03 09:59:09
阅读次数:
150