I got WA many time. I checked my program using the data I found in http://plg.uwaterloo.ca/~acm00/, and it was right.
Who can tell my program's bug? Thanks.
[pascal]
const
maxn = 10010;
var
f,g : array[0 .. maxn] of boolean;
pre : array[0 .. maxn] of integer;
w : array[1 .. 210] of integer ...
Search found 19 matches
- Sun Oct 20, 2002 9:07 am
- Forum: Volume 102 (10200-10299)
- Topic: 10261 - Ferry Loading
- Replies: 41
- Views: 26931
- Tue Sep 24, 2002 1:53 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10358 - Matrix
- Replies: 9
- Views: 4351
- Fri Sep 20, 2002 5:19 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10358 - Matrix
- Replies: 9
- Views: 4351
10358 - Matrix
Can I solve it like this :
First calc both "my" and agents' min-dist to all the girds from own position, then compare the dist. If "mine" is shorter than two agents', "I" can escape. Otherwise, "I" may be eliminated or trapped in the Matrix.
I think it may be right. But it got WA.
First calc both "my" and agents' min-dist to all the girds from own position, then compare the dist. If "mine" is shorter than two agents', "I" can escape. Otherwise, "I" may be eliminated or trapped in the Matrix.
I think it may be right. But it got WA.
- Wed Aug 07, 2002 4:43 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10261 - Ferry Loading
- Replies: 41
- Views: 26931
- Sun Aug 04, 2002 3:34 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10340 - All in All
- Replies: 129
- Views: 50722
- Sun Aug 04, 2002 11:53 am
- Forum: Volume 103 (10300-10399)
- Topic: 10340 - All in All
- Replies: 129
- Views: 50722
10340
I think my program is no problem. But it got runtime error.
[pascal]
const
name1 = '';
name2 = '';
maxn = 10000;
var
s,t : array[1 .. maxn] of char;
ls,lt : integer;
procedure init;
var w : char;
begin
ls := 0; lt := 0;
fillchar(s, sizeof(s), 0);
fillchar(t, sizeof(t), 0);
read(w ...
[pascal]
const
name1 = '';
name2 = '';
maxn = 10000;
var
s,t : array[1 .. maxn] of char;
ls,lt : integer;
procedure init;
var w : char;
begin
ls := 0; lt := 0;
fillchar(s, sizeof(s), 0);
fillchar(t, sizeof(t), 0);
read(w ...
- Wed Jul 31, 2002 12:11 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10338 - Mischievous Children
- Replies: 56
- Views: 31397
- Wed Jul 31, 2002 5:27 am
- Forum: Volume 103 (10300-10399)
- Topic: 10338 - Mischievous Children
- Replies: 56
- Views: 31397
- Tue Jul 30, 2002 4:21 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10338 - Mischievous Children
- Replies: 56
- Views: 31397
10338 WA
I think my algorith is right. But it got WA. Maybe i have some input mistakes.
[pascal]
const
name1 = '';
name2 = '';
maxn = 22;
var
cp,w : array[1 .. maxn] of integer;
ck : array[1 .. maxn] of boolean;
n,l,p : integer;
st : string[maxn];
procedure init;
begin
readln(st);
l := length(st ...
[pascal]
const
name1 = '';
name2 = '';
maxn = 22;
var
cp,w : array[1 .. maxn] of integer;
ck : array[1 .. maxn] of boolean;
n,l,p : integer;
st : string[maxn];
procedure init;
begin
readln(st);
l := length(st ...
- Mon Jul 29, 2002 3:49 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10308 - Roads in the North
- Replies: 30
- Views: 13375
10308
It says "The villages are numbered from 1."
Does it mean the villages are numberd 1, 2, 3, 4, ..., n, when the number of village is n.
Does it mean the villages are numberd 1, 2, 3, 4, ..., n, when the number of village is n.
- Mon Jul 29, 2002 2:21 pm
- Forum: Volume 102 (10200-10299)
- Topic: 10288 - Coupons
- Replies: 8
- Views: 4368
- Sat Jul 27, 2002 10:01 am
- Forum: Pascal
- Topic: Problem about RedhatLinux 7.1 + fpc1.0.6 + rhide1.4.9?
- Replies: 0
- Views: 2091
Problem about RedhatLinux 7.1 + fpc1.0.6 + rhide1.4.9?
When i compile my program, everything is ok. But when i make the executable file, it didn't work. It just generated a file named ppas.sh. So I can't continue. Why?
- Fri Jul 26, 2002 9:49 am
- Forum: Volume 103 (10300-10399)
- Topic: 10311 - Goldbach and Euler
- Replies: 98
- Views: 33718
- Thu Jul 25, 2002 5:39 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10311 - Goldbach and Euler
- Replies: 98
- Views: 33718
- Thu Jul 25, 2002 3:09 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10311 - Goldbach and Euler
- Replies: 98
- Views: 33718