Search found 62 matches
- Mon Sep 30, 2002 5:53 pm
- Forum: Pascal
- Topic: input problem
- Replies: 12
- Views: 13070
there are two ways: the first, which i used, is: readln(input,count); while (count>0) do begin readln(input); {read blank space} .... {read input like usual problem} count:=count-1; end. or you can also use this: readln(input,temp); while not eof(input) do begin readln(input); {read blank space} ......
- Sun Sep 29, 2002 2:50 pm
- Forum: Volume 6 (600-699)
- Topic: 603 - Parking Lot
- Replies: 11
- Views: 5414
i can't find anything wrong with your program, it produce the same output with my AC program for any test case i've tried. Maybe the problem is from reading the input? And will there be more than 1 car waiting for one car park? If yes, my programme can't solve the problem. no, there won't be such ca...
- Sun Sep 29, 2002 2:25 pm
- Forum: Pascal
- Topic: input problem
- Replies: 12
- Views: 13070
- Sun Sep 29, 2002 1:42 pm
- Forum: Pascal
- Topic: input problem
- Replies: 12
- Views: 13070
Just use input as the file for the keyboard, and output as the file for the console, and do not try to open or close them. btw, just want to add that we still can open/close that special input/output file and direct them to standard input/output by using '' as parameter. for example: [pascal] assig...
- Sat Sep 28, 2002 1:58 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10356 - Rough Roads
- Replies: 29
- Views: 16004
hi,
i think it's not the problem with FPC, it's just that the input data is badly formatted. Instead of readln, i use read, and i get AC using Pascal
so the input could be like this:
i think it's not the problem with FPC, it's just that the input data is badly formatted. Instead of readln, i use read, and i get AC using Pascal

so the input could be like this:
Code: Select all
3 3
0 1
10 0 2 10
1
2
10
- Fri Sep 27, 2002 1:17 pm
- Forum: Volume 100 (10000-10099)
- Topic: 10038 - Jolly Jumpers
- Replies: 445
- Views: 93378
Why do you have to sort it? You only have to check the _absolute difference_ between the current number and its pred. If it match the required condition then it's a jolly, else it's not a jolly jumper. Be careful, i've got WA for several times too because i misunderstand the problem. I hope you don'...
- Fri Sep 27, 2002 1:17 am
- Forum: Volume 6 (600-699)
- Topic: 623 - 500!
- Replies: 187
- Views: 48569
- Fri Sep 27, 2002 1:11 am
- Forum: Volume 8 (800-899)
- Topic: 808 - Bee Breeding
- Replies: 19
- Views: 11095
i guess no cell number > 10000, although 10000 will occur.
maybe you can try this:
answer is:
good luck 
maybe you can try this:
Code: Select all
1 10000
10000 5
9999 10000
10000 10000
Code: Select all
58
58
1
0

- Thu Sep 26, 2002 5:00 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 22480
- Thu Sep 26, 2002 11:42 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 22480
hi even, first, thank you so much for your help according to your hint, i change my algo to the following, please tell me where i go wrong... min = inf, nmin = -1 for all intersect i do for all intersect j do if no firestation in intersection j and distance[i,j]<min then nmin = j min = distance[i,j]...
- Thu Sep 26, 2002 2:14 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 22480
so i have to find the intersection which have the most/average shortest path to another intersection? from the matrix, can i just sum the total distance of every intersection to other intersection and find the minimum? for the previous test case, my floydd matrix is: 0 10 20 20 10 0 10 10 20 10 0 20...
- Wed Sep 25, 2002 7:01 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10365 - Blocks
- Replies: 7
- Views: 4435
i think you misunderstood the problem :) first, 5 is the number of test case... 2nd, for 10 blocks, the possible arrangement is 1*1*10 or 1*2*5. that goes to 26 blocks, which have possible arrangement of 1*1*26 or 1*2*13. For 27 blocks, the possible arrangement is 1*1*27, 1*3*9, and 3*3*3. For each ...
- Wed Sep 25, 2002 6:15 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 22480
- Wed Sep 25, 2002 10:25 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 22480
output is
is it correct?
Code: Select all
1
1
1
2
- Wed Sep 25, 2002 1:46 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 22480
hmmm, same as mine... i still got WA too.. i have test the judge input using halt() (pascal), and it looks like there's an input when there's already one or more firestation in every intersection. So i think i have to find how to solve that case, but how :-? some of my though: 1. put the firestation...