Search found 78 matches

by Articuno
Fri Mar 27, 2009 4:00 pm
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 24052

Re: 10067 - Playing with Wheels

There is a test case where the starting sequence is in the forbidden list. I got some WA for that reason. :cry: Try out this input:

Code: Select all

1
8 0 5 6
6 5 0 8
1
8 0 5 6
Output:

Code: Select all

-1
by Articuno
Wed Mar 25, 2009 10:05 pm
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 24052

Re: 10067 - Playing with Wheels

Problem fixed....

Code: Select all

AC
by Articuno
Fri Jan 23, 2009 1:59 pm
Forum: Volume 4 (400-499)
Topic: 486 - English-Number Translator
Replies: 27
Views: 6937

Re: 486 need test cases

My program is getting WA. Please someone give me some test cases. I tried various inputs but my code is giving correct output. Someone pls help
by Articuno
Sun Jan 11, 2009 1:38 pm
Forum: Volume 1 (100-199)
Topic: 142 - Mouse Clicks
Replies: 58
Views: 6095

Re: 142 WA!!:-((

Can someone help me please? I am getting WA. Some test cases will be very helpful.
Is it a multiple input problem or will there be only one test input?
Please someone reply. Thanks in advance.
by Articuno
Thu Jan 08, 2009 10:36 am
Forum: Volume 7 (700-799)
Topic: 762 - We Ship Cheap
Replies: 51
Views: 20111

Re: 762 - We Ship Cheap

At last I have found my error. For this type of input:

Code: Select all

1
AA AA
MM MM
The output should be:

Code: Select all

MM MM
Is this some kind of joke or what?
Problem descryption says:
You may assume that the input is valid and consistent.
What can i say? I have got about 15 WA
by Articuno
Wed Jan 07, 2009 7:04 pm
Forum: Volume 7 (700-799)
Topic: 762 - We Ship Cheap
Replies: 51
Views: 20111

Re: 762 - We Ship Cheap

I can't find any mistake in my code. Can anyone help me? I have got a lot of WA, my code is giving correct output for the inputs those are given here. Can anyone suggest any advice please? I will be grateful. I am giving my code, though i think it will be hard to debug as my coding approach is very ...
by Articuno
Mon Jan 05, 2009 1:48 pm
Forum: Volume 105 (10500-10599)
Topic: 10591 - Happy Number
Replies: 61
Views: 20855

Re: 10591 - Happy Number

I think one of the easiest way is to use an array, check every value whether it is already in the array,if it is, then this is an unhappy number. Otherwise store that value in the array.
by Articuno
Sun Jan 04, 2009 11:25 pm
Forum: Volume 4 (400-499)
Topic: 412 - Pi
Replies: 104
Views: 17876

Re: 412 - WA (Can't find the big from posts before <- -a>)

Check this line:
Answers must be rounded to six digits after the decimal point.
Good luck :)
by Articuno
Sun Jan 04, 2009 11:11 pm
Forum: Volume 101 (10100-10199)
Topic: 10102 - The path in the colored field
Replies: 34
Views: 13030

Re: 10102 - The Path in the Colored Field

You used abs() but did not include the required header file <stdlib.h>. And try using this format for main()

Code: Select all

int main()
{
//code
return 0;
}
Good luck :)
by Articuno
Sun Jan 04, 2009 10:50 pm
Forum: Volume 101 (10100-10199)
Topic: 10125 - Sumsets
Replies: 50
Views: 15379

Re: 10125 - Sumsets

I don't think a O(n^4) algo can pass the time limit. Try something better.
by Articuno
Thu Jan 01, 2009 3:45 pm
Forum: Volume 100 (10000-10099)
Topic: 10035 - Primary Arithmetic
Replies: 328
Views: 56980

Re: 10035 - Primary Arithmetic

Well there are a few lines you should recheck: The format specifier for long data type is %ld , not %lld. And you should also change this line: while(scanf("%s %s", str_1, str_2)!=EOF) into this: while(scanf("%s %s", &str_1, &str_2)==2) And what is count doing here? printf("No carry operation.\n", c...
by Articuno
Wed Dec 31, 2008 11:48 am
Forum: Volume 115 (11500-11599)
Topic: 11565 - Simple Equations
Replies: 21
Views: 5786

Re: 11565 - Simple Equations

I dont understand what you want to say, If you are asking about inputs>10000 and <1 then this should not be a concern. The problem descryption defines that all inputs will be within that range.
by Articuno
Tue Dec 30, 2008 2:06 pm
Forum: Volume 102 (10200-10299)
Topic: 10298 - Power Strings
Replies: 31
Views: 13333

Re: 10298 - Power Strings

Thanks mf, got AC. But one more thing. Sorry to bother you, but can you explain how and why this approach works?
by Articuno
Tue Dec 30, 2008 12:12 pm
Forum: Volume 102 (10200-10299)
Topic: 10298 - Power Strings
Replies: 31
Views: 13333

Re: 10298 - Power Strings

I have got it, everything is clear. Thanks a lot :D
by Articuno
Tue Dec 30, 2008 10:52 am
Forum: Volume 102 (10200-10299)
Topic: 10298 - Power Strings
Replies: 31
Views: 13333

Re: 10298 - Power Strings

mf, I have a silly question. What I knew was this algorithm can be used to find the occurence of a pattern in a string. But how can i use this to find a substring in a string when i dont know the substring? Can you explain it more please :-?

Go to advanced search