Search found 150 matches

by plamplam
Fri Feb 22, 2013 8:41 am
Forum: Volume 6 (600-699)
Topic: 662 - Fast Food
Replies: 22
Views: 12626

Re: 662 - Fast Food

Input: 15 3 2 3 6 16 36 39 42 44 64 66 79 80 87 93 95 15 2 8 16 19 33 38 45 56 62 71 76 80 84 90 92 93 15 10 1 27 31 42 46 48 56 59 61 62 73 74 79 85 98 15 7 4 6 12 17 31 34 39 43 49 61 65 73 85 93 95 15 8 7 12 19 22 24 28 35 38 41 50 53 65 76 78 80 15 12 2 7 10 12 15 34 37 66 76 81 87 93 94 96 99 1...
by plamplam
Sat Feb 02, 2013 10:45 am
Forum: Volume 6 (600-699)
Topic: 684 - Integral Determinant
Replies: 16
Views: 8111

Re: 684 - Integral Determinant

Some inputs: Hope these help someone 2 1 2 3 4 2 5 2 3 4 3 2 3 5 1 6 7 4 8 9 5 1 9 2 -1 4 -1 5 9 -2 4 -4 -1 -2 -3 -4 3 6 1 9 2 5 9 2 -1 5 2 1 2 3 4 30 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0...
by plamplam
Fri Feb 01, 2013 5:02 pm
Forum: Volume 117 (11700-11799)
Topic: 11755 - Table Tennis
Replies: 3
Views: 2916

Re: 11755 - Table Tennis

Some inputs are provided below. This problem was great but could have been much better if only valid game states were given as input. 25 WWWWWWWWWWWWWWWWWWWW 0.001 0.001 WWWWWWWWWWWWWWWWWW 0.644 0.046 WWWWWWWWWWWWWWWWWW 0.413 0.092 LLLLLLLLLLLLLLLLLLLLL 0.31 0.314 WWWWWLLLLLWWWWWLLLLLWWWWWLLLLLWWWWW...
by plamplam
Sat Dec 15, 2012 6:09 pm
Forum: Volume 101 (10100-10199)
Topic: 10163 - Storage Keepers
Replies: 3
Views: 3844

Re: 10163 - Storage Keepers

Some randomly generated input: 53 5 783 48 798 524 712 46 24 788 658 541 351 456 789 188 695 634 392 715 828 576 902 438 784 502 610 643 633 44 917 922 72 58 18 15 662 481 921 189 385 36 180 191 9 739 318 442 699 442 228 161 56 7 24 581 261 577 537 550 987 72 86 513 975 997 197 912 574 191 55 243 90...
by plamplam
Thu Nov 22, 2012 2:09 am
Forum: Volume 115 (11500-11599)
Topic: 11539 - Another Word Game
Replies: 6
Views: 3481

Re: 11539 - Another new game

I didn't use trie, but used hashing instead. Got Accepted in 1.4 seconds. However, there is something wrong with the judging of this problem. I coded in C and I tried several times but whenever I submitted in ANSI C I got TLE. But the same code gets AC in C++ in less than 2 seconds. I tested this se...
by plamplam
Sun Sep 23, 2012 8:52 am
Forum: Volume 118 (11800-11899)
Topic: 11813 - Shopping
Replies: 6
Views: 2783

Re: 11813:Shopping

I got AC after running Dijkstra S (S = number of shopping malls) times, and then applied n^2 * 2^n bitmasking TSP in 2.28 seconds
by plamplam
Tue Sep 11, 2012 6:21 pm
Forum: Volume 121 (12100-12199)
Topic: 12134 - Find the Format String
Replies: 4
Views: 5272

12134 - Find the Format String

It seemed like a simple problem at first glance, but it contained a lot of traps. I'm getting wrong answer, I can't think of any other tricky cases other than this, so a little help would be appreciated. Here are the i/o I used to test my program. 5 "11" "11" "243" &quo...
by plamplam
Tue Sep 11, 2012 5:32 pm
Forum: Volume 102 (10200-10299)
Topic: 10246 - Asterix and Obelix
Replies: 29
Views: 13236

Re: 10246 - Asterix and Obelix

Some test cases 8 25 5 0 3 48 7 48 2 24 22 5 7 17 5 4 30 3 7 2 6 5 31 1 3 25 5 8 33 1 8 34 7 8 0 2 7 31 6 3 40 4 3 33 2 5 49 1 5 48 4 2 31 7 6 34 3 2 25 8 6 7 7 1 45 8 2 38 1 2 16 7 4 24 1 6 18 6 2 25 3 8 8 1 4 7 7 2 5 2 3 5 3 4 1 4 30 400 50 5 33 36 49 21 0 49 37 18 37 28 43 11 17 5 45 16 31 22 36 ...
by plamplam
Fri Sep 07, 2012 11:36 am
Forum: Volume 116 (11600-11699)
Topic: 11659 - Informants
Replies: 31
Views: 12256

Re: 11659 - Informants

Some test cases: 19 3 12 -10 16 -4 9 11 2 6 1 -1 2 2 2 -1 2 1 1 2 2 -1 3 5 1 -3 2 1 2 -3 3 3 1 -2 5 8 3 5 5 -5 2 -1 4 2 3 2 4 -3 5 -1 2 5 11 5 11 8 6 8 4 -11 3 -1 9 1 11 1 5 -6 10 10 4 -2 1 4 6 -2 7 -5 9 -7 8 -2 10 4 9 -8 6 5 8 -4 6 9 3 -4 3 5 2 -2 1 2 1 3 4 -3 2 5 1 -4 4 4 3 5 3 1 1 3 3 3 3 -2 2 1 ...
by plamplam
Mon Aug 27, 2012 4:06 pm
Forum: Volume 6 (600-699)
Topic: 652 - Eight
Replies: 22
Views: 10489

Re: 652 - Eight

Beware this problem contains unnecessary blanks in between inputs. Be sure to handle them properly. I used something like while gets() and checked for a valid character, if so then break and continue to the next case.
by plamplam
Fri Jul 27, 2012 10:50 pm
Forum: Volume 12 (1200-1299)
Topic: 1229 - Sub-dictionary
Replies: 17
Views: 10960

Re: 1229 - Sub-dictionary (Why WA)

I'm getting wrong answer, what is the output for the test case? The problem is ambigous...it doesn't clearly state what should be the output when multiple solutions exists.

Code: Select all

9
d e
e f
f d
a b
b c
c a
g h
h i
i g
0
by plamplam
Wed Jul 25, 2012 7:33 pm
Forum: Volume 124 (12400-12499)
Topic: 12472 - Binary Substring
Replies: 0
Views: 1310

12472 - Binary Substring

Some random i/o for this problem. 25 19017 22632 39 17314 19968 15 26675 29789 33 21571 23337 47 5928 21600 10 9514 15151 9 2473 10692 74 6111 9387 17 9335 17434 99 11023 11914 80 11327 23201 90 8538 15700 67 4974 28510 2 13561 20572 52 18868 24720 96 5273 16062 73 9662 17255 40 1056 22874 24 712 17...
by plamplam
Tue Jun 19, 2012 1:38 am
Forum: Volume 108 (10800-10899)
Topic: 10891 - Game of Sum
Replies: 33
Views: 16792

Re: 10891 - Game of Sum

Why do you need 3 states? Can be easily solved with 2....nvm ac is ac.
But yeah quite awesome problem....enjoyed solving it 10891 FTW :)
by plamplam
Sun Jun 17, 2012 2:09 pm
Forum: Volume 100 (10000-10099)
Topic: 10003 - Cutting Sticks
Replies: 59
Views: 34888

Re: 10003 - Cutting Sticks

Try to find a O(n*n) algorithm...O(n*n*l) fails.
by plamplam
Thu Jun 14, 2012 2:22 am
Forum: Volume 102 (10200-10299)
Topic: 10277 - Boastin' Red Socks
Replies: 8
Views: 5927

Re: 10277 - Boastin' Red Socks

I solved it with almost the same method described by Shafaet_DU although I was not that unlucky to get a lot of wrong answers, but no need to calculate the gcd and divide it to avoid overflow. Use binary search to solve the quadratic equation. Instead of an equation consisting of R and B, I think th...

Go to advanced search