|
|
Show all threads Hide all threads Show all messages Hide all messages | clarification questions | Radu Berinde | 1378. Artificial Intelligence | 4 Nov 2007 11:15 | 6 | Are the squares axis-aligned (as in the sample) ? I understand the circles are not symmetric, how deformed can they be? can they be tilted ellipses? Why a problem with such unclear requirements? When I solved this problem I had supposed that squares and circles are symmetric. AC. And the squares are axis-aligned right? And are they rectangles or squares (all sides equal) ? My program works for not axis-aligned right squares and also (I hope) for regtangles. But in tests should be only squares (not rectangles). Thanks a lot. I thought squares were only axis-aligned, but I was wrong. More interesting how bad boundary of figure can be. I got Ac tracing the boundary and calculating ratio of maximal and minimal radius with respect to centre which has agregate coordinates divides by number of points. But in test 3 I couldn't make full path around the figure and this is may be only if boundary has very acute angle. I simple stopped here in test 3 and got Ac by accidence. Additional: If bondary acute-then all right, we have triangle,my Ac more proven now. But before I tried to use more adequate criterion (P*P)/S where P- number of boundary points and S- number of all points, but had Wa. Edited by author 04.11.2007 11:59 Edited by author 04.11.2007 13:31 | Problem 1378 "Artificial intelligence" has been rejudged (+) | Sandro (USU) | 1378. Artificial Intelligence | 3 Jan 2007 13:57 | 1 | Some new tests were added. 18 authors lost AC verdict. | Some questions | [AESC USU] Samun_Victor | 1378. Artificial Intelligence | 17 May 2006 20:11 | 6 | Q1. A square can be rotated to some angle (for example, 30 degrees)? Q2. If answer to Q1 NO then: what wrong in my program: ----------------------------------------------------------- program Task; {$APPTYPE CONSOLE} { Task #1378 } var Matrix: array [1..1000,1..1000] of boolean; W, H: integer; i, j: integer; maxX, minX, maxY, minY: integer; S, p: longint; strin: string; begin { Some code :) } <-- it was deleted by me :) end. Edited by author 15.05.2006 21:40 Edited by author 17.05.2006 20:12 (I have WA7 with my code) Of course, it can be rotated. Of course, it can be rotated. Test: 9 9 000100000 001111000 001111110 011111111 111111111 111111110 011111100 000111100 000001000 Answer: square It's right? Edited by author 17.05.2006 20:14Yes. (But in tests there are not so small pictures) Edited by author 16.05.2006 20:18 Big thanks to all of you (Samsonov Alex [USU], Burunduk1), i got AC. I'll delete my code in first message. Edited by author 17.05.2006 20:13 | Somebody knows what is wrong with my program? | Kisenko Vova | 1378. Artificial Intelligence | 13 Feb 2006 20:21 | 1 | My program have WA1,but it's give me a correct answer for a test from task. #include <iostream.h> #include <stdio.h> int main(){ long h,w,j,i=0; double k,s=0,p=0; long ar[110][110]; char c=0; cin >>w >>h; while (i<w*h && c!=EOF) { if (c=='0' || c=='1') {ar[i/w+1][i%w+1]=c-'0';i++;} c=getchar(); } for (i=0;i<=h;i++){ar[i][0]=0;ar[i][w+1]=0;} for (i=0;i<=w;i++){ar[0][i]=0;ar[h+1][i]=0;} for (i=1;i<=h;i++) for (j=1;j<=w;j++) { if (ar[i][j]==1) s++; else continue; if (ar[i-1][j]==0 || ar[i+1][j]==0 || ar[i][j-1]==0 || ar[i][j+1]==0) p++; } p=p+3; k=p*p/s; if (k<13) printf("circle"); else if (k<18) printf("square"); else printf("triangle"); return 0; } Maybe I have some problem with input? P.S Sorry,for my bad english. | admin: please check test 6 | Radu Berinde | 1378. Artificial Intelligence | 15 Jan 2006 21:10 | 1 | I got AC, but I think there's something wrong with thest 6. Apparently it's a triangle, but in the bounding box of the triangle there are 4 (!) separate 0-areas (all of at least 10 pixels). This should not be possible beacuse a triangle can separate at most 3 0-areas inside the bounding box. | admin why circle(in test2) is not simmytrican on his centrel??????? | ACM.Anatoliy 'Tolyan_NO' Tolstobroff | 1378. Artificial Intelligence | 2 Oct 2005 17:05 | 2 | admin why circle(in test2) not simmytrican into centrel???? You sure when test2 correct? Please answer somthink(correct or fixed). |
|
|
|