Show all threads Hide all threads Show all messages Hide all messages | this test helps with WA6 | So Sui Ming | 1377. Lara Croft | 10 Jan 2024 09:50 | 1 | | WA 4 | andreyDagger | 1377. Lara Croft | 14 Oct 2021 08:44 | 1 | WA 4 andreyDagger 14 Oct 2021 08:44 Try this: 3 3 2 2 3 3 answer: 4 | Please, give me some test. I have #WA_4. | Tkach Andriy | 1377. Lara Croft | 7 Apr 2015 15:35 | 4 | Here are some tests: 5 6 1 1 1 2 Answer: 1 5 6 1 2 2 6 Answer: 5 5 6 1 5 2 6 Answer: 2 5 6 1 5 1 2 Answer: 3 (Here I think you may have WA, because second point occur first) 5 6 2 3 3 3 Answer: 9 Good Luck!!! My prog passes all of this test but still wa4.why? Test 4 contains (1,1) as second point imho. | Some In & Out | † Ленин † [Yaroslavl SU] | 1377. Lara Croft | 15 Nov 2012 02:15 | 4 | Here some data that helps me to find a bug. 0) 4 4 1 1 3 2 - 15 1) 4 5 1 1 3 2 - 19 2) 5 4 1 1 3 2 - 19 3) 5 5 1 1 3 3 - 24 4) 3 1 1 1 3 1 - 2 5) 1 3 1 1 1 3 - 2 Give some comments plz if it helped you. =) Good luck! All your tests are working. But I'm always getting WA4... What may it be? :'( | I have WA5. Please check my tests | <-UnderFelixAbove-> | 1377. Lara Croft | 9 Oct 2012 08:46 | 5 | I don't know what problem in my program. That's why I ask you to check my tests: 100 100 1 1 50 50 9996 100 100 5 3 65 34 7783 5 6 1 1 5 6 9 2 2 1 2 2 1 1 5 5 1 1 3 3 24 I am waiting your comments. Thank you. Hello! The answer for this test: 2 2 1 2 2 1 is "2", but your answer is "1". Good luck! Thank you Master! I'm so careless)). Btw, in test #5 N = M = 100. I made inaccurate array definition and get this information. :) My program didn't pass #5 test, because not correctly process the case when N = 2, M > 2 or M = 2, N > 2. | help test#2 | Ferman | 1377. Lara Croft | 12 May 2008 22:06 | 2 | why time limit 2 please give test#2 In that test first gold in cell 1,1 try for example 5 5 1 1 3 3 | My program is working for all tests ,BUT ACM don't like it... | gz | 1377. Lara Croft | 24 Nov 2006 19:32 | 2 | If you will find any mistakes in my program please tell me about it..(Sorry for my bad English.) Thank you. program Kroft; {$APPTYPE CONSOLE} uses SysUtils; var n,m,x,y,x1,y1,i:byte; a:array of array of char; found:boolean=false; count:integer; procedure find; var ac:boolean; i,j,k,l,f,d,index,index2,c:byte; begin c:=0; ac:=false; i:=0; j:=m-1; f:=n-1; d:=0; repeat for k:=i to j do begin if ac and (a[i,k]<>'x') then inc(count); if a[i,k]='x' then if c=0 then begin inc(count); inc(c); a[i,k]:=#0; ac:=true; end else begin found:=true; exit; end; end; dec(k); inc(i); for l:=i to f do begin if ac and (a[l,k]<>'x')then inc(count); if a[l,k]='x' then if c=0 then begin inc(count); inc(c); a[l,k]:=#0; ac:=true; end else begin found:=true; exit; end; end; for index:=j-1 downto d do begin if ac and (a[f,index]<>'x')then inc(count); if a[f,index]='x' then if c=0 then begin a[f,index]:=#0; inc(count); ac:=true; inc(c); end else begin found:=true; exit; end; end; for index2:=f-1 downto i do begin if ac and (a[index2,d]<>'x') then inc(count); if a[index2,d]='x' then if c=0 then begin inc(count); a[index2,d]:=#0; ac:=true; inc(c); end else begin found:=true; exit; end; end; dec(j); dec(f); inc(d); until found; end; begin readln(n,m); readln(x,y); readln(x1,y1); setlength(a,n); x:=x-1; y:=y-1; x1:=x1-1; y1:=y1-1; for i:=0 to (n-1) do setlength(a[i],m); a[x,y]:='x'; a[x1,y1]:='x'; find; write(count); end. Give your mail, please, and I'll try to help you. Edited by author 24.11.2006 19:44 | Please Give me some tests. I Have WA #6 Why I Don understand =((( | тестер | 1377. Lara Croft | 29 Sep 2006 23:24 | 1 | | Why I have WA???I know my program is true!!! | Chalyh Alexander | 1377. Lara Croft | 6 Apr 2006 10:34 | 1 | program LARACROWT; Var a:array[1..100,1..100] of longint; n,m,j,i,k,max: Longint; x1,y1,x2,y2 : Longint; {-------------------------------------------------------} procedure init; begin readln(n,m); readln(x1,y1); readln(x2,y2); end; {-------------------------------------------------------} procedure print; begin writeln(abs(a[x1,y1]-a[x2,y2]));halt; halt; end; {-------------------------------------------------------} procedure solve; var q1,q2,q3,q4:longint; w1,w2,w3,w4:longint; begin w1:=1;q1:=1;w2:=1;q2:=n;w3:=1;q3:=n;w4:=1;q4:=1; repeat for i:=w1 to n-w1+1 do begin inc(max);a[q1,i]:=max; if max=n*n then print; end;inc(w1);inc(q1); for i:=w2+1 to n-w2+1 do begin inc(max);a[i,q2]:=max; if max=n*n then print; end;inc(w2);dec(q2); for i:=n-w3 downto w3 do begin inc(max);a[q3,i]:=max; if max=n*n then print; end;inc(w3);dec(q3); for i:=n-w4 downto w4+1 do begin inc(max);a[i,q4]:=max; if max=n*n then print; end;inc(w4);inc(q4); until max=n*n; end; {-------------------------------------------------------} BEGIN init; solve; print; END. | test | matkir_ssau | 1377. Lara Croft | 28 Sep 2005 23:35 | 1 | test matkir_ssau 28 Sep 2005 23:35 | Why Compilation Error ???????????????????? | --AESC USU-- Куделевский Женя | 1377. Lara Croft | 19 Sep 2005 19:56 | 3 | int pole[100][100]; int main() { int mx1,my1,mx2,my2,l,flag; l=0; flag= 0; int n,m; scanf("%d %d",&m,&n); scanf("%d %d",&mx1,&my1); scanf("%d %d",&mx2,&my2); pole[mx1][my1] = pole[mx2][my2] = 2; int i; for(i=0;i<=n+1;i++) { pole[0][i] = pole[m+1][i] = 1; } for(i=0;i<=m+1;i++) { pole[i][0] = pole[i][n+1] = 1; } int x=1,y=1,dx=0,dy=1; if(pole[x][y]==2) flag = 1; pole[x][y] = 1; while(1) { if(pole[x+dx][y+dy]!=1) { x+=dx; y+=dy; if(pole[x][y]==2) { if(flag) { printf("%d",l+1); return(0); } else { flag = 1; l=0; } } else l++; pole[x][y] = 1; } else { if(dy==1) { dy=0; dx=1; } else if(dx==1) { dx=0; dy=-1; } else if(dy==-1) { dy=0; dx=-1; } else if(dx==-1) { dx=0; dy=1; } } } return(0); } |
|
|