Search found 50 matches

by sidky
Thu Apr 21, 2005 4:23 pm
Forum: Volume 108 (10800-10899)
Topic: 10837 - A Research Problem
Replies: 25
Views: 7550

Thanks domino. I was really stuck on this problem. Now its AC.
by sidky
Thu Mar 10, 2005 6:31 am
Forum: Volume 108 (10800-10899)
Topic: 10827 - Maximum sum on a torus
Replies: 52
Views: 27834

possibly, that is not the case. my AC code allows empty sub rectangles, and for rimu's input, it outputs 0
by sidky
Mon Jan 17, 2005 3:42 pm
Forum: Volume 6 (600-699)
Topic: 695 - Placing the Ops
Replies: 6
Views: 2211

leading zeros are not illegal. Your problem must be somewhere else.
by sidky
Thu Jan 13, 2005 4:12 pm
Forum: Volume 108 (10800-10899)
Topic: 10800 - Not That Kind of Graph
Replies: 48
Views: 22191

My Program gives this output: Case #1: | _ | / \_/\/\ | / \___/ | / +----------------- Case #2: | / | / | / +----- Case #3: | ______ +-------- Case #4: | _ _ /\/ | _/ \/ \/ +------------- Case #5: | /\_ _ | / \/ \/\_ | _/ +--------------- Also check these inputs 1 RRRFFFFFFFFFF whose output is: Case...
by sidky
Sun Dec 26, 2004 4:46 am
Forum: Volume 107 (10700-10799)
Topic: 10798 - Be wary of Roses
Replies: 58
Views: 20096

The man doesn't know which way he is facing. But, no matter the orientation is, he will move in the same directions. For this case, the man can move right, forward,forward,forward. Check in 4 possible starting direction (North, South, East, West) and you can see, he would tremple at most 2 roses in ...
by sidky
Thu Dec 02, 2004 1:44 am
Forum: Volume 101 (10100-10199)
Topic: 10129 - Play on Words
Replies: 34
Views: 10247

The problems doesn't have any tricky inputs. Have you checked whether the graph is connected?
by sidky
Mon Nov 22, 2004 1:43 am
Forum: Volume 107 (10700-10799)
Topic: 10782 - Send More Money
Replies: 5
Views: 2419

During the contest, I was also stuck on this problem for a while. But finally I managed to get it accepted. I also assert() my cases, and found that, my program failed to solve some of the input data. My problem was also in the leading zero. According to my solution, no number can have leading zero ...
by sidky
Sat Nov 13, 2004 4:32 am
Forum: Volume 3 (300-399)
Topic: 359 - Sex Assignments And Breeding Experiments
Replies: 12
Views: 4949

Here's how i solved: 1. I treated the input as a directed graph. First, I checked if any node's indegree is greater than 2. 2. Then i checked, if there is any cycle in the graph. 3. Then i made another graph, where each edge represented the parents of a node. the edges are undirected. I checked whet...
by sidky
Wed Nov 10, 2004 7:30 pm
Forum: Volume 107 (10700-10799)
Topic: 10763 - Foreign Exchange
Replies: 45
Views: 17972

Output should be:
NO

my accepted code assumes that input data fits in 32bit integer.
by sidky
Mon Sep 20, 2004 8:35 am
Forum: Volume 105 (10500-10599)
Topic: 10596 - Morning Walk
Replies: 41
Views: 14999

The graph given as input is undirected.
by sidky
Mon Sep 20, 2004 8:23 am
Forum: Volume 103 (10300-10399)
Topic: 10324 - Zeros and Ones
Replies: 179
Views: 44569

Think of this case

Code: Select all

1111111111
1
0 9
Your program produces "No". It should be "Yes"
by sidky
Sun Sep 19, 2004 4:59 pm
Forum: Volume 105 (10500-10599)
Topic: 10506 - The Ouroboros problem
Replies: 6
Views: 2560

I just solved it through backtracking, and my solution is not too intelligent. But, it managed to get accepted in 0.004 seconds. My approach is similar to yours.
I have never used Set class. So, i dont know whether it is because STL. But, TLE looks a little too much to me. Look at your prunning too.
by sidky
Sat Jul 31, 2004 8:41 am
Forum: Volume 102 (10200-10299)
Topic: 10203 - Snow Clearing
Replies: 21
Views: 4657

I am a little confused about the problem. I thought this is like the 'Chinese postman problem'. But from the previous posts, i think i misunderstood. Can anyone please tell me, should we traverse each road twice, or at least once (like the postmans problem)?
by sidky
Wed Jul 21, 2004 5:37 pm
Forum: Volume 104 (10400-10499)
Topic: 10401 - Injured Queen Problem
Replies: 19
Views: 10128

Use memoization
by sidky
Tue Jul 20, 2004 5:19 pm
Forum: Volume 104 (10400-10499)
Topic: 10473 - Simple Base Conversion
Replies: 46
Views: 13671

Just consider this case:

0xB
0xC

whose output should be:

11
12

Go to advanced search