## Search found 150 matches

Fri Nov 11, 2011 12:20 am
Forum: Volume 114 (11400-11499)
Topic: 11407 - Squares
Replies: 24
Views: 9460

### Re: 11407 - Squares

Omg I have read previous posts and now all I can say is WTF :roll: ! DP...BFS...etc why make this so complicated? First of all, n should be always 4 or less for every N in the range (1-10000). You can try to prove this (I did, believe me it's not so hard). Just use a boolean array and 4 nested loops...
Sun Oct 30, 2011 10:55 pm
Forum: Volume 101 (10100-10199)
Topic: 10177 - (2/3/4)-D Sqr/Rects/Cubes/Boxes?
Replies: 10
Views: 5175

### Re: 10177 - (2/3/4)-D Sqr/Rects/Cubes/Boxes?

Sure thing, avoid doubles at all cost. You get Wrong Answer just because of precision error. You don't even add eps, no wonder you got Wrong asnwer.
Sat Oct 29, 2011 9:28 pm
Forum: Volume 102 (10200-10299)
Topic: 10226 - Hardwood Species
Replies: 121
Views: 39981

### Re: 10226 - Hardwood Species

@Imti his output is correct. I am afraid you overlooked an extra space. Just use a structure, sort and binary search. And remember to print a blank line between cases. There are no extra blanks or extra spaces or anything...just take the inputs with gets() and handle doubles carefully. by sazzadcsed...
Thu Oct 27, 2011 11:52 pm
Forum: Volume 114 (11400-11499)
Topic: 11480 - Jimmy's Balls
Replies: 12
Views: 5744

### Re: 11480 - Jimmy's Balls

by kbr_iut » Thu Aug 14, 2008 10:15 am hamedv wrote i think the answer for n is round((n-3)^2/12) if it's spoiler tell me to delete it? i dont think ur method could work.I just wrote and saw the output is simply different when n=100,,I didnt check for other values. Well...that actually works...@kbr...
Thu Oct 20, 2011 7:37 pm
Forum: Volume 102 (10200-10299)
Topic: 10284 - Chessboard in FEN
Replies: 11
Views: 12139

### Re: 10284 - Chessboard in FEN

May be this will help somebody: 8/8/8/8/3b4/8/8/8 8/8/8/8/3B4/8/8/8 8/8/8/8/3r4/8/8/8 8/8/8/8/3R4/8/8/8 8/8/8/8/3q4/8/8/8 8/8/8/8/3Q4/8/8/8 8/8/8/8/3n4/8/8/8 8/8/8/8/3N4/8/8/8 8/8/8/8/3k4/8/8/8 8/8/8/8/3K4/8/8/8 8/8/8/8/3p4/8/8/8 8/8/8/8/3P4/8/8/8 50 50 49 49 36 36 55 55 55 55 61 61 Just handle the ...
Tue Oct 18, 2011 6:19 pm
Forum: Volume 103 (10300-10399)
Topic: 10374 - Election
Replies: 44
Views: 15560

### Re: 10374 - Election

F*** this stupid problem. Not only the input contains leading and trailing spaces, there can be "futile" blank lines throughout the judge data which must be ignored in order to get Accepted. The judge data is SHIT...I request the admins to fix this. This kind of problem teaches you nothing but only ...
Sat Oct 15, 2011 9:41 pm
Forum: Volume 113 (11300-11399)
Topic: 11389 - The Bus Driver Problem
Replies: 10
Views: 7674

### Re: 11389 - The Bus Driver Problem

Code: Select all

``````5 20 5
13 17 19 27 3
55 16 6 26 7
7 18 3
1 2 3 4 5 6 7
12 324 343 121 343 121 121
10 16 4
16 191 17 18 15 14 121 26 8 3
4 18 16 17 14 101 12 3 120 12
0 0 0
``````

Code: Select all

``````445
3861
2344
``````
Fri Oct 14, 2011 11:20 pm
Forum: Volume 116 (11600-11699)
Topic: 11609 - Teams
Replies: 11
Views: 5441

### Re: 11609 - Teams

It's easy to derive this summation formula...after deriving this, why don't you write down all the values of this summation from n = 1 to n = 7 on paper? May be you will notice a pattern. If you do notice a pattern may be you will understand why and how such a pattern exists. Good luck.
Thu Oct 13, 2011 11:10 pm
Forum: Volume 102 (10200-10299)
Topic: 10227 - Forests
Replies: 23
Views: 9322

### Re: 10227 - Forests

I am getting Wrong answer continuously. I can't think of any possible cases for which my code would fail. Can some one please help me and post some input/outputs on the board? Thanks in advance for the help.
Thu Oct 13, 2011 9:13 pm
Forum: Volume 8 (800-899)
Topic: 846 - Steps
Replies: 30
Views: 16675

### Re: 846 - Steps

There is a simpler solution regardless of n being odd/even. First notice that the result only depends on the value of |x - y| regardless of the values of x and y. Now try a few cases with pen and paper and you will soon find out why a formula can be derived using sqrt(|x - y|). Hint: (n * n) = ((n -...
Mon Oct 10, 2011 6:13 pm
Forum: Volume 106 (10600-10699)
Topic: 10683 - The decadary watch
Replies: 35
Views: 13443

### Re: 10683 - The Decadary Watch

Goddamn it.....this thing pissed me off so freaking much....I still don't understand why the following code doesn't get Accepted. Consider this: for (; ;) { gets(str); if (feof(stdin)) break; ..... } This gets a straight wrong answer but If I replace it with: while(gets(str)) { ... } It gets Accepte...
Thu Oct 06, 2011 8:42 pm
Forum: Volume 6 (600-699)
Topic: 641 - Do the Untwist
Replies: 9
Views: 5829

### Re: 641 - Do the Untwist

Guess what I did the same mistake at first. It was only when I finished coding tried the input 5 cs. and got the output czq or sth and I realized I was actually doing it WRONG because I didn't read the problem statement carefully. You did the same mistake. You have to convert the ciphertext back to ...
Mon Oct 03, 2011 2:14 pm
Forum: Volume 102 (10200-10299)
Topic: 10268 - 498-bis
Replies: 51
Views: 18452

### Re: 10268 - 498'

Ok this problem is really very annoying....a couple of tips if you are struggling to get Accepted. This is very important...whatever you do don't use doubles or power functions. I even tried creating my own power functions which always returns integer value(I got accepted with this in other problems...
Tue Sep 27, 2011 9:03 pm
Forum: Volume 112 (11200-11299)
Topic: 11292 - Dragon of Loowater
Replies: 10
Views: 7067

### Re: 11292 - Dragon of Loowater

Damn the input contains negative numbers...beware....I got 4 Wrong Answers because of this. Although I think this is very illogical as n = number of heads and m = number of knights so n and m can't be less than 0. Nevertheless, not all problems should seem to be logical I guess.
Sun Sep 25, 2011 9:27 pm
Forum: Volume 112 (11200-11299)
Topic: 11279 - Keyboard Comparison
Replies: 1
Views: 1870

### Re: 11279 - Keyboard Comparison

Stupid problem. I would really recommend not to waste your time on this shit. Try this input if you're stuck:

Code: Select all

``~`12?><":{}+_)|';\\//&^%\$#@(){}~~~!``

Code: Select all

``129.01 258.38 260.73``