## Search found 587 matches

Sat Jan 04, 2020 12:17 pm
Forum: Volume 101 (10100-10199)
Topic: 10181 - 15-Puzzle Problem
Replies: 38
Views: 21185

### Re: 10181 - 15-Puzzle Problem

2 6 2 8 4 12 14 1 10 13 15 3 9 11 0 5 7 6 8 4 2 12 14 1 10 13 15 3 9 11 0 5 7 The second test case is quite good because it doesn't depend of the order of direction in which you expand where as the second one does. My AC solution passes the first one but fails the second one but there are solutions...
Sat Jan 04, 2020 12:14 pm
Forum: Volume 101 (10100-10199)
Topic: 10181 - 15-Puzzle Problem
Replies: 38
Views: 21185

### Re: 10181 - 15-Puzzle Problem

2 6 2 8 4 12 14 1 10 13 15 3 9 11 0 5 7 6 8 4 2 12 14 1 10 13 15 3 9 11 0 5 7 The second test case is quite good because it doesn't depend of the order of direction in which you expand where as the second one does. My AC solution passes the first one but fails the second one but there are solutions...
Sat Jul 22, 2017 8:43 pm
Forum: Volume 117 (11700-11799)
Topic: 11790 - Murcia's Skyline
Replies: 28
Views: 14855

### Re: 11790 - Murcia's Skyline(TLE)

suneast wrote: Thu May 20, 2010 4:38 pm u can just asume that N is not larger than 10000
I solved this PRO use O(N^2) BRUTE FORCE...
Mukit Chowdhury wrote: Wed Mar 13, 2013 5:50 pm In this problem array of 1500 elements is enough... no need to check negative number ... My algo is of O(n*n) and Accepted in 0.068 second...
Number of buildings N is at most 1121.
Thu Jul 20, 2017 6:36 pm
Forum: Volume 122 (12200-12299)
Topic: 12210 - A Match Making Problem
Replies: 1
Views: 1250

### Re: 12210 - A Match Making Problem

Input data of fourth case is not correct. Age of bachelor and spinster should be between 2..60. Each of the next B lines contains one integer between 2 and 60 (inclusive) which denotes the age of one bachelor in the community. Each of the next S lines contains one integer between 2 and 60 (inclusive...
Mon Jul 17, 2017 2:06 pm
Forum: Volume 106 (10600-10699)
Topic: 10685 - Nature
Replies: 41
Views: 18943

### Re: 10685 - Nature

Second input (exactly 6, 7, 8, 9, 12, 13, 15, 17 test cases) on uDebug named by "Online Uva judge" is not correct. Because creature's names are listed in one line. But according to problem's description they should be on C lines, where C is number of creatures. Follow C lines with the name...
Sat Jul 15, 2017 2:43 pm
Forum: Volume 3 (300-399)
Topic: 394 - Mapmaker
Replies: 22
Views: 7105

### Re: 394 - Mapmaker

brianfry713 wrote: Sat Nov 05, 2011 2:06 am There are no more than 1000 arrays in the test input.
Number of arrays is not more than 5.
Sat Jul 15, 2017 1:40 pm
Forum: Volume 6 (600-699)
Replies: 14
Views: 10337

Although this is not clearly mentioned in the problem statement, the following is probably true: If there exists one word in the dictionary there can exist several #'s in the input; otherwise, if there exist several words in the dictionary, there exists no more than one # in the judge's input. Why ...
Fri Jun 30, 2017 5:55 am
Forum: Volume 126 (12600-12699)
Topic: 12675 - Hide and seek
Replies: 1
Views: 2078

### Re: 12675 - Hide and seek

Got wa. Need some critical input.

Code: Select all

``````2 2 1
13 11
17 15
1 5 8 13``````
Why for input above udebug(UVa Online Judge's solution) gives output

Code: Select all

``````0
0``````
Two seeking kids see each other. So output should 1 for each kid. Is this bug?

Code: Select all

``````1
1``````
Wed Jun 28, 2017 4:23 pm
Forum: Volume 104 (10400-10499)
Topic: 10447 - Sum-up the Primes (II)
Replies: 10
Views: 5464

### Re: 10447 - Sum-up the Primes (II)

Solved with dp. My previous dp approaches gave me TLE.

Memory : 244*800*12, where 244 = 61 * 4 (4 is maximum frequency).
Time___: 244*800*12, for each block of input.
Wed Jun 28, 2017 4:05 pm
Forum: Volume 103 (10300-10399)
Topic: 10332 - The Absent Minded Professor
Replies: 22
Views: 7070

### Re: 10332 - The Absent Minded Professor

For input

Code: Select all

``````6
1 2 2 3 4 5 6 7 7 8 9 10 11 13 14``````
My acc prog gives

Code: Select all

``0 4 6 11 13 14``
Tue Jun 27, 2017 6:00 pm
Forum: Volume 104 (10400-10499)
Topic: 10419 - Sum-up the Primes
Replies: 51
Views: 18635

### Re: He He

When I made Sumup the primes I intended people to use backtracking with constraints to solve this problem but they got away with more conventional dynamic programming approach so I have made sum up the primes (II) so they have to use backtracking with constraints to solve this problem :wink:, so th...
Tue Jun 27, 2017 5:54 pm
Forum: Volume 105 (10500-10599)
Topic: 10571 - Products
Replies: 27
Views: 10079

### Re: 10571 - Products

Solved 10447 with DP in 0.820.
Fri Apr 28, 2017 11:47 am
Forum: Volume 108 (10800-10899)
Topic: 10819 - Trouble of 13-Dots
Replies: 67
Views: 39221

### Re: 10819 - Trouble of 13-Dots

Now for Jujuedv's test case uDebug gives correct answer 6. Some information that may be relevant for anyone working on this problem: my code passed even though it returned different results for the test input of Morass in uDebug. Concretely the following lines differed: Line 494 -> uDebug 53, Mine 5...
Thu Mar 16, 2017 10:46 am
Forum: Volume 8 (800-899)
Topic: 884 - Factorial Factors
Replies: 49
Views: 28335

### Re: 884 - Factorial Factors

My code accepted in 0.020. My sieve is similar to yours, but it's not bitwise. You can optimize second step. I precalculated all the results without factorization. I calculate it in O(1000000) with only one loop. I used array cnt[1000001], instead of variable cnt. For each N from 2 to 1000000 store ...
Thu Mar 16, 2017 9:34 am
Forum: Volume 101 (10100-10199)