Search found 12 matches

by seadoo
Fri Jan 02, 2004 8:15 pm
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 26360

Was the only change the additional line? I comapred my input/output with that of your program and they are the same, but I get WA. Didn't try to submit your program, though.
by seadoo
Fri Jan 02, 2004 8:07 pm
Forum: Volume 4 (400-499)
Topic: 439 - Knight Moves
Replies: 33
Views: 11568

Ah, I had an nasty bug in my code, and of all possible input cases (4069), only a few were wrong. And obvious, the judge tested one of them :)
by seadoo
Fri Jan 02, 2004 8:05 pm
Forum: Volume 4 (400-499)
Topic: 406 - Prime Cuts
Replies: 187
Views: 26360

But there should be an empty line between each case, so \n\n is fine, i guess.
by seadoo
Fri Jan 02, 2004 2:15 pm
Forum: Volume 4 (400-499)
Topic: 439 - Knight Moves
Replies: 33
Views: 11568

Pavelph, thank you for your reply.

I don't know what is wrong with my program, I tested it with many inputs and I really don't know what to do next. Have you any special-case-rule in your code or can you suggest me any other input/output test?
by seadoo
Fri Jan 02, 2004 11:32 am
Forum: Volume 4 (400-499)
Topic: 439 - Knight Moves
Replies: 33
Views: 11568

I am using a graph search algorithm to solve this problem, and I am getting WA, but I don't know why. Here are some input and output cases, can anyone try them with a AC program? Thanks... Input: a1 e4 a2 a8 a3 g5 b1 c1 b2 b6 b3 c4 b4 h8 b8 h8 c2 c6 c3 h4 c6 f7 d2 f8 d4 e6 d6 h8 e2 e6 e4 e8 f1 g6 f4...
by seadoo
Wed Dec 31, 2003 6:57 pm
Forum: C
Topic: feof
Replies: 3
Views: 2111

Hey thanks, man, I included stdio.h and it worked OK - I got AC.

I know stdin.h, but didn't know I have to include it. It's maybe the fault of this stupid MS compiler, in which you don't need to include it :wink:

I really appreciate your reply.
by seadoo
Wed Dec 31, 2003 6:44 pm
Forum: C
Topic: feof
Replies: 3
Views: 2111

Oh, sorry. I am getting the compile error only on OJ. At home I use Visual C#, but I am coding in C. And I have a lot of problems accepted, but in this one I am using feof(stdin) and there is where I am getting compile error (if I remove it from the code, it's OK, but then I get WA). And I didn't in...
by seadoo
Wed Dec 31, 2003 12:51 am
Forum: C
Topic: feof
Replies: 3
Views: 2111

feof

Why am I getting compile error if i use:
[c]if(feof(stdin))
return;[/c] ?
by seadoo
Sun Dec 21, 2003 11:32 am
Forum: Volume 101 (10100-10199)
Topic: 10116 - Robot Motion
Replies: 10
Views: 4803

Rong, thank you very much for your test cases!

I had a bug and couldn't find it. It was discovered through your test cases...

The bug was: if a cycle started in the first robot position, it was discovered as a cycle starting at the second robot position :)
by seadoo
Sun Dec 21, 2003 9:03 am
Forum: Volume 105 (10500-10599)
Topic: 10515 - Powers Et Al.
Replies: 124
Views: 31244

Re: I got AC .

yan4546 wrote:2 digits is not enough and 3 digits can do .
Nope, one digit of m and two digits of n are enough.
by seadoo
Mon Dec 15, 2003 6:31 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 31108

Got it... changed to unsigned long and it worked...
by seadoo
Mon Dec 15, 2003 6:21 pm
Forum: Volume 3 (300-399)
Topic: 371 - Ackermann Functions
Replies: 196
Views: 31108

371: why SIGSEGV

Hello all!

Why am I getting SIGSEV error with this piece of code?
The largest value in the sequence will not be larger than a 32-bit C long, and I have long's in the code. What else could be wrong?

Go to advanced search