Search found 78 matches

by Sanny
Sun Sep 09, 2007 9:04 pm
Forum: Bugs and suggestions
Topic: You have -2 tries left
Replies: 6
Views: 2619

You have -2 tries left

I get this message when I go to that "Migrate Submissions" page. I previously mistakenly pressed the 'Start Migration' button once without stating the ID. But now 3 - 1 = -2 :roll:

-Sanny
by Sanny
Fri Jan 12, 2007 4:58 pm
Forum: Volume 111 (11100-11199)
Topic: 11149 - Power of Matrix
Replies: 42
Views: 19763

When I remove all the 5 lines, I get AC in 1.473 sec.
If I remove last 2 lines, I get WA in 0.795 sec.
And if I remove 3rd & 4th line only, I get WA in 0.021 sec.

Can anybody explain these?
by Sanny
Fri Jan 12, 2007 8:04 am
Forum: Volume 111 (11100-11199)
Topic: 11149 - Power of Matrix
Replies: 42
Views: 19763

Ok now it is time to post the code i think. I've spent many hours with it. This program gets WA in ~.027 seconds. #pragma warning(disable:4786) #include<vector> #include<cstdio> #include<map> #include<algorithm> #include<cassert> using namespace std; #define rep(i,n) for(i=0;i<(n);i++) struct matrix...
by Sanny
Thu Jan 11, 2007 9:10 pm
Forum: Volume 111 (11100-11199)
Topic: 11149 - Power of Matrix
Replies: 42
Views: 19763

Some more i/o to verify: Input: 6 524289 1 2 3 4 5 6 6 5 4 3 2 1 1 3 5 2 4 6 1 3 6 2 5 4 6 2 5 1 3 4 3 4 5 6 2 1 10 524287 45 46 132 75 45 62 21 19 38 67 45 46 132 75 45 62 21 19 38 67 45 46 132 75 45 62 21 19 38 67 45 46 132 75 45 62 21 19 38 67 45 46 132 75 45 62 21 19 38 67 45 46 132 75 45 62 21 ...
by Sanny
Thu Jan 11, 2007 5:27 pm
Forum: Volume 111 (11100-11199)
Topic: 11149 - Power of Matrix
Replies: 42
Views: 19763

Are the following i/o correct? Input: 1 5 5 5 512 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 4 15 1 2 5 9 8 5 6 7 3 4 8 9 1 3 4 6 3 4095 1 2 3 4 5 6 7 8 9 0 0 Output: 5 6 2 8 4 0 6 7 8 9 0 6 2 8 4 0 6 7 8 9 0 6 2 8 4 0 8 0 9 4 3 8 9 9 9 5 1 6 0 7 4 5 5 8 1 8 3 8 1 8 5 Thanks i...
by Sanny
Sun Nov 13, 2005 11:02 am
Forum: Volume 109 (10900-10999)
Topic: 10973 - Triangle Counting
Replies: 31
Views: 13262

bool a[3001][3001] is too big for stack memory. Declare this as global and you'll be fine.

Regards
Sanny
by Sanny
Sat Nov 12, 2005 4:13 pm
Forum: Volume 109 (10900-10999)
Topic: 10973 - Triangle Counting
Replies: 31
Views: 13262

Has anybody got AC in this problem using STL to keep the edge list or adjacency list?

Regards
Sanny
by Sanny
Fri Nov 11, 2005 11:56 pm
Forum: Volume 109 (10900-10999)
Topic: 10973 - Triangle Counting
Replies: 31
Views: 13262

10973 - Triangle Counting

I couldn't find anything better than O(VE) in this problem. Can anybody explain a better algo please?


Regards
Sanny
by Sanny
Sat Nov 05, 2005 9:58 am
Forum: Volume 109 (10900-10999)
Topic: 10953 - Stochastic Digit Generator
Replies: 17
Views: 6017

Krzysztof Duleba wrote:it took me over 30 minutes to figure all signs out, like when to add and when to subtract
Why do you need to subtract?
by Sanny
Sat Oct 22, 2005 9:07 pm
Forum: Volume 109 (10900-10999)
Topic: 10943 - How do you add?
Replies: 38
Views: 13189

If you want to find how to make N with K numbers, you need to find first how to make N-i (i=0 to N) with K-1 numbers. Hope it helps.

Regards
Sanny
by Sanny
Sat Oct 22, 2005 4:21 pm
Forum: Volume 109 (10900-10999)
Topic: 10911 - Forming Quiz Teams
Replies: 33
Views: 24331

Nevermind, got it accepted after declaring hypot in the header. I got AC in more than 3 seconds.. is there a greedy way to do it or something? The times were really fast.. My timing was .082 sec. I used O(2^n* n) DP. When dividing the original problem into subproblems, you only need to match only o...
by Sanny
Sat Oct 22, 2005 1:29 pm
Forum: Volume 109 (10900-10999)
Topic: 10947 - Bear with me, again..
Replies: 23
Views: 2948

I tried this problem in contest time firstly using long long, then bigint and then using double but with no luck. Anybody who got AC can please tell me what data type he used?


Regards
Sanny
by Sanny
Wed Oct 19, 2005 9:35 am
Forum: Algorithms
Topic: Help : 0/1 Knapsack Problem
Replies: 8
Views: 2376

Re: Hi

misof wrote:BTW, there is a simple way of solving this task using a single 1D array :)
Looping down instead of up?
by Sanny
Tue Oct 18, 2005 10:11 pm
Forum: Algorithms
Topic: Help : 0/1 Knapsack Problem
Replies: 8
Views: 2376

You might have got wrong answer for using a 1D array. In this case you may use a number more than once. Try using a 2D array.

Regards
Sanny
by Sanny
Mon Oct 10, 2005 6:13 pm
Forum: Volume 8 (800-899)
Topic: 811 - The Fortified Forest
Replies: 12
Views: 7008

OK I've found my mistake in convex hull code and got AC after fixing it. And I also have taken first best answer.

Regards
Sanny

Go to advanced search