Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
hoho,AC了In Reply To:今天做题不爽啊,有WA一道,有什么Trick? Posted by:JiangLY at 2005-06-04 00:14:53 > var > m:array[1..6,1..2] of integer; > f:array[1..6] of boolean; > i,j,k:integer; > y:boolean; > begin > while not eof do > begin > for i:=1 to 6 do > begin > readln(m[i,1],m[i,2]); > if m[i,1]>m[i,2] then > begin > k:=m[i,1]; > m[i,1]:=m[i,2]; > m[i,2]:=k; > end; > end; > fillchar(f,sizeof(f),false); > for i:=1 to 6 do > if not f[i] then > for j:=i+1 to 6 do > if not f[j] then > begin > f[i]:=true; > f[j]:=true; > break; > end; > y:=true; > for i:=1 to 6 do > if not f[i] then > begin > y:=false; > break; > end; > if y then writeln('POSSIBLE') > else writeln('IMPOSSIBLE'); > end; > end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator