Common Board| Show all threads Hide all threads Show all messages Hide all messages | | Wrong answer on test 2 !!!! | Narek X | 1809. Chapaev and Potatoes | 25 Sep 2013 18:26 | 1 | Thenks, I have AC Edited by author 27.09.2013 15:34 | | WA 27? | jjohn | 1643. Attack of the Dark Fortress | 25 Sep 2013 13:25 | 1 | WA 27? jjohn 25 Sep 2013 13:25 I think my program is correct, but i've gotten wa 27 three times. Does anyone know what this test iss? | | Why WA4 | KartonArmadon | 1581. Teamwork | 24 Sep 2013 18:16 | 1 | Why WA4 KartonArmadon 24 Sep 2013 18:16 Sorry please, i find mistake... Edited by author 24.09.2013 18:26 | | Why WA on test 10? | Николай | 1880. Psych Up's Eigenvalues | 24 Sep 2013 17:47 | 1 | #include<iostream> #include<math.h> using namespace std; int main() {int t=0; int a,b,c; int d=0; long A[4001]; long B[4001]; long C[4001]; long D[4001]={0}; cin >> a; if(a <1 || a > 4000) exit(0); for(int i=0;i<a;i++) { cin >> A[i]; if(A[i] < 0 || A[i] >1000000000) exit(0); } cin >> b; if(b < 1 || b > 4000) exit(0); for(int i=0;i<b;i++) { cin >> B[i]; if(A[i] < 0 || B[i] >1000000000) exit(0); } cin >> c; if(c < 1 || c > 4000) exit(0); for(int i=0;i<c;i++) { cin >> C[i]; if(A[i] < 0 || C[i] >1000000000) exit(0); } for(int i=0;i<a;i++) for(int j=0;j<b;j++) if(A[i] == B[j]) { D[i]=A[i]; B[j]=0; t++; break; } for(int i=0;i<t;i++) for(int j=0;j<c;j++) if(D[i] == C[j]) { d++; C[j]=0; break; } cout << d; system("pause"); return 0; } | | Why I get wrong? | dejiyu | 1076. Trash | 24 Sep 2013 16:57 | 2 | program djy; var a:array[1..150,1..150] of integer; lx,ly,link:array[1..150] of integer; flagx,flagy:array[1..150] of boolean; n:longint; procedure init; var i,j:longint; begin readln(n); for i:=1 to n do for j:=1 to n do read(a[i,j]); end; procedure prepare; var i,j,s:longint; begin {for i:=1 to n do begin s:=0; for j:=1 to n do s:=s+a[j,i]; for j:=1 to n do a[j,i]:=a[j,i]-s; end;} fillchar(lx,sizeof(lx),0); fillchar(ly,sizeof(ly),0); for i:=1 to n do for j:=1 to n do if a[i,j]>lx[i] then lx[i]:=a[i,j]; end; function find(i:longint):boolean; var j:longint; begin flagx[i]:=true; for j:=1 to n do if (lx[i]+ly[j]=a[i,j]) and (flagy[j]=false) then begin flagy[j]:=true; if (link[j]=0) or (find(link[j])=true) then begin link[j]:=i; find:=true; exit; end; end; find:=false; end; procedure main; var i,j,k,d:longint; begin fillchar(link,sizeof(link),0); for k:=1 to n do repeat fillchar(flagx,sizeof(flagx),false); fillchar(flagy,sizeof(flagy),false); if find(k)=true then break; d:=maxint; for i:=1 to n do for j:=1 to n do if (flagx[i]=true) and (flagy[j]=false) and (lx[i]+ly[j]-a[i,j]<d) then d:=lx[i]+ly[j]-a[i,j]; for i:=1 to n do if flagx[i]=true then lx[i]:=lx[i]-d; for i:=1 to n do if flagy[j]=true then ly[j]:=ly[j]+d; until false; end; procedure print; var i,j,s:longint; begin s:=0; for i:=1 to n do for j:=1 to n do s:=s+a[i,j]; for i:=1 to n do s:=s-a[link[i],i]; writeln(s); end; begin init; prepare; main; print; end. You gotta use A+B code. I don't remember the correct algorithm but you can find'em in the tutorial. I got AC. Seriously. | | TO ADMIN (NOT problem specific) Time Limit On Submission | Diaz900 | 1008. Image Encoding | 24 Sep 2013 05:17 | 3 | These days I've noticed that some programmer got stuck on BIG problems like "ships version 2", which may cost up to tens of seconds to judge. However the general limit for submitting a solution is 10 second. So, you see a whole lot page of 'waiting'. Maybe increase the interval for these problems? I think it is bad idea to tighten rules because of one genius (who made about 1000 submissions on the problem in several hours) - better just to ban it. But, since it is easy to register again, a good idea for timus maybe to restrict the number of submissions of one user (or from one IP) during the last 24 hours (at most 100, for example). Edited by author 20.09.2013 02:27 Edited by author 20.09.2013 08:33 Sounds readonable. Let's see what the admin has to say lol | | What is wrong? | pimiento | 1785. Lost in Localization | 24 Sep 2013 01:52 | 2 | truth_table = { 'few': lambda x: x > 0 and x < 5, 'several': lambda x: x > 4 and x < 10, 'pack': lambda x: x > 9 and x < 20, 'lots': lambda x: x > 19 and x < 50, 'horde': lambda x: x > 49 and x < 100, 'throng': lambda x: x > 99 and x < 250, 'swarm': lambda x: x > 249 and x < 500, 'zounds': lambda x: x > 499 and x < 1000, 'legion': lambda x: x > 999 } def translate_count(count): for result, func in truth_table.items(): if func(count): return result translate_count(raw_input(u"Number: ")) Проверку локально проходит, может нужно не так обрабатывать входные параметры? It's strange but it works for Python3 (with corrections for print and input). | | What is wrong? | pimiento | 1877. Bicycle Codes | 24 Sep 2013 01:51 | 1 | current_key = int(input().strip()) backup_key = int(input().strip()) for thief_key in range(0, 9999): if current_key == thief_key: print("yes") break if thief_key > current_key or thief_key > backup_key: print("no") break temp_key = backup_key backup_key = current_key current_key = temp_key It passes tests with "0001/0000" -> no and "0002/0001" -> yes. And I traced it, it works right. But they said, that I have wrong answers. Why? P.S. Mistake of course was in the line: if thief_key > current_key or thief_key > backup_key: I should use and instead or. Edited by author 24.09.2013 01:56 | | WA2? | Николай | 1787. Turn for MEGA | 23 Sep 2013 20:22 | 1 | WA2? Николай 23 Sep 2013 20:22 #include<iostream> using namespace std; int main() { int a; cin >> a; if(a > 100 || a < 1) exit(0); int b[101]; int c; cin >> c; if(c > 100 || c < 1) exit(0); for(int i=0;i<c;i++) { cin >> b[i]; if(b[i] >= 101 || b[i] <= 0) exit(0); } int d=0; int j=0; int k=0; for(int i=0;i<c;i++) { if(i == c-1) k=b[i]-a; j=0; if(b[i] > a) { j=b[i]-a; b[i+1]+=j; d+=a; } } cout << k; system("pause"); return 0; } | | WA at 12 | HuaLee | 1903. Unidentified Ships | 23 Sep 2013 15:56 | 1 | | | I got "Crash (ACCESS_VIOLATION)". What does it mean? | XiaoTian | 1030. Titanic | 21 Sep 2013 23:55 | 11 | {No.1030 Titanic.} Const pi=3.1415926535897932384626433832795; Var Char1,NS1,EW1,NS2,EW2:Char; A1,B1,C1,D1,E1,F1,A2,B2,C2,D2,E2,F2:Integer; SqrD,Alpha,L,X1,Y1,Z1,X2,Y2,Z2:Real; Function ReadNum:Integer; Var Str1:String; Code,Num:Integer; Char1:Char; Begin Str1:='##'; Read(Str1[1]); Read(Str1[2]); Read(Char1); If Char1 In ['0'..'9'] Then Str1:=Str1+Char1; Val(Str1,Num,Code); ReadNum:=Num; End; Procedure Cal(Theta1,Theta2:Real;NS,EW:Char;Var X,Y,Z:Real); Begin If NS='N' Then Z:=Sin(Theta1) Else Z:=-Sin(Theta1); X:=Cos(Theta2)*Cos(Theta1); If EW='E' Then Y:=Sin(Theta2)*Cos(Theta1) Else Y:=-Sin(Theta2)*Cos(Theta1); End; Begin ReadLn; ReadLn; ReadLn; A1:=ReadNum; B1:=ReadNum; C1:=ReadNum; Read(Char1); Read(NS1); ReadLn; Read(Char1); Read(Char1); Read(Char1); Read(Char1); D1:=ReadNum; E1:=ReadNum; F1:=ReadNum; Read(Char1); Read(EW1); ReadLn; ReadLn; A2:=ReadNum; B2:=ReadNum; C2:=ReadNum; Read(Char1); Read(NS2); ReadLn; Read(Char1); Read(Char1); Read(Char1); Read(Char1); D2:=ReadNum; E2:=ReadNum; F2:=ReadNum; Read(Char1); Read(EW2); ReadLn; ReadLn; Cal((((C1/60)+B1)/60+A1)/180*pi,(((F1/60) +E1)/60+D1)/180*pi,NS1,EW1,X1,Y1,Z1); Cal((((C2/60)+B2)/60+A2)/180*pi,(((F2/60) +E2)/60+D2)/180*pi,NS2,EW2,X2,Y2,Z2); If (Abs(X1+X2)<1E-7) And (Abs(Y1+Y2)<1E-7) And (Abs(Z1+Z2)<1E-7) Then Alpha:=pi Else Begin SqrD:=Sqr(X1-X2)+Sqr(Y1-Y2)+Sqr(Z1-Z2); Alpha:=Arctan(Sqrt(SqrD)/2/Sqrt(1-SqrD/4))*2; End; L:=Alpha*6875/2; WriteLn('The distance to the iceberg: ',L:0:2,' miles.'); If 100-L>1E-7 Then WriteLn('DANGER!'); End. This possibly mean that you try to access the element of the array with the number that doesn't exist or something like that. Good Luck!!! {No.1030 Titanic.} {$N+} Const pi=3.1415926535897932384626433832795; Var Char1,NS1,EW1,NS2,EW2:Char; A1,B1,C1,D1,E1,F1,A2,B2,C2,D2,E2,F2:Integer; SqrD,Alpha,L,X1,Y1,Z1,X2,Y2,Z2:Double; Function ReadNum:Integer; Var Str1:String; Code,Num:Integer; Char1:Char; Begin Str1:=''; Read(Char1); Str1:=Str1+Char1; Read(Char1); If Char1 In ['0'..'9'] Then Begin Str1:=Str1+Char1; Read(Char1); If Char1 In ['0'..'9'] Then Str1:=Str1+Char1; End; Val(Str1,Num,Code); ReadNum:=Num; End; Procedure Cal(Theta1,Theta2:Double;NS,EW:Char;Var X,Y,Z:Double); Begin If NS='N' Then Z:=Sin(Theta1) Else Z:=-Sin(Theta1); X:=Cos(Theta2)*Cos(Theta1); If EW='E' Then Y:=Sin(Theta2)*Cos(Theta1) Else Y:=-Sin(Theta2)*Cos(Theta1); End; Begin ReadLn; ReadLn; ReadLn; A1:=ReadNum; B1:=ReadNum; C1:=ReadNum; Read(Char1); Read(NS1); ReadLn; Read(Char1); Read(Char1); Read(Char1); Read(Char1); D1:=ReadNum; E1:=ReadNum; F1:=ReadNum; Read(Char1); Read(EW1); ReadLn; ReadLn; A2:=ReadNum; B2:=ReadNum; C2:=ReadNum; Read(Char1); Read(NS2); ReadLn; Read(Char1); Read(Char1); Read(Char1); Read(Char1); D2:=ReadNum; E2:=ReadNum; F2:=ReadNum; Read(Char1); Read(EW2); ReadLn; ReadLn; Cal((((C1/60)+B1)/60+A1)/180*pi,(((F1/60) +E1)/60+D1)/180*pi,NS1,EW1,X1,Y1,Z1); Cal((((C2/60)+B2)/60+A2)/180*pi,(((F2/60) +E2)/60+D2)/180*pi,NS2,EW2,X2,Y2,Z2); If (Abs(X1+X2)<1E-10) And (Abs(Y1+Y2)<1E-10) And (Abs(Z1+Z2)<1E- 10) Then Alpha:=pi Else Begin SqrD:=Sqr(X1-X2)+Sqr(Y1-Y2)+Sqr(Z1-Z2); Alpha:=Arctan(Sqrt(SqrD)/2/Sqrt(1-SqrD/4))*2; End; L:=Alpha*6875/2; WriteLn('The distance to the iceberg: ',L:0:2,' miles.'); If 100-L>0 Then WriteLn('DANGER!'); End. {No.1030 Titanic.} {$N+} Const pi=3.1415926535897932384626433832795; Var Char1,NS1,EW1,NS2,EW2:Char; A1,B1,C1,D1,E1,F1,A2,B2,C2,D2,E2,F2:Integer; SqrD,Alpha,L,X1,Y1,Z1,X2,Y2,Z2:Double; Function ReadNum:Integer; Var Str1:String; Code,Num:Integer; Char1:Char; Begin Str1:=''; Read(Char1); Str1:=Str1+Char1; Read(Char1); If Char1 In ['0'..'9'] Then Begin Str1:=Str1+Char1; Read(Char1); If Char1 In ['0'..'9'] Then Str1:=Str1+Char1; End; Val(Str1,Num,Code); ReadNum:=Num; End; Procedure Cal(Theta1,Theta2:Double;NS,EW:Char;Var X,Y,Z:Double); Begin If NS='N' Then Z:=Sin(Theta1) Else Z:=-Sin(Theta1); X:=Cos(Theta2)*Cos(Theta1); If EW='E' Then Y:=Sin(Theta2)*Cos(Theta1) Else Y:=-Sin(Theta2)*Cos(Theta1); End; Begin ReadLn; ReadLn; ReadLn; A1:=ReadNum; B1:=ReadNum; C1:=ReadNum; Read(Char1); Read(NS1); ReadLn; Read(Char1); Read(Char1); Read(Char1); Read(Char1); D1:=ReadNum; E1:=ReadNum; F1:=ReadNum; Read(Char1); Read(EW1); ReadLn; ReadLn; A2:=ReadNum; B2:=ReadNum; C2:=ReadNum; Read(Char1); Read(NS2); ReadLn; Read(Char1); Read(Char1); Read(Char1); Read(Char1); D2:=ReadNum; E2:=ReadNum; F2:=ReadNum; Read(Char1); Read(EW2); ReadLn; ReadLn; Cal((((C1/60)+B1)/60+A1)/180*pi,(((F1/60) +E1)/60+D1)/180*pi,NS1,EW1,X1,Y1,Z1); Cal((((C2/60)+B2)/60+A2)/180*pi,(((F2/60) +E2)/60+D2)/180*pi,NS2,EW2,X2,Y2,Z2); If (Abs(X1+X2)<1E-10) And (Abs(Y1+Y2)<1E-10) And (Abs(Z1+Z2)<1E- 10) Then Alpha:=pi Else Begin SqrD:=Sqr(X1-X2)+Sqr(Y1-Y2)+Sqr(Z1-Z2); Alpha:=Arctan(Sqrt(SqrD)/2/Sqrt(1-SqrD/4))*2; End; L:=Alpha*6875/2; Write('The distance to the iceberg: '); Write(L:0:2); WriteLn(' miles.'); If Round(L*100)<10000 Then WriteLn('DANGER!'); End. Message #488. Received at 18:15:23. Current ship's coordinates are 45^00'00" SL and 45^00'00" WL. An iceberg was noticed at 45^00'00" NL and 45^00'00" WL. === Message #488. Received at 18:15:23. Current ship's coordinates are 41^46'00" NL and 50^14'00" WL. An iceberg was noticed at 41^14'11" NL and 51^09'00" WL. === Message #488. Received at 18:15:23. Current ship's coordinates are 45^00'00" SL and 45^00'00" WL. An iceberg was noticed at 45^00'00" NL and 135^00'00" EL. === Message #488. Received at 18:15:23. Current ship's coordinates are 90^00'00" NL and 50^14'00" WL. An iceberg was noticed at 90^00'00" SL and 151^09'00" WL. === Message #488. Received at 18:15:23. Current ship's coordinates are 0^00'00" NL and 50^00'00" WL. An iceberg was noticed at 0^00'00" SL and 130^00'00" EL. === Message #488. Received at 18:15:23. Current ship's coordinates are 40^00'00" NL and 1^00'00" WL. An iceberg was noticed at 40^00'00" NL and 1^00'00" EL. === Message #488. Received at 18:15:23. Current ship's coordinates are 40^09'18" NL and 1^00'01" WL. An iceberg was noticed at 40^50'11" NL and 1^00'00" EL. === Message #488. Received at 18:15:23. Current ship's coordinates are 40^09'19" NL and 1^00'01" WL. An iceberg was noticed at 40^50'12" NL and 1^00'00" EL. === The distance to the iceberg: 5399.61 miles. The distance to the iceberg: 52.04 miles. DANGER! The distance to the iceberg: 7199.48 miles. The distance to the iceberg: 10799.22 miles. The distance to the iceberg: 4799.66 miles. The distance to the iceberg: 91.92 miles. DANGER! The distance to the iceberg: 100.00 miles. The distance to the iceberg: 99.99 miles. DANGER! > The distance to the iceberg: 5399.61 miles. > The distance to the iceberg: 52.04 miles. > DANGER! > The distance to the iceberg: 7199.48 miles. > The distance to the iceberg: 10799.22 miles. > The distance to the iceberg: 4799.66 miles. > The distance to the iceberg: 91.92 miles. > DANGER! > The distance to the iceberg: 100.00 miles. > The distance to the iceberg: 99.99 miles. > DANGER! > Sorry Sergei Pupyrev (USU) 10 Feb 2003 19:59 > The distance to the iceberg: 5399.61 miles. > The distance to the iceberg: 52.04 miles. > DANGER! > The distance to the iceberg: 7199.48 miles. > The distance to the iceberg: 10799.22 miles. > The distance to the iceberg: 4799.66 miles. > The distance to the iceberg: 91.92 miles. > DANGER! > The distance to the iceberg: 100.00 miles. > The distance to the iceberg: 99.99 miles. > DANGER! > Look carefully at test : Message #488. Received at 18:15:23. Current ship's coordinates are 45^00'00" SL and 45^00'00" WL. An iceberg was noticed at 45^00'00" NL and 135^00'00" EL. === My answer is 10799.22 AC program gives answers The distance to the iceberg: 5399.61 miles. The distance to the iceberg: 52.04 miles. DANGER! The distance to the iceberg: 10799.22 miles. The distance to the iceberg: 10799.22 miles. The distance to the iceberg: 10799.22 miles. The distance to the iceberg: 91.92 miles. DANGER! The distance to the iceberg: 100.00 miles. The distance to the iceberg: 99.99 miles. DANGER! | | Explain me sample test, pls | PrankMaN | 1104. Don’t Ask Woman about Her Age | 21 Sep 2013 16:12 | 3 | Why answer for A1A is 22? Shouldn't it be 11? If u assume A1A is in base 11, the decimal equivalent is 1231. Clearly its not divisible by (11-1). Hope it explains. Try it as base 22 and you will see the resultant number is divisible by 21. Edited by author 21.09.2013 16:23 | | To admins - weak tests | master_j | 1119. Metro | 21 Sep 2013 14:52 | 2 | Consider two test cases: 3 3 3 1 2 2 3 3 1 and 3 3 3 1 3 2 1 3 2 Although they are symmetric and the answers must be equal, my AC programs (5180921 or 5180891) output different answers for them. Your tests were added. Thank you. | | Optimizing Python code | LearningPython | 1330. Intervals | 21 Sep 2013 03:57 | 7 | Hello My python code is as follows: [code deleted] I get TLE in # 20 Where can I save time? Edited by moderator 01.12.2019 21:35 I'm not sure, but maybe a lot of .append()'s could work too slow... Maybe you could try a = [0] * n and then a[i] = ... Hello When I change my solution with a=[0]*n it takes 0.546 sec Before the change it took 0.515 sec. The first hint brings no AC Edited by author 20.09.2013 22:41 Edited by author 20.09.2013 22:41 Tough to AC, but possible (finally I managed to do it). Since there can be up to 100000 queries, bottleneck is output as usual with Python. Don't use print - use sys.stdout.write() instead (interestingly, why you used sys.stdin for input and print for output?) Edited by author 18.09.2013 04:30 Using sys.stdout.write ('\n'.join ([str (x) for x in b]) My solution takes .515 sec No AC Looking at TLE times in testing queue is a misleading way to analyze your code effectiveness (actually, it shows time after which your code was halted with TLE verdict rather than acrtual running time). Test it locally on large tests and measure time efficiency of each alternative. Also, I see you submit on Python 3. That may be the problem - I ACed on Python 2. I used python 2.7.5 this time. My code was unchanged AC in .468 Thanks for all the advise Edited by author 21.09.2013 03:57 | | So hard | Dmitry_GOLD | 1000. A+B Problem | 21 Sep 2013 03:19 | 2 | So hard Dmitry_GOLD 14 Sep 2012 18:44 var a,b:integer; begin readln(a,b); writeln(a mod 10 + a div 10 * 10 + b mod 10 + b div 10 * 10); readln; end. | | a test | 100919CN | 1087. The Time to Take Stones | 20 Sep 2013 17:13 | 2 | a test 100919CN 9 Jan 2013 00:10 15 3 1 5 11 correct output:1 | | Hint about Input | A.06 | 1410. Crack | 19 Sep 2013 18:49 | 2 | Some of these are not mentioned in the problem statement - The input can have other separators than spaces, eg: 'Re ad' is two words and so is 'Re*ad' - There is no word with length 0, so there can be two separators, eg: 'Re**ad' is two words not three (if you have WA#6 check this) - Inputs are of multiple lines, so you can use EOF to check for end of input. Edited by author 09.04.2013 17:18 Edited by author 09.04.2013 17:18 | | Help! | Robert | | 19 Sep 2013 11:58 | 2 | Help! Robert 19 Sep 2013 11:52 Edited by author 19.09.2013 12:43 Edited by author 19.09.2013 12:44 Edited by author 19.09.2013 12:43 | | How to read in Java? | ace.Vendigo | 1102. Strange Dialog | 19 Sep 2013 03:31 | 2 | "(one|puton|out|output|in|input)+" it has simple solve using regexp, but i got ML 1. How to read correctly? Edited by author 18.09.2013 18:24 Read only char-by-char (token-by-token). In the worst case you will have one string of 10^7 chars - this will get ML anyway (and with java it will occur much earlier). So, don't cheat, write parser honestly. | | WA4 | BhandariEkaterina(MUCTR-2013) | 1823. Ideal Gas | 18 Sep 2013 21:19 | 1 | WA4 BhandariEkaterina(MUCTR-2013) 18 Sep 2013 21:19 Can anyone help me with test 4? #include <iostream> #include <cstdio> using namespace std; int main() { char c[3]; float v[3]; float R = 8.314, p, V, T, n; scanf("%c = %f\n", &c[0], &v[0]); scanf("%c = %f\n", &c[1], &v[1]); scanf("%c = %f", &c[2], &v[2]); for(int i = 0; i < 3; i++) { if(c[i] == 'p') p = v[i]; else if(c[i] == 'V') V = v[i]; else if(c[i] == 'T') T = v[i]; else if(c[i] == 'n') n = v[i]; } if(c[0] != 'n' && c[1] != 'n' && c[2] != 'n') { n = p*V/(R*T); if(T == 0 && (p == 0 || V == 0)) cout << "undefined\n"; else if(T == 0 && (p != 0 || V != 0)) cout << "error\n"; else if(p < 0 || V < 0 || T < 0 || n < 0) cout << "error\n"; else printf("n = %f\n", n); } else if(c[0] != 'T' && c[1] != 'T' && c[2] != 'T') { T = p*V/(R*n); if(n == 0 && (p == 0 || V == 0)) cout << "undefined\n"; else if(n == 0 && (p != 0 || V != 0)) cout << "error\n"; else if(p < 0 || V < 0 || n < 0 || T < 0) cout << "error\n"; else printf("T = %f\n", T); } else if(c[0] != 'V' && c[1] != 'V' && c[2] != 'V') { V = n*T*R/p; if(p == 0 && (T == 0 || n == 0)) cout << "undefined\n"; else if(p == 0 && (T != 0 || n != 0)) cout << "error\n"; else if(p < 0 || T < 0 || n < 0 || V < 0) cout << "error\n"; else printf("V = %f\n", V); } else if(c[0] != 'p' && c[1] != 'p' && c[2] != 'p') { p = n*T*R/V; if(T == 0 && (n == 0 || V == 0)) cout << "undefined\n"; else if(T == 0 && (n != 0 || V != 0)) cout << "error\n"; else if(V < 0 || n < 0 || T < 0) cout << "error\n"; else printf("p = %f\n", p); } return 0; } |
|
|