Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

水过90,附代码(pascal)

Posted by wy54224 at 2011-02-16 19:36:20 on Problem 3750
var f,s,w,t,n,i,j,code:integer;
    a:array[1..65]of boolean;
    b:array[1..64,1..15]of char;
    c:array[1..15]of integer;
    sb,s1:string;
begin
readln(n);
for i:=1 to n do
begin
readln(sb);
c[i]:=length(sb);
for j:=1 to c[i] do b[i,j]:=sb[j];
end;
readln(sb);
t:=pos(',',sb);
s1:=copy(sb,1,t-1);
val(s1,w,code);
delete(sb,1,t);
val(sb,s,code);
for i:=1 to n do a[i]:=false;
f:=0;t:=w-1;j:=0;
repeat
inc(t);
if t=n+1 then t:=1;
if a[t]=false then inc(j);
if j=s then
begin
 j:=0;
 inc(f);
 for i:=1 to c[t] do write(b[t,i]);
 writeln;
 a[t]:=true;
end;
until f=n;
end.

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator