Search found 7 matches

by Vytenis
Thu Apr 15, 2010 3:39 am
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7193

Re: 11585 - Nurikabe

One tricky case is when there is a number in a shaded cell. In such case "non solved" must be printed.
by Vytenis
Mon Nov 24, 2008 6:48 pm
Forum: Volume 114 (11400-11499)
Topic: 11412 - Dig the Holes
Replies: 3
Views: 3008

Re: 11412 - Dig the Holes

Well, I used Mastermind rules too, i.e. for each hidden coin I checked like this:

Code: Select all

if (hidden[0] == guess[0]) ++n1;
else if (hidden[0] == guess[1] || hidden[0] == guess[2] || hidden[0] == guess[3]) ++n2;
Maybe, you missed the fact that all four coins that you have to guess are of distinct colors?
by Vytenis
Mon Nov 03, 2008 7:45 pm
Forum: Volume 115 (11500-11599)
Topic: 11550 - Demanding Dilemma
Replies: 12
Views: 5360

Re: 11550 - Demanding Dilemma

You must also check if there are no two identical edges defined by the incidence matrix. If there are, you should return "No".
by Vytenis
Mon Oct 27, 2008 5:54 pm
Forum: Volume 115 (11500-11599)
Topic: 11546 - Olympic Swimming
Replies: 6
Views: 1197

Re: 11546 Olympic Swimming

My AC solution gives:

Code: Select all

Case #1: 8 meter(s)
Case #2: 11 meter(s)
Case #3: 40000 meter(s)
Case #4: 1 meter(s)
Case #5: 0 meter(s)
by Vytenis
Thu Oct 16, 2008 3:29 am
Forum: Volume 115 (11500-11599)
Topic: 11527 - Morning Walk
Replies: 0
Views: 552

11527 - Morning Walk

It seems that I do not fully understand the problem and given test cases. Could someone help me? The way I understand the problem is the following. In the first morning in all 3 cases (from M to N, N to P and P to M) Peter walks by two segments that are at a right angle, i.e. through the legs of som...
by Vytenis
Mon Sep 29, 2008 5:18 pm
Forum: Volume 115 (11500-11599)
Topic: 11501 - Laurel Creek
Replies: 6
Views: 1392

Re: 11501 - Laurel Creek

Is there some simple solution to this problem? I thought that a kind of BFS is needed, but it seemed that the potential state space is too big for it to run in time.
by Vytenis
Tue Aug 05, 2008 3:19 pm
Forum: Volume 114 (11400-11499)
Topic: 11476 - Factorizing Large Integers
Replies: 17
Views: 8205

Re: 11476

I have tried both Pollard and Brent versions for factorization and got TLE. However, the major bottleneck in my case is calculating (a*b)%c, where a, b and c are 64-bit integers, without an overflow. I am using O(log n) algorithm similar to fast exponentiation. Is there a way to speed up this comput...

Go to advanced search