码迷,mamicode.com
首页 >  
搜索关键字:PAT 动态地址转换    ( 13520个结果
PAT 05-1 List Components (简单DFS与BFS)
刚一拿到这道题把他想的太复杂了 明明是长度最大为十的顺序结构就能解决的问题,竟然优先想到用链表。 BFS牵扯到一个队列的操作,在这种小规模数据里面 用顺序结构好很多 题目如下: For a given undirected graph with N vertices and E edges, please list all the connected...
分类:其他好文   时间:2015-02-24 09:09:25    阅读次数:242
PAT:1015. 德才论 (25) AC
#include#include#includeusing namespace std;struct Student{ char mID[10]; int de,cai,sum; int tag; //标明是第几类:1德才都们组,2德胜才,3}STU[100010];bool c...
分类:其他好文   时间:2015-02-23 15:27:44    阅读次数:163
1001. A+B Format (20)
Calculate a + b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input Each input file cont...
分类:其他好文   时间:2015-02-23 14:20:06    阅读次数:146
PAT:1077. Kuchiguse (20) AC
#include#includechar in[100][260];int main() { int n,lenMIN=260; scanf("%d",&n); getchar(); //【skill】吸收换行符 for(int i=0 ; i=0 ; --i) ...
分类:其他好文   时间:2015-02-22 15:46:15    阅读次数:149
1008. 数组元素循环右移问题 (20)
题目名称:PAT (Basic Level) Practise (中文)1008. 数组元素循环右移问题 (20) 1 #include 2 3 int main() 4 { 5 int n,m; 6 scanf("%d%d",&n,&m); 7 ...
分类:编程语言   时间:2015-02-22 12:12:14    阅读次数:155
PAT:1035. Password (20) AC
#include#includetypedef struct STU{ char mID[15]; char mpass[15]; bool tag;}STU;STU arr[1010];int main(){ memset(arr,0,sizeof(arr)); int n,change...
分类:其他好文   时间:2015-02-21 16:37:26    阅读次数:137
PAT:1005. Spell It Right (20) AC
#include#includechar alp[10][10]={"zero","one","two","three","four","five","six","seven","eight","nine"};char str[1200];int main(){ scanf("%s",str); ....
分类:其他好文   时间:2015-02-21 15:28:26    阅读次数:209
PAT:1001. A+B Format (20)(数组存储,逢三加“,”) AC
#includeint main(){ int a,b; scanf("%d%d",&a,&b); int sum=a+b; if(sum=0 ; --j) { printf("%d",arr[j]); if(j!=0 && j%3==0) //【思维】用取余的方法逢...
分类:编程语言   时间:2015-02-21 15:26:37    阅读次数:172
PAT:1001. A+B Format (20)(取整取余法) 部分正确
#includeint main(){ int a,b; scanf("%d%d",&a,&b); int sum=a+b; if(sum1000000) //【思维】,两个数字在:-1000000 1000) printf("%d,%d",sum/1000,sum%...
分类:其他好文   时间:2015-02-21 14:20:06    阅读次数:162
PAT:1014. 福尔摩斯的约会 (20) 部分正确
#include#include#include#include#includeusing namespace std;char g1[99],g2[99],g3[99],g4[99];char alp[7][5]={"MON","TUE","WED","THU","FRI","SAT","SUN"...
分类:其他好文   时间:2015-02-21 13:11:24    阅读次数:122
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!