码迷,mamicode.com
首页 >  
搜索关键字:pat    ( 13517个结果
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
1024. Palindromic Number (25)
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers...
分类:其他好文   时间:2015-03-02 19:09:13    阅读次数:151
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
PAT:1080. Graduate Admission (30) 全错
#include#include#includeusing namespace std;struct Student{ int GE,GI,sum,rank,ID; int prefer[6];}STU[40066];struct School{ int want; //各学校招...
分类:其他好文   时间:2015-03-02 18:20:07    阅读次数:170
PAT:1080. Graduate Admission (30) 部分错误(录取以学校为导向而不是考生志愿为导向导致的错误)
#include#include#includeusing namespace std;int want[106]; //各学校招生人数struct Student{ int GE,GI,sum,rank,ID; int prefer[6]; bool R; /...
分类:其他好文   时间:2015-03-02 16:22:37    阅读次数:195
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!