I have algorithm like LittleJohn. My program pass all Waterloo tests.
I know that one test has more then n people.
I tried three ways:
1. read n
for i = 1 to n read human
read line until empty line
2. read integer (n, dummy line)
n = 0
read human; n++; until empty line
3. specification
All ...
Search found 11 matches
- Sat Sep 28, 2002 11:30 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10037 - Bridge
- Replies: 84
- Views: 37499
- Thu Sep 26, 2002 11:40 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31688
- Wed Sep 25, 2002 2:38 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31688
- Wed Sep 25, 2002 11:39 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31688
- Tue Sep 24, 2002 9:58 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31688
Output:
Warning. My program is not ACCEPTED.
Code: Select all
1
1
- Sat Sep 21, 2002 3:33 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31688
- Sat Sep 21, 2002 11:05 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31688
- Sat Sep 21, 2002 11:00 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31688
- Sat Sep 21, 2002 9:57 am
- Forum: Volume 102 (10200-10299)
- Topic: 10212 - The Last Non-zero Digit.
- Replies: 63
- Views: 41319
- Mon Sep 02, 2002 11:45 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31688
- Mon Sep 02, 2002 4:48 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31688
10278 - Fire Station
I solved this problem but I got WA.
I used Dijkstra and set all cities with fire station on 0, others on infinity.
Could you help me? Maybe a trick?
I used Dijkstra and set all cities with fire station on 0, others on infinity.
Could you help me? Maybe a trick?