## Search found 587 matches

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

### 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:
**20587**

### 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:
**14472**

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

Number of buildings N is at most 1121.Mukit Chowdhury wrote: ↑Wed Mar 13, 2013 5:50 pmIn 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...

- Thu Jul 20, 2017 6:36 pm
- Forum: Volume 122 (12200-12299)
- Topic: 12210 - A Match Making Problem
- Replies:
**1** - Views:
**1209**

### 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:
**18416**

### 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 names of the c...

- Sat Jul 15, 2017 2:43 pm
- Forum: Volume 3 (300-399)
- Topic: 394 - Mapmaker
- Replies:
**22** - Views:
**6780**

### Re: 394 - Mapmaker

Number of arrays is not more than 5.

- Sat Jul 15, 2017 1:40 pm
- Forum: Volume 6 (600-699)
- Topic: 628 - Passwords
- Replies:
**14** - Views:
**9622**

### Re: 628 - Passwords

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:
**1963**

### Re: 12675 - Hide and seek

Got wa. Need some critical input.
Why for input above udebug(UVa Online Judge's solution) gives output
Two seeking kids see each other. So output should 1 for each kid. Is this bug?

Code: Select all

```
2 2 1
13 11
17 15
1 5 8 13
```

Code: Select all

```
0
0
```

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:
**5366**

### 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.

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:
**6719**

### Re: 10332 - The Absent Minded Professor

For input
My acc prog gives

Code: Select all

```
6
1 2 2 3 4 5 6 7 7 8 9 10 11 13 14
```

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:
**17647**

### 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:
**9723**

### 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:
**37980**

### 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:
**27709**

### 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)
- Topic: 10102 getting Wrong Answer , please help me to solve it
- Replies:
**4** - Views:
**963**

### Re: 10102 getting Wrong Answer , please help me to solve it

If you assume that square field can have size 1000x1000 , then you should also assume that number of cells with color 1 or color 3 can be at most 999999 . But your arrays xo, yo, xt, yt have size only 1000 . You should get RE in this case, but not always. Sometimes you get WA. I checked that size of...