Search found 48 matches

by hi!man!
Sun Oct 28, 2007 9:41 am
Forum: Volume 113 (11300-11399)
Topic: 11330 - Andy's Shoes
Replies: 10
Views: 5786

After I change a bit, I get WA instead. This is my code. Where is my bug? #include<stdio.h> #include<string.h> int main(){ int C,n,i,a[10010],c[10010],x,y,s; scanf("%d",&C); while(C--){ scanf("%d",&n); for(i=0;i<n;i++){ scanf("%d%d",&x,&y); a[y-1]=x-1; } for(i=0;i<n;i++) c[a[i]]=i; for(i=s=0;i<n;i++...
by hi!man!
Sun Oct 28, 2007 7:30 am
Forum: Volume 113 (11300-11399)
Topic: 11330 - Andy's Shoes
Replies: 10
Views: 5786

strange, my code get TLE..
but I think it is fast enough, which run 2000 times n=10000 test case cost about 4 sec.

Is there any critical input in judge or my code really too slow?
by hi!man!
Sun Oct 28, 2007 7:09 am
Forum: Volume 113 (11300-11399)
Topic: 11326 - Laser Pointer
Replies: 25
Views: 10919

If I don't use epsilon, I will get WA because of precision error.
by hi!man!
Sun Oct 28, 2007 6:55 am
Forum: Volume 113 (11300-11399)
Topic: 11326 - Laser Pointer
Replies: 25
Views: 10919

I use eps=1E-7 and pass it,
so I think eps is not main reason why you get WA.
by hi!man!
Sun Oct 28, 2007 6:45 am
Forum: Volume 113 (11300-11399)
Topic: 11330 - Andy's Shoes
Replies: 10
Views: 5786

11330 - Andy's Shoes

I can't pass this problem. Can anyone check these inputs? Thanks in advance. Input1 25 4 1 2 3 4 4 1 2 3 6 1 2 2 1 3 4 4 5 5 6 6 3 6 1 2 2 3 3 1 4 6 6 5 5 4 6 1 1 2 2 3 4 4 5 5 3 6 6 6 1 2 2 1 3 4 4 3 5 6 6 5 10 2 2 6 5 8 7 4 9 9 4 10 10 1 1 5 3 7 6 3 8 10 4 10 2 1 9 9 3 8 6 7 10 4 5 3 1 6 8 5 7 2 1...
by hi!man!
Sat Sep 08, 2007 10:12 am
Forum: Bugs and suggestions
Topic: 496 - Simply Subsets
Replies: 6
Views: 4353

char* c = NULL; *c = '\0'; No, that is not the reason. *c is not pointer, it is a variable. Change the code #include "stdio.h" int main() { static char buffer[1000000]; int cnt = 0; while (fgets(buffer, 1000000, stdin) != NULL) +cnt; if (cnt % 2 != 0) { char* c = NULL; *c = '\0'; } return 0; } to t...
by hi!man!
Fri Sep 07, 2007 4:55 pm
Forum: FAQ
Topic: Borring System
Replies: 20
Views: 17737

It takes too long time for loading. After I used Firefox, the loading time is speed up like old system. But the inconvenience of new judge is I cannot submit code in one page. I think the new judge is very good but something is better to improve. The ranking has to be separated because two judges h...
by hi!man!
Mon Aug 13, 2007 10:51 am
Forum: Volume 7 (700-799)
Topic: 751 - Triangle War
Replies: 17
Views: 7686

Thank you, I found a silly mistake, and then I got AC.
by hi!man!
Sun Aug 12, 2007 3:38 am
Forum: Volume 7 (700-799)
Topic: 751 - Triangle War
Replies: 17
Views: 7686

And what are these outputs? Thanks. Input: 41 3 1 2 8 9 5 6 6 2 4 6 9 9 10 8 9 2 3 1 2 7 8 9 5 9 7 8 1 2 6 9 3 6 2 4 7 5 6 3 5 2 4 1 2 5 9 4 8 4 7 8 3 6 2 3 3 5 1 3 7 8 9 10 6 9 6 10 16 6 10 3 6 1 3 5 6 4 7 7 8 5 8 5 9 9 10 6 9 2 3 8 9 4 8 1 2 3 5 4 5 11 5 8 4 8 6 9 2 3 9 10 6 10 2 5 3 5 2 4 4 7 1 2...
by hi!man!
Sun Aug 12, 2007 3:08 am
Forum: Volume 1 (100-199)
Topic: 140 - Bandwidth
Replies: 49
Views: 7581

thank you, I got AC :)
still a silly mistake.
by hi!man!
Sat Aug 11, 2007 11:18 am
Forum: Volume 112 (11200-11299)
Topic: 11245 - Anti-Arithmetic-Sequence
Replies: 18
Views: 5906

The sequence 1,2,4,5,7,8,10,11,13,14,...
contain a lot of arithmetic sequence,
such as (1,4,7),(2,5,8 ),(1,7,13)...etc.
(1,4,7) --> 7-4=4-1=3 so it is arithmetic sequence.

Think more and you will get it :wink:
by hi!man!
Sat Aug 11, 2007 11:06 am
Forum: Volume 1 (100-199)
Topic: 140 - Bandwidth
Replies: 49
Views: 7581

I got several WAs, anyone check these i/o? thanks in advance. Input: A:FB;B:GC;D:GC;F:AGH;E:HD A:FB;B:GC;D:GC;F:AGH;E:H A:B;B:C;C:D;D:E;E:F;F:G;G:H A:B;B:C;C:D;D:E;E:F;F:G;G:H;H:A A:B;B:CE;C:D;D:E;E:F;F:G;G:H;H:A A:B;B:CE;CG:D;D:E;E:F;F:G;G:H;H:A <--Wrong Input, sorry A:B;B:CE;C:DG;D:E;E:F;F:G;G:H;H...
by hi!man!
Sat Aug 04, 2007 6:17 am
Forum: Volume 7 (700-799)
Topic: 751 - Triangle War
Replies: 17
Views: 7686

What are the correct output for these inputs?
PS.although 6<=m, I want to know these outputs.

Thanks in advance.

input:

Code: Select all

5
0
1
5 6
2
4 5
5 9
4
4 5
5 9
1 2
7 8
6
1 2
3 5
3 6
5 6
8 9
9 10
my output:

Code: Select all

Game 1: B wins.
Game 2: B wins.
Game 3: B wins.
Game 4: A wins.
Game 5: B wins.
by hi!man!
Sun Jul 29, 2007 10:32 am
Forum: Volume 112 (11200-11299)
Topic: 11247 - Income Tax
Replies: 50
Views: 20840

even if v==m its effective income may less then m-1, so solution v is valid as i think. sorry, you are right. To hi!man! For input "100 67", your code outputs 300 But I think the answer is 299 by the way, I think if(n*100%(100-x)==0) n--; exist a problem Hope it helps :) Thanks, it really help me :...
by hi!man!
Sun Jul 29, 2007 9:52 am
Forum: Volume 112 (11200-11299)
Topic: 11247 - Income Tax
Replies: 50
Views: 20840

even if v==m, the solution v is still valid. I don't think so. Given the value of m and x, you will have to find the value of the maximum income v, which is effectively (after deducting the tax) less than someone earning less than v. According to problem statement, v must bigger than m. If I am wro...

Go to advanced search