## Search found 85 matches

Thu Nov 05, 2009 8:02 pm
Forum: Volume 108 (10800-10899)
Topic: 10871 - Primed Subsequence
Replies: 20
Views: 12323

### Re: 10871 - Primed Subsequence

Weak test!!!!
For such test:
1
10000 10000 100000.....10000
My program should get MLE! But it got AC!
Wed Nov 04, 2009 5:37 pm
Forum: Volume 6 (600-699)
Topic: 624 - CD
Replies: 77
Views: 33628

### Re: N

WingletE wrote:I assumed N <= 5000 and got AC.
I assumed N <= 2000 and got AC.
Thu Oct 29, 2009 6:51 am
Forum: Volume 117 (11700-11799)
Topic: 11714 - Blind Sorting
Replies: 14
Views: 3421

### Re: 11714 Blind Sorting

10 digit prime is- 2147483647!!!
Wed Oct 28, 2009 3:00 pm
Forum: Volume 4 (400-499)
Topic: 459 - Graph Connectivity
Replies: 132
Views: 25430

### Re: 459 - Graph Connectivity

Input terminated by EOF!!!! Not by blank line! When I change it I got AC!
Thu Oct 15, 2009 7:44 am
Forum: Volume 116 (11600-11699)
Topic: 11686 - Pick up sticks
Replies: 44
Views: 10675

### Re: 11686 How can

arifcsecu wrote:You make a simple error

n is 10^6

so you vector should be like

vector <long int> g[1000001];
Hope it helps
May be g(1000001) not g[1000001] ????
Wed Oct 07, 2009 2:09 pm
Forum: Volume 116 (11600-11699)
Topic: 11686 - Pick up sticks
Replies: 44
Views: 10675

### Re: 11686 How can

scanf/printf use another aproach how to read and how to write data, they are much more faster than cin/cout.
Tue Oct 06, 2009 6:33 pm
Forum: Volume 116 (11600-11699)
Topic: 11686 - Pick up sticks
Replies: 44
Views: 10675

### Re: 11686 How can

Try to change cin/cout to scanf/printf. May be this could help.
Tue Oct 06, 2009 6:26 pm
Forum: Volume 116 (11600-11699)
Topic: 11690 - Money Matters
Replies: 19
Views: 6777

### Re: 11690 MONEY MATTERS

You use a lot of memory(about 400 MB), your solution wouldn't work!
Wed Sep 09, 2009 8:06 am
Forum: Volume 116 (11600-11699)
Topic: 11659 - Informants
Replies: 31
Views: 8817

### Re: 11659

First you print leading new line!
Second why do you use such a big array you need only 20 elements and third try this test:

Code: Select all

``````3 2
1 -3
3 -2
0 0
``````
Tue Sep 08, 2009 8:40 am
Forum: Volume 116 (11600-11699)
Topic: 11664 - Langton's Ant
Replies: 10
Views: 3674

### Re: 11664 - Langton's Ant

Thanks!
You are right it was a problem with the 2 number!
But when I fixed this bug I got a lot of WA, while I change my code to Java, and find another mistake in code!
Now Ac!
Mon Sep 07, 2009 4:09 pm
Forum: Volume 116 (11600-11699)
Topic: 11659 - Informants
Replies: 31
Views: 8817

### Re: 11659

You make it very hard yourself!
You need only one array and one loop! array=0 if informant "i" is not reliable and 1 if reliable. At first all array is 1!
Hope it helps!
Mon Sep 07, 2009 2:49 pm
Forum: Volume 116 (11600-11699)
Topic: 11659 - Informants
Replies: 31
Views: 8817

### Re: 11659

I think that this test could help to find a solution for that problem, it is really easy.

Code: Select all

``````20 0
0 0
``````
Mon Sep 07, 2009 8:48 am
Forum: Volume 116 (11600-11699)
Topic: 11664 - Langton's Ant
Replies: 10
Views: 3674

### Re: 11664 - Langton's Ant

I don't understand why from (y,x)???
Here is a part of my code... I don't know why WA....

Code: Select all

``````Cut.......
``````
Sun Sep 06, 2009 7:54 pm
Forum: Volume 116 (11600-11699)
Topic: 11658 - Best Coalitions
Replies: 7
Views: 3724

### Re: 11658 - Best Coalitions

It is a standart dp problem!
Don't use double, int is enough here!!
Sun Sep 06, 2009 5:05 pm
Forum: Volume 116 (11600-11699)
Topic: 11664 - Langton's Ant
Replies: 10
Views: 3674

### 11664 - Langton's Ant

Please correct me if I'am not right!
We have a board with position of lower left corner(1,1) and upper right(n,n). And we need to check if it is possible to reach cell(n,n) from cell(x,y),and initial direction is north?