码迷,mamicode.com
首页 >  
搜索关键字:PAT 动态地址转换    ( 13520个结果
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
PAT:1050. String Subtraction (20) AC
#include#include#includeusing namespace std;bool HARSH[260]; //实际上申请来之后初试都是falseint main(){ fill(HARSH,HARSH+260,true); char str1[10066]; char...
分类:其他好文   时间:2015-03-02 23:44:22    阅读次数:163
PAT:1041. Be Unique (20) AC “段错误:可能是数组开的不够大”
#include#includeint harsh[10066];int arr[100066];int main(){ memset(harsh,0,sizeof(harsh)); memset(arr,0,sizeof(arr)); int n; scanf("%d",&n); for...
分类:编程语言   时间:2015-03-02 22:24:09    阅读次数:188
PAT:1029. 旧键盘(20) AC
#include#includebool HARSH[256]={false}; //标记字符,初始化都未输出过int main(){ char str1[100],str2[100],tmp[100]; gets(str1); gets(str2); int len1=strle...
分类:其他好文   时间:2015-03-02 20:50:54    阅读次数:183
1020. Tree Traversals (25)
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the cor...
分类:其他好文   时间:2015-03-02 19:10:38    阅读次数:135
1026. Table Tennis (30)
A table tennis club has N tables available to the public. The tables are numbered from 1 to N. For any pair of players, if there are some tables open when they arrive, they will be assigned to the ava...
分类:其他好文   时间:2015-03-02 19:10:02    阅读次数:126
1023. Have Fun with Numbers (20)
Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number con...
分类:其他好文   时间:2015-03-02 19:09:06    阅读次数:193
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!