| Award Contest | Welcome spirit_only Log Out Mail:0(0) |
| No. | User Id | Nick | Sovled | Submit |
|---|---|---|---|---|
| 1 | stream_speed | 做完题库就去当导演 | 438 | 716 |
| 2 | sdwgk0 | sdwgk0 | 64 | 66 |
| 3 | Bal4u | Bal4u | 50 | 69 |
| 4 | wsbear | bear | 32 | 46 |
| 5 | moonlike | moonlike | 32 | 50 |
| 6 | ghost_wei | ghost | 29 | 50 |
| 7 | sunflowwer | sunflowwer | 26 | 53 |
| 8 | forgotten | forgotten | 25 | 50 |
| 9 | 3650723 | register | 24 | 43 |
| 10 | xiaxinsheng | xu | 23 | 66 |
| 11 | LiZhiXu | WHU_ACM Rush -150 | 19 | 29 |
| 12 | Huacm76 | hekui | 18 | 48 |
| 13 | duan | 虫—蛹—蝴 | 18 | 50 |
| 14 | lizhi5261 | 水冰鱼 | 17 | 28 |
| 15 | kare | kare | 17 | 37 |
| 16 | wx1166750 | 超时王子 | 17 | 44 |
| 17 | ilbe | lifeisadream | 17 | 50 |
| 18 | taiten | taiten | 16 | 22 |
| 19 | catcat | catcat | 16 | 26 |
| 20 | whitesea | redsea | 16 | 30 |
| 21 | ljtszsy | 剑灵 | 16 | 35 |
| 22 | dec1985 | 非非 | 16 | 37 |
| 23 | spirit_only | spirit_only | 16 | 51 |
| 24 | PhoeNix_PC | PhoeNix | 15 | 24 |
| 25 | s2wgk0 | s2wgk0 | 15 | 42 |
| 26 | blacksong | blacksong | 14 | 17 |
| 27 | carew | Carew | 14 | 33 |
| 28 | yiyiyi4321 | yiyi | 14 | 50 |
| 29 | ACM06000_HCX | uvw | 13 | 13 |
| 30 | huacm16 | huacm16 | 13 | 15 |
哈哈,看到没,我们现在参加的培训中应该是最强的人“duan”啊(Accepted 了18),kanting 和我一样啊,哈哈。不过要不是下午死揪那个垃圾题,然后为了证明POJ的编译器有缺陷狂submit,我的submit也没那么高。
还有就是那个题:
2 #include <iostream>
3 #include <memory>
4 #include <stdio.h>
5 #include <string.h>
6 using namespace std;
7
8 //#define N 100
9 int table[100][100];
10
11 void WHITE(int x,int y,int L)
12 {
13 for(int i=x-1;i<x+L-1;i++)
14 for(int j=y-1;j<y+L-1;j++)
15 table[i][j]=0;
16 }
17
18 void BLACK(int x,int y,int L)
19 {
20 for(int i=x-1;i<x+L-1;i++)
21 for(int j=y-1;j<y+L-1;j++)
22 table[i][j]=1;
23 }
24
25 void TEST(int x,int y,int L)
26 { int count=0;
27 for(int i=x-1;i<x+L-1;i++)
28 for(int j=y-1;j<y+L-1;j++)
29 if(table[i][j]==1)
30 count++;
31 cout<<count<<endl;
32 }
33
34 int main()
35 {
36 char command[8];
37 int x,y,l;
39 int test_cases;
40 //cin >>test_cases;
41 scanf("%d",&test_cases);
42 /*0表示white*/
43 memset(table,0,sizeof(table));
44 //memset(command,0,10000);
46 int k,i,j;
47 for(k=0;k<test_cases;k++)
48 {
51 scanf("%s %d %d %d",command,&x,&y,&l);
52 if (strcmp(command,"WHITE") == 0)
53 {
55 //for (i=x-1;i<x+l-1;i++)
56 //{
57 // for (j=y-1;j<y+l-1;j++)
58 // {
59 // table[i][j] = 0;
60 // }
61 //}
62 WHITE(x,y,l);
64 }
65 else if(strcmp(command,"BLACK") == 0)
66 {
68 //for (i=x-1;i<x+l-1;i++)
69 //{
70 // for (j=y-1;j<y+l-1;j++)
71 // {
72 // table[i][j] = 1;
73 // }
74 //}
75 BLACK(x,y,l);
77 }
78 else if (strcmp(command,"TEST") == 0)
79 {
81 //int count = 0;
82 //for (i=x-1;i<y+l-1;i++)
83 //{
84 // for (j=y-1;j<y+l-1;j++)
85 // {
86 // if(table[i][j] == 1)
87 // {
88 // count++;
89 // }
90 // }
91 //}
92 TEST(x,y,l);
94 //cout <<count<<endl;
96 }
97 }
100 }
104 /*Accepted,可是很是郁闷啊,写成函数就过*/
看到了,就是这个垃圾题,上面的三个函数是xhh写得,然后main()函数中的三处for循环中的代码和函数体中的一模一样,但是当我把for循环换成函数时,就AC了,可是不换,就WA,郁闷。还浪费了我大量的时间,和submit,要不我说不定超kanting了,嘿嘿!^^


评论