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 ...
Search found 62 matches
- Sun Sep 29, 2002 2:50 pm
- Forum: Volume 6 (600-699)
- Topic: 603 - Parking Lot
- Replies: 11
- Views: 6558
- Sun Sep 29, 2002 2:25 pm
- Forum: Pascal
- Topic: input problem
- Replies: 12
- Views: 15528
- Sun Sep 29, 2002 1:42 pm
- Forum: Pascal
- Topic: input problem
- Replies: 12
- Views: 15528
- Sat Sep 28, 2002 1:58 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10356 - Rough Roads
- Replies: 29
- Views: 19827
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: 152665
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 ...
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: 71583
- Fri Sep 27, 2002 1:11 am
- Forum: Volume 8 (800-899)
- Topic: 808 - Bee Breeding
- Replies: 19
- Views: 13330
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: 31722
- Thu Sep 26, 2002 11:42 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31722
- Thu Sep 26, 2002 2:14 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31722
- Wed Sep 25, 2002 7:01 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10365 - Blocks
- Replies: 7
- Views: 5223
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 ...
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: 31722
- Wed Sep 25, 2002 10:25 am
- Forum: Volume 102 (10200-10299)
- Topic: 10278 - Fire Station
- Replies: 59
- Views: 31722
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: 31722