Search found 35 matches

by WingletE
Thu Jul 02, 2009 10:06 am
Forum: Volume 100 (10000-10099)
Topic: 10023 - Square root
Replies: 121
Views: 27628

Runtime Error

My code runs okay on my computer and I really don't know why it got an RTE. I've tried to enlarge the array of my BigInt to 2500, and checked that no divide-by-zero will possibly happen. I think it's not the problem of array-index-out-of-bound because that should have caused a WA on my computer. I'd...
by WingletE
Sun Jun 28, 2009 11:47 am
Forum: Volume 100 (10000-10099)
Topic: 10033 - Interpreter
Replies: 88
Views: 25052

Re: 10033 - Interpreter

Since I didn't find any testcase with instructions beginning with 8 or 9, I made some and hope that will be helpful to those who make the same mistakes as I did. Input: 2 221 422 425 000 311 712 712 913 031 299 233 255 990 803 301 050 100 Output: 10 26 to williamxu: I didn't know if you've solved th...
by WingletE
Fri May 30, 2008 6:43 am
Forum: Volume 6 (600-699)
Topic: 624 - CD
Replies: 77
Views: 33362

N

I assumed N <= 5000 and got AC.
by WingletE
Tue Mar 04, 2008 9:30 am
Forum: Volume 114 (11400-11499)
Topic: 11407 - Squares
Replies: 24
Views: 9123

Thanks both of you. I've adapted my code, but still getting wrong answer. Help me, please. Input: 30 5 6 7 8 9 10 100 1000 1001 3333 3334 2555 4999 5000 7098 7099 7100 7111 7222 7777 8884 8999 9000 9001 9030 9025 9028 9998 9999 10000 Output: 2 3 4 2 1 2 1 2 3 3 3 3 4 2 3 3 4 4 3 3 2 4 2 2 3 1 2 3 4 ...
by WingletE
Mon Mar 03, 2008 2:46 pm
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 36341

Another question:
I've seen at somewhere that this problem can be solved using DFS, but how can I use DFS without getting TLE?

And could someone explain the ideas of other solutions for me?
I think there are many better solutions above, but I can't understand them very well.

Thanks.
by WingletE
Mon Mar 03, 2008 2:34 pm
Forum: Volume 1 (100-199)
Topic: 131 - The Psychic Poker Player
Replies: 34
Views: 5267

I got Compile Error, but my code works fine on my computer. Could somebody tell me what in my code would cause Compile Error, please? Thanks! Code deleted after Accepted! Note: Never use "void sort( iterator start, iterator end, StrictWeakOrdering cmp );" in c++ algorithm. It has caused me countless...
by WingletE
Sat Mar 01, 2008 9:25 am
Forum: Volume 114 (11400-11499)
Topic: 11407 - Squares
Replies: 24
Views: 9123

Q11407: Squares

I can't find a board for Volume CXIV, so I put this here. Could somebody check for me if my answer below is right? Input: 10 10 100 1000 1001 2555 4999 5000 9998 9999 10000 Output: 2 1 5 3 5 5 2 3 4 1 If my answer for the above testcase is right, someone give me some more tricky testcase please. Tha...
by WingletE
Thu Feb 28, 2008 10:42 am
Forum: Volume 100 (10000-10099)
Topic: 10000 - Longest Paths
Replies: 160
Views: 36341

I tried to solve this problem using Floyd-Warshall but getting wrong. I think there must be some logical mistake in my code, but I don't know where it is. This is part of my code. Somebody please give me some suggestion. Thank you! /* 1. M is zero. 2. In the beginning matrix[i][j] is set to 1 if i a...
by WingletE
Sun Feb 24, 2008 10:51 am
Forum: Volume 5 (500-599)
Topic: 534 - Frogger
Replies: 41
Views: 17745

Re: 534 Frogger - I/O

To rafagiu:
Thanks for your testcase.
They did help me a lot!

By the way, in the last testcase, the n is 21.:wink:
I'd got confused by that case for some time, but it was really useful.
by WingletE
Sun Nov 18, 2007 8:23 am
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 21304

Thanks! I understand.
by WingletE
Sat Nov 17, 2007 10:26 am
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 21304

Here's my code.
I use the same method as problem 357.
I really don't know where could be wrong...

Code: Select all

Code deleted!!!
Thanks for checking it for me!
by WingletE
Thu Nov 15, 2007 2:42 pm
Forum: Volume 1 (100-199)
Topic: 147 - Dollars
Replies: 233
Views: 21304

Code: Select all

(int)(n * 100.0 + 1e-6)
Would it be the reason of wrong answer?
Or there might be other errors in my code?

Please give me some more tricky test cases.
Thanks!
by WingletE
Thu Nov 15, 2007 1:56 pm
Forum: Volume 3 (300-399)
Topic: 343 - What Base Is This?
Replies: 72
Views: 21454

Thanks. I got Accepted. =)
by WingletE
Wed Nov 14, 2007 2:58 pm
Forum: Volume 3 (300-399)
Topic: 357 - Let Me Count The Ways
Replies: 90
Views: 7486

Re: 357 WA

txandi wrote: long long int total[MAX+1];

total[0]=1;
for(int i=0;i<5;i++)
{
...
}
...
Why isn't it necessary to set all the elements in 'total' to zero before using it?
by WingletE
Wed Nov 14, 2007 10:42 am
Forum: Volume 3 (300-399)
Topic: 343 - What Base Is This?
Replies: 72
Views: 21454

Somebody help me!
I've tried all the test cases I could find on the board but still WA.
Could someone give me more critical test cases?

Code: Select all

deleted

By the way is there any negetive numbers in the input or some test case like this?

Code: Select all

000 00000

Go to advanced search