Code: Select all

```
1
3 3
0 1 1.00
0 2 1.00
0 3 1.00
3
1 2.01
2 2.01
3 2.01
```

Code: Select all

```
Daniel can save $0.03
```

- Thu Feb 14, 2013 4:26 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11284 - Shopping Trip
- Replies:
**32** - Views:
**13506**

You haven't solved the coming home problem:

Code: Select all

```
1
3 3
0 1 1.00
0 2 1.00
0 3 1.00
3
1 2.01
2 2.01
3 2.01
```

Code: Select all

```
Daniel can save $0.03
```

- Wed Feb 13, 2013 6:25 pm
- Forum: Volume 112 (11200-11299)
- Topic: 11284 - Shopping Trip
- Replies:
**32** - Views:
**13506**

@AKJ88: try this input:
The output should be:

Code: Select all

```
1
2 3
0 1 1.00
0 2 1.00
2 3 10.00
2
1 2.01
2 2.01
```

Code: Select all

```
Daniel can save $0.02
```

- Fri May 20, 2011 12:06 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10083 - Division
- Replies:
**12** - Views:
**5703**

zoranh's order is not correct.

The first thing to check should be : if the denominator is zero (t == 1).

There is no test case where t,a,b is less than 1, so no need to check for a == 0 or b == 0.

The first thing to check should be : if the denominator is zero (t == 1).

There is no test case where t,a,b is less than 1, so no need to check for a == 0 or b == 0.

- Wed Feb 11, 2009 6:06 am
- Forum: Volume 9 (900-999)
- Topic: 977 - Old West Rumours
- Replies:
**2** - Views:
**2491**

Consider this input: 3 2 1 1 1 0 1 10 1 2 10 So: Town 0 will hear the gossip in hour 0. Town 1 will hear the gossip in hour 10. Town 2 will hear the gossip in hour 20. Regardless of which town Billy visit, is that true? Suppose that Billy starts from Town 0, clear the gossip in 1 hour, then arrived ...

- Tue Feb 10, 2009 12:28 pm
- Forum: Volume 9 (900-999)
- Topic: 977 - Old West Rumours
- Replies:
**2** - Views:
**2491**

Questions: 1. Billy starts from town 0, but where does the rumor starts from? 2. If the rumor starts from town 0, then Billy arrived at town 0 the same time as the rumor, so Billy saved only 1 town and the rumor stopped? 3. It seemed no 2 is incorrect since the sample output says Billy can save 4 to...

- Thu Dec 11, 2008 1:41 pm
- Forum: Bugs and suggestions
- Topic: You are not authorised to view this resource.
- Replies:
**10** - Views:
**10323**

Are you guys using this url to look at other people statistics: http://icpcres.ecs.baylor.edu/onlinejudge/index.php?option=com_onlinejudge&page=show_authorstats&userid=339 I also get the same message here but the strange thing is that my tool can still access the page and read the statistics! http:/...

- Wed Jan 30, 2008 2:59 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11393 - Tri-Isomorphism
- Replies:
**6** - Views:
**2673**

- Wed Jan 30, 2008 4:09 am
- Forum: Volume 113 (11300-11399)
- Topic: 11393 - Tri-Isomorphism
- Replies:
**6** - Views:
**2673**

- Sun Jan 27, 2008 2:40 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11392 - Binary*3 Type Multiple
- Replies:
**14** - Views:
**4832**

First of all it suffices to look at the numbers 3,33,333, 3333 etc., since any number ending in some number of 0s can be expressed as the difference of two of these numbers with no 0s, ie. 333 - 33 = 300. Hint: If you start marking the remainders you get mod K from this sequence, what happens when ...

- Sun Jan 27, 2008 1:58 pm
- Forum: Volume 113 (11300-11399)
- Topic: 11392 - Binary*3 Type Multiple
- Replies:
**14** - Views:
**4832**

The problem is to find (a,b) such that 0<=a<=b and 10^b+10^(b-1)+...+10^a is divisible k. This could be done by O(n) algorithm. My algo is O(L + K) where L is the length of the multiple in the output. K iteration is needed to initalize the array. I use GCD in each iteration of L. I got TLE. How to ...

- Sun Jan 27, 2008 7:41 am
- Forum: Volume 113 (11300-11399)
- Topic: 11392 - Binary*3 Type Multiple
- Replies:
**14** - Views:
**4832**

Can somebody check whether my output is correct? Or is there any tricky input? Input: 1 2 3 4 5 6 7 8 9 10 11 12 13 236773 42610 207363 428950 718729 958356 227092 63702 922718 84511 298077 803248 249764 882133 249776 858939 723076 244080 954760 335073 Output: 1 1 0 2 1 1 1 1 0 3 1 2 2 1 1 2 1 1 6 6...

- Mon Apr 09, 2007 6:14 pm
- Forum: Volume 110 (11000-11099)
- Topic: 11042 - Complex, difficult and complicated
- Replies:
**20** - Views:
**13459**

- Mon Mar 05, 2007 12:47 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10234 - Frequent Substrings
- Replies:
**25** - Views:
**8775**

I always got PE for this problem...

what is the output for this:

what is the output for this:

Code: Select all

```
In theory, there is no difference between theory and practice, but in practice, there is.
2
4
9
2
4
9
In theory, there is no difference between theory and practice, but in practice, there is.
2
4
9
```

- Mon Mar 05, 2007 12:14 pm
- Forum: Bugs and suggestions
- Topic: 10017 wrong sample output
- Replies:
**4** - Views:
**2771**

- Thu Mar 01, 2007 6:20 pm
- Forum: Volume 111 (11100-11199)
- Topic: 11183 - Teen Girl Squad
- Replies:
**28** - Views:
**12832**

It would not be much harder. The trick is to do the compression using Union/Find. Then you don't even need to change the graph. After you compress, whenever you see an edge (u, v), you simply treat it as an edge (Find(u), Find(v)). IMHO, using union/find does not keep the graph unchanged since to c...