码迷,mamicode.com
首页 >  
搜索关键字:华为设备 静态nat 动态nat pat    ( 13726个结果
PAT:1048. Find Coins (25)(哈希表法) AC
#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
PAT:1029. Median (25) AC
#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
1033. To Fill or Not to Fill
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
1032. Sharing (25)
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
1029. Median (25)
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
1027. Colors in Mars (20)
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
1029. Median
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
1031. Hello World for U
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
PAT:1005. 继续(3n+1)猜想 (25) AC
#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
1027. Colors in Mars
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!