repo.or.cz
/
and.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Adding some more judges, here and there.
[and.git]
/
NEERC
/
garbling
/
tests
/
gen.pas
blob
6293ce43f3d8b87346c8b07d14bbbe039b8cf4a9
1
unit
gen
;
2
3
interface
4
5
procedure
GenRandom
(
r
,
c
,
pl
,
pr
,
seed
:
integer
);
6
7
implementation
8
9
procedure
GenRandom
(
r
,
c
,
pl
,
pr
,
seed
:
integer
);
10
var
11
i
,
j
,
k
:
integer
;
12
begin
13
RandSeed
:=
seed
;
14
Write
(
r
,
' '
,
c
,
' '
);
15
Write
(
1
+
Random
(
9
));
16
for
i
:=
2
to
100
do
17
Write
(
Random
(
10
));
18
WriteLn
;
19
for
i
:=
1
to
r
-
1
do begin
20
for
j
:=
1
to
c
-
1
do begin
21
k
:=
Random
(
100
);
22
if
k
<
pl
then
23
Write
(
'L'
)
24
else if
k
<
pl
+
pr
then
25
Write
(
'R'
)
26
else
27
Write
(
'N'
);
28
end
;
29
WriteLn
;
30
end
;
31
end
;
32
33
end
.