| Show all threads Hide all threads Show all messages Hide all messages |
| No subject | Azat Yusupov(TUIT Urgench) | 1658. Sum of Digits | 8 Nov 2011 13:11 | 1 |
No subject Azat Yusupov(TUIT Urgench) 8 Nov 2011 13:11 Edited by author 29.12.2011 01:34 |
| Is this formula correct? | Alex Stoff | 1255. Graveyard of the Cosa Nostra | 8 Nov 2011 03:22 | 6 |
Why are these(n div k)*n+(n div k)*(n mod k), n*n div k not right? Show me my mistake. Thanks a lot. Test it for: 5 3 the answer must be 8 but this formula gets 7 Test it for: 5 3 the answer must be 8 but this formula gets 7 can you explain why is it 8! You can place 8 coffins like this: 1 2 3 3 3 1 2 4 4 4 1 2 0 5 6 7 7 7 5 6 8 8 8 5 6 yeah)) thanks a lot! that was a fast response did you get AC on this problem? Yes, 8 years ago :) Edited by author 08.11.2011 03:23 |
| Test №3 on 1014 problem | Df5g5 | | 8 Nov 2011 03:21 | 1 |
|
| WA#24 | A-shot | 1423. String Tale | 8 Nov 2011 01:18 | 1 |
WA#24 A-shot 8 Nov 2011 01:18 Has anybody had wa24? I have no idea, what it can be... |
| Can U help me? Please | Alex Stoff | 1255. Graveyard of the Cosa Nostra | 8 Nov 2011 00:27 | 2 |
I have another problem... What If the cemetery is m*n and coffin is k*l... What is the correct formula? The 1255 Problem I've done, but this I cann't do... Help me, I need it... |
| Trouble with the A+B problem | Maxim | 1000. A+B Problem | 7 Nov 2011 21:28 | 12 |
Hi, i'm trying to solve the A+B problem, and it works on my computer. But the compiler of this site doesn't accept my solution. It says "Compilation error" : "11e2cd04-2636-421c-9639-3a45ac221379 11e2cd04-2636-421c-9639-3a45ac221379(4) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int" here is my program: #include <iostream> using namespace std; main () { long a,b; cin >> a; cin >> b; cout << a+b; }; Where did I do mistakes? Thank you for attention. try this: #include <iostream> using namespace std; int main () { long a,b; cin >> a; cin >> b; cout << a+b; } I think the difference is in return type of main. Kindly correct if i am wrong. I think the difference is in return type of main. Kindly correct if i am wrong. Thank you so much! Finally it worked! #include<stdio.h> void main() { float a,b,s=0.0; scanf("%f%f",&a,&b); s=a+b; printf("sum=%f",s) ; } i don't know where is problem in this programme Edited by author 27.09.2011 20:50 use int, lol Edited by author 15.10.2011 15:51 This is an example problem. You should read an FAQ to get start. First of all you haven't shown the type of main function :) output must be as this : cout <<(a+b); or: cout <<'a+b'; sorry for my English) |
| WA #26 | SS(Batyr' Olexandr) | 1285. Thread in a Hyperspace | 7 Nov 2011 17:31 | 2 |
WA #26 SS(Batyr' Olexandr) 27 Jul 2011 15:50 1075 with same algorithm have got AC. Can somebody help me? I need some tests or hints... Is this test correct? 1000 0 0 0 0 0 0 0 -1000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 999 answer: 3138.51 i get that,too and i wa 25 |
| 1001 problem set | gigliolily | 1001. Reverse Root | 7 Nov 2011 11:00 | 1 |
#include<stdio.h> void main() {int Ai,i=0; do{ scanf("%d",&Ai); i++; for(; ;i--) printf("%d\n",Ai); }while(Ai>=0&&Ai<=10^18); } i think it's right Edited by author 07.11.2011 11:10 Edited by author 07.11.2011 11:10 Edited by author 07.11.2011 11:12 but it keeps running Edited by author 07.11.2011 11:13 |
| Problem 1027 "D++ Again" has been rejudged. (+) | Sandro (USU) | 1027. D++ Again | 7 Nov 2011 00:39 | 1 |
New tricky test was added, and all AC submissions were rejudged. 96 authors lost AC. |
| what is in the test #45??? | Berezhko German | 1875. Angry Birds | 6 Nov 2011 16:57 | 1 |
I used eps=0, eps=1e-10,1e-9,1e-8,1e-7, but #45 is wrong with each eps(( |
| WA #14 | DarkJedi | 1821. Biathlon | 6 Nov 2011 13:29 | 1 |
WA #14 DarkJedi 6 Nov 2011 13:29 Edited by author 06.11.2011 20:58 |
| TEST#4 | Fedor Faustov | 1005. Stone Pile | 6 Nov 2011 11:14 | 1 |
TEST#4 Fedor Faustov 6 Nov 2011 11:14 Somebody, give me the test4, please! |
| can anyone give me some tests | Edric Mao | 1281. River Basin | 6 Nov 2011 10:42 | 2 |
|
| Here is Hint to solve | Anupam Ghosh, Wipro Technologies | 1712. Cipher Grille | 6 Nov 2011 04:52 | 1 |
1.find out the equtaion, to get next location of new character after rotation each time. 2.sort the locations on basis of height. 3. print the characters on those locations. All the best. Regards Anupam Edited by author 06.11.2011 04:53 |
| Why my program got WA? | Li Ruizhe | 1111. Squares | 6 Nov 2011 01:46 | 16 |
It's my program: {$N+} Program p1111; Type TPoint=Record x,y:Double; End; Var Point:Array[1..100,1..2] Of TPoint; Len:Array[1..100] Of Double; num:Array[1..100] Of Integer; n:Integer; po:TPoint; Procedure Other(p1,p2:TPoint;Var p3,p4:TPoint); Var m,n:Double; po:TPoint; Begin po.x:=(p1.x+p2.x)/2; po.y:=(p1.y+p2.y)/2; n:=p1.x-po.x;m:=p1.y-po.y; p3.x:=m;p3.y:=-n; p4.x:=-p3.x;p4.y:=n; p3.x:=p3.x+po.x;p3.y:=p3.y+po.y; p4.x:=p4.x+po.x;p4.y:=p4.y+po.y; End; Procedure Init; Var i:Integer; Begin {$IFNDEF ONLINE_JUDGE} Assign(Input,'1111.Txt'); Reset(Input); {$ENDIF} Readln(n); For i:=1 To n Do Readln(Point[i,1].x,Point[i,1].y, Point[i,2].x,Point[i,2].y); Readln(po.x,po.y); End; Procedure Main; Var i,j,k:Integer; p:Array[1..5] Of TPoint; u,A,B,C,L1,L2,L3,q1,q2,S:Double; Begin For i:=1 To n Do Begin num[i]:=i; p[1]:=Point[i,1]; p[3]:=Point[i,2]; Other(p[1],p[3],p[2],p[4]); p[5]:=p[1]; L1:=sqr(p[1].x-p[2].x)+sqr(p[1].y-p[2].y); If Abs(L1)<1e-14 Then Begin Len[i]:=sqr(po.x-p[1].x)+sqr(po.y-p[1].y); Continue; End; S:=0; For j:=1 To 4 Do Begin q1:=sqrt(sqr(po.x-p[j].x)+sqr(po.y-p[j].y)); q2:=sqrt(sqr(po.x-p[j+1].x)+sqr(po.y-p[j+1].y)); u:=(q1+q2+sqrt(L1))/2; S:=S+sqrt(u*(u-q1)*(u-q2)*(u-sqrt(L1))); End; If Abs(S-L1)<1e-14 Then Begin Len[i]:=0; Continue; End; S:=1e300; For j:=1 To 4 Do Begin A:=p[j+1].y-p[j].y; B:=p[j].x-p[j+1].x; C:=-A*p[j].x-B*p[j].y; L2:=sqr(p[j].x-po.x)+sqr(p[j].y-po.y); L3:=sqr(p[j+1].x-po.x)+sqr(p[j+1].y-po.y); If not((L1+L3-L2<0)or(L1+L2-L3<0)) Then Begin u:=Sqr(A*po.x+B*po.y+C)/(A*A+B*B); If u<S Then S:=u; End; End; For j:=1 To 4 Do Begin u:=Sqr(po.x-p[j].x)+Sqr(po.y-p[j].y); If u<S Then S:=u; End; Len[i]:=S; End; For i:=1 To n-1 Do For j:=i+1 To n Do If Len[i]>Len[j] Then Begin S:=Len[i]; Len[i]:=Len[j]; Len[j]:=s; k:=num[i]; num[i]:=num[j]; num[j]:=k; End; For i:=1 To n-1 Do Write(num[i],' '); Writeln(num[n]); End; Begin Init; Main; End. 12 -797 -6314 -2827 9400 6599 8354 -1698 -9262 -4367 4707 -6819 -3456 -9081 -1597 -2034 -8071 -5344 -1294 5374 7391 8886 -1433 8797 8123 5755 4629 6117 1844 -9568 -9375 413 -8893 6399 2576 -235 1017 -2189 9272 3306 -1693 8554 -3590 5752 2674 2770 7881 -2439 -3635 2627 2931 the answer of my program is 1 2 5 9 10 12 6 7 11 3 4 8 This is my answer: 2 5 10 12 9 7 11 1 6 4 3 8 The particular answers of my program: The distance of point 1 is: 0.0 The distance of point 2 is: 3758.8820637 The distance of point 3 is: 5317.7131577 The distance of point 4 is: 6516.753678 The distance of point 5 is: 2267.2803272 The distance of point 6 is: 1483.260766 The distance of point 7 is: 1920.5396377 The distance of point 8 is: 10242.585389 The distance of point 9 is: 1425.1471184 The distance of point 10 is:2102.5891829 The distance of point 11 is:3011.0680172 The distance of point 12 is:1880.3884245 I wonder if I'm wrong, could anybody tell me please? my out is this 1: 0.000000 2: 0.000000 3: 5317.713158 4: 6516.753678 5: 0.000000 6: 1483.260766 7: 1920.539638 8: 10242.585389 9: 0.000000 10: 0.000000 11: 3011.068017 12: 0.000000 adove is for debug! 1 2 5 9 10 12 6 7 11 3 4 8 but i still wrong answer 3 #3 ERROR ALL THE SAME 1: 0.000000 2: 0.000000 3: 5317.713158 4: 6516.753678 5: 0.000000 6: 1483.260766 7: 1920.539638 8: 10242.585389 9: 0.000000 10: 0.000000 11: 3011.068017 12: 0.000000 1 2 5 9 10 12 6 7 11 3 4 8 right answer for test 12 -797 -6314 -2827 9400 6599 8354 -1698 -9262 -4367 4707 -6819 -3456 -9081 -1597 -2034 -8071 -5344 -1294 5374 7391 8886 -1433 8797 8123 5755 4629 6117 1844 -9568 -9375 413 -8893 6399 2576 -235 1017 -2189 9272 3306 -1693 8554 -3590 5752 2674 2770 7881 -2439 -3635 2627 2931 is #1: 0.000000000 #2: 0.000000000 #3: 5317.713157659 #4: 6516.753678021 #5: 0.000000000 #6: 1483.260766015 #7: 1920.539637706 #8: 10242.585388968 #9: 0.000000000 #10: 0.000000000 #11: 3011.068017185 #12: 0.000000000 1 2 5 9 10 12 6 7 11 3 4 8 But these coordinates do not specify a square. Taking the 1st test case, how is (-797,-6314) (-2827,9400) opposite vertexes of a square ? The sides of square may be not parallel to the axes. The test and the results were quite helpful I also managed to debug my problem with them thanks guys! And also an interesting thing is that my mistake is so stupid that no one else could have done it and still I failed the 3rd test. So I think it is quite complicated and just caches all possible bugs(as I looked trough the results of the submits only one managed to fail a test with higher number). Here is an another task try to pass the 3rd and still fail a test. If you wa 3 please check your sort algorithm! Ты не мог бы помоч мне решить задачу №1028? Расказать способы решения за логарифмическое время... Мой е-мэйл: lexus_ua@list.ru Спасибо. Please use english, it is a common rule here. BTW, in case you don't know this - shitty.Mishka is my former login here. Edited by author 26.10.2004 21:13 Edited by author 26.10.2004 21:14 Thanks very much for helping me. With the help of this Testcase, I got ACed. PS: To all persons who haven't got ACed yet: Pay Attention to the Precision, please... Only 1e-14 is Enough. Otherwise you will be wrong. And, the most important one hint is: when you calculate the Side Length of a Square, your Precision would be only Sqrt(1e-14)=1e-7, that would work!!! I hope that my hint can help some people. At last, sorry for my poor English(I am Chinese). Good luck! My program is quite complexive, it works with any rectangle, not only a square. And the most interesting feature - i haven't used epsilon at all! That means, in this problem precision of extended type in Pascal is enough to solve it |
| WA #6 | OZone3 | 1179. Numbers in Text | 6 Nov 2011 00:17 | 3 |
WA #6 OZone3 1 Jul 2009 19:06 I've solved this task twice, first under "OZone", then under "OZone2" account. (I've lost their passwords). Now I am using the same solution (as far as I remember) and get WA #6. Could anybody give me an idea what aspect of a problem does the test #6 examine? Or is there is a way to get accounts back without emailing, because both e-mails are dead. Edited by author 01.07.2009 19:09 just write not for(k = 2;k < 36;++k) =>> for(k = 2;k <= 36;++k) Try some tests with more than one space or empty line.. and for WA7 try this: ZZ (answer is 36 1) |
| If you got WA#3 | TheDreamCatcher | 1001. Reverse Root | 5 Nov 2011 20:28 | 3 |
Try this test (16th of "9"): 9999999999999999 you should get 99999999,9999 in C++ cout and printf got 100000000.0000 Why is 99999999,9999 if we have ,999999... after point. We should round to 100000000.0000 according to rules of a rounding off of numbers Yes, I absolutely agree with you |
| teach newfag, plz | Fedor Faustov | 1001. Reverse Root | 5 Nov 2011 20:20 | 2 |
uses SysUtils; procedure RSqrt(k: Integer); var n: real; output: real; begin k:=k+1; Read(n); if n = -1 then exit; output:=Sqrt(n); if k > 0 then RSqrt(k-1); Writeln(output:0:4); end; begin while not SeekEof do RSqrt(0); end. //------------------------------------------ Well, can anybody tell me why it doesn't work? Perhaps, because of this
if n = -1 then exit; Please, don't tell me smth like "go on reading FAQ" or "use your 'while not seekeof do'." Can you just explain my mistake in this code? You know, technically, my program is working right! And yes, I got "crashed (stack overflow)" Edited by author 05.11.2011 20:20 |
| WHATS WRONG WITH THIS CODE? | Levan Ilashvili | 1496. Spammer | 5 Nov 2011 19:30 | 4 |
var n,i,j:byte; s:array[1..100]of string[31]; begin readln(n); for i:=1 to n do begin readln(s[i]); for j:=1 to i-1 do if s[i]=s[j] then writeln(s[i]); end; end. ______________________________ HELP PLZ try test from example )))) your program writes something like this abikbaev abikbaev abikbaev x it is just fun) Edited by author 23.11.2007 00:51 Please, can you give accepted code? I did not understand this program. |
| What does this problem mean? | Failed Peter | 1278. “… Connecting People” | 5 Nov 2011 19:02 | 3 |
See how it works (sample input 2): These are memory cells: 0:CALL 3 1:CALL 3 2:CALL 3 3:BELL&RET Before operatons stack is empty First the first command is executed. Stack becomes (1),IP-3 BELL&RET is executed. Then IP pop-ups to 1 (from stack). The second command is executed. Stack becomes (2) and so on. The result is 4 executed commands 'BELL&RET' |