Show all threads Hide all threads Show all messages Hide all messages | WA #2 | Rouk | 1304. Parallelepiped | 19 Aug 2012 04:20 | 2 | WA #2 Rouk 19 Aug 2012 00:07 | What's the answer to this test? | Failed Peter | 1304. Parallelepiped | 11 Jul 2009 00:02 | 4 | 5.0 5.0 5.0 10 0.5 0.5 5.0 1.0 0.5 5.0 1.0 1.0 5.0 1.0 1.5 4.0 1.5 1.0 3.0 2.0 1.0 3.0 2.0 1.5 1.0 2.0 2.0 2.0 1.0 2.0 5.0 1.5 2.0 3.0 As for me, I don't know. bye. Hello, I am you after 5 years. You are stupid looser. Bye. My AC-program writes 75.00 | Probably useful tests | Slobodan | 1304. Parallelepiped | 14 Jun 2008 05:25 | 2 | 10 10 9 2 4 5 1 6 4 6 = 500 10 6 8 2 5 3 6 7 3 0 = 360 Edited by author 17.06.2008 15:42 These test are indeed usefull, and I believe that many will thank you for shareing. edit: The rest of the post was because of a typing error, but I left the result coordinates. Maybe they will be usefull for someone... I get the answer 360, coresponding to the paralelepiped between (0,0,0) and (10,6,6). Edited by author 17.06.2008 16:19 | WA(5) | xurshid_n | 1304. Parallelepiped | 8 Jun 2007 16:24 | 3 | WA(5) xurshid_n 1 Jun 2006 16:06 why WA in Test5? is my program correct? Please, help me!! my adress: xujand000@rambler.ru [code deleted] Edited by moderator 01.06.2006 16:07 Re: WA(5) ACM.Tolstobrov_Anatoliy[Ivanovo SPU] 28 Jun 2006 19:40 Try this test 1 1 1 1 1 12 123 correct answer 1 I too much time not understand why i get WA5. i wish you good luck. Thanks. I had the same mistake. | Why this problem is locked ? (-) | Chmel_Tolstiy | 1304. Parallelepiped | 7 Jun 2007 23:08 | 2 | | What is Test 6???? | xurshid_n | 1304. Parallelepiped | 4 Jul 2006 11:34 | 1 | What is Test 6?, My program always WA in Test 6! | WA(Test 6)?? | xurshid_n | 1304. Parallelepiped | 4 Jul 2006 11:23 | 1 | why WA in Test6? is my program correct? Please, help me!! my adress: xujand000@rambler.ru [code deleted] Edited by moderator 05.07.2006 21:27 | I can't understand the meaning of "parallel to the datume lines" in the first sentance . | XueMao | 1304. Parallelepiped | 19 Mar 2006 21:08 | 6 | The first sentance is : Two opposite vertices of the parallelepiped A with the edges parallel to the datume lines, have coordinates (0, 0, 0) and (u, v, w) correspondingly . What does the "parallel to the datume lines" mean ? what is datume lines ? as judged by russian text, "datume lines" must means "axis of coordinates" ("axles of coordinates") in another words: (AB||oX)or(AB||oY)or(AB||oZ) - true for any edge AB. (AB||oX)or(AB||oY)or(AB||oZ)~(AB||{1;0;0})or(AB||{0;1;0})or(AB||{0;0;1}) || - parallel Edited by author 08.03.2006 14:01 WA5 many times. Var X,Y,Z:Array[0..51]of DoubLe; ii,jj,i,j,n:LongInt; Ans,Ans1:DoubLe; Procedure SWEP(Var a,b:DoubLe); Var tmp:DoubLe; Begin tmp:=a;a:=b; b:=tmp; End; Procedure Crash; Begin i:=0; i:=5 Div i; End; Procedure Go(x1,y1,x2,y2:DoubLe); Var i:LongInt; Last,S:DoubLe; Begin If x2<=x1 Then Crash; If y2<=y1 Then Crash; S:=(x2-x1)*(y2-y1); If S*Z[n]<=Ans Then Exit; Last:=0; For i:=1 To N Do If (X[i]>x1)And(X[i]<x2)And(Y[i]>y1)And(Y[i]<y2) Then Begin If Ans<S*(Z[i]-Last) Then Ans:=S*(Z[i]-Last); Last:=Z[i]; If S*(Z[n]-Last)<=Ans Then Exit; End; If Ans<S*(Z[N]-Last) Then Ans:=S*(Z[N]-Last); End; Begin ReadLn(X[0],Y[0],Z[0]); ReadLn(N); If n=0 Then Crash; If N>50 Then Crash; For i:=1 To N Do ReadLn(X[i],Y[i],Z[i]); Inc(N); X[n]:=0;Y[n]:=0;Z[n]:=0; For i:=0 To N-1 Do For j:=i+1 To N Do If Z[i]>Z[j] Then Begin SWEP(X[i],X[j]); SWEP(Y[i],Y[j]); SWEP(Z[i],Z[j]); End; Ans:=0; For i:=0 To N Do For j:=0 To N Do For ii:=0 To N Do If X[ii]>X[i] Then For jj:=0 To N Do If Y[jj]>Y[j] Then Go(X[i],Y[j],X[ii],Y[jj]); Write(Ans:2:2); End. Please give hints or tests. | 1304 | vnikulin | 1304. Parallelepiped | 29 Oct 2005 00:51 | 4 | 1304 vnikulin 26 Oct 2005 23:05 Hello! In the description of the input data written: The number n is written without a decimal point. All other numbers are written with not more than two digits after a decimal point (if a number is integer a decimal point may be omitted). All the input numbers are non-negative not greater than 1000. But in the tests (for example, test N7) there are number with more then 2 digits after a decimal point. Please, make the tests correct, or change the problem description. Re: 1304 Vladimir Yakovlev (USU) 27 Oct 2005 11:05 Why do you think so? Tests are correct. All numbers have no more than two digits after a decimal point. I wrote code like this (in reading data): scanf( "%lf", &x ); if( fabs( int(x*100)-x*100 )>1e-2 ) throw 0; and my program have been crashed. double x = 4.02; printf("%.2lf %.2lf\n", x, int(x*100)-x*100); | question(+) | Kit (Vologda SPU) | 1304. Parallelepiped | 30 Aug 2005 10:13 | 6 | My algorithm has o(n^5) complexity. Is there any better solution? If you have, please, send it me, klukva2@mail.ru. It is very interestingly. Edited by author 22.08.2005 14:33 There is an O(n^4) algorithm. Do you mean your algorithm is o(n^5), i.e. it is necessarily better than n^5? Edited by author 29.08.2005 20:37 There are five nested cycles. Is it so strange? I think, many people have a same solution. Could you say something about O(n^4) algorithm? f(n) = o(g(n)) <=> f(n) = O(g(n)) and lim f(n)/g(n) = 0 when n->infinity. Let me guess your idea. You fix 5 sides and search the last one, right? You should fix less. Fix the top and the bottom, and then you'll need to find the largest empty rectangle. This can be done in O(n^2). Let me guess your idea. You fix 5 sides and search the last one, right? No, I fix left, right, forward, backward and search the rest in O(n). This can be done in O(n^2). Are you kidding? In case I know how to do it in O(n^2), I have guessed to the rest myself. What you say looks like "Cricket field" from neerc (1235 on timus), but there are was squares (not rectangles) and also O(n^3) solution. So I don't know, what you mean, sorry. Edited by author 29.08.2005 22:56Let me guess your idea. You fix 5 sides and search the last one, right? No, I fix left, right, forward, backward and search the rest in O(n). You are right, that would be O(n^6). This can be done in O(n^2). Are you kidding? In case I know how to do it in O(n^2), I have guessed to the rest myself. What you say looks like "Cricket field" from neerc (1235 on timus), but there are was squares (not rectangles) and also O(n^3) solution. So I don't know, what you mean, sorry. "Cricket Field" can be done in O(n * log n), but it's much more complicated. Edited by author 30.08.2005 10:21 | Am I right? | VC15 (Orel STU) | 1304. Parallelepiped | 19 Jun 2005 16:38 | 2 | I've been trying to solve this problem for a week. My best achievement is ML (and almost TL) on test 19. Tell me, please, am right with my algo or there is something more effective. My algo is recursive. For current parallelepiped I find any point that is inside it. Then I divide the parallelepiped on parts with three plane parallel to coordinate plane consicutively. So, for each parallelepiped there is 6 recursive calls of my function. This is a brute force but I use different improvements (hash, DP, "bits arithmetics") to make my program faster. Please, tell me am I right or I should look for another way of solving this problem. Thanks. May be vano_B1 19 Jun 2005 16:38 Edited by author 19.06.2005 16:44 | Problem 1304 was rejudged | Vladimir Yakovlev (USU) | 1304. Parallelepiped | 28 Oct 2004 00:08 | 1 | | Mysterious test data (+) | Dmitry 'Diman_YES' Kovalioff | 1304. Parallelepiped | 17 Aug 2004 13:23 | 1 | I wonder why N<=50 in the text while there is no test with N>6. How come my brute force program which algo is O(N^7)received AC within 0.031 sec? | Could you please give me some pointers? | Alex[LSD] | 1304. Parallelepiped | 13 Apr 2004 05:56 | 2 | just use back, the tests have maximum 10 objects... |
|
|