| Show all threads Hide all threads Show all messages Hide all messages |
| If you get Crash (access violation) | Berendea | 1019. Line Painting | 8 Jan 2013 05:48 | 1 |
Try the following test: 50 3081 30488 b 16217 39416 w 7248 11364 w 17676 32492 w 25292 30974 w 1686 28199 w 9576 25807 w 18823 21457 w 30775 38642 w 7758 15847 b 6289 19805 b 1546 26246 w 27602 30148 w 9296 14836 w 19435 26471 w 27882 35227 w 24453 42158 w 943 1752 b 4080 12268 w 31529 41419 w 6238 22445 w 6262 13797 w 16616 31697 w 9990 12426 w 31675 46085 w 15149 32698 b 16029 18700 b 32372 50450 w 19642 25152 b 21096 30699 b 27244 35134 b 29951 43374 w 8869 9499 w 3375 28256 w 2060 14099 b 19972 37822 b 30222 33297 b 5433 9482 w 28735 54469 b 19053 31004 w 12234 27889 b 19117 19750 b 11927 17069 w 30056 32152 b 21756 25680 w 25656 44214 b 5308 18661 b 21710 26158 b 9196 32476 b 9917 11034 b I don't know what the output is. Mine was 54496 1000000000 |
| Interesting :-) | ftc | 1632. Lasers | 8 Jan 2013 02:47 | 3 |
Nice to see, but "higher" relation is not transitive ;-) It is very easy problem, but why only 54 people solved?! This problem has simple solution and very interesting, but not obvious idea... |
| How to use reals with range 10^18 in pascal? | Shohruh | 1948. The Robot on the Line | 7 Jan 2013 01:19 | 4 |
can anybody explain me how to use reals with big range like 10^18 or 10^19 more precisely in pascal? If you need real numbers with best affordable precision - use long double ("extended" in pascal). Edited by author 06.01.2013 23:12 I knew the solution was k=1 or trunc((1+12*b*b/(a*a)-3*c/a)). but i could not take precision. If you need real numbers with best affordable precision - use long double ("extended" in pascal). F**k, spoiler =( Then you don't need real numbers here - long long (int64 in Pascal) is enough to solve it |
| Test 3 crash - floating-point invalid operation | SemenB | 1209. 1, 10, 100, 1000... | 7 Jan 2013 00:51 | 1 |
Please help Why am I getting floating-point invalid operation on test 3? Would it be possible to see the test values? program pr_1; var n, i, x: longint; a: real; begin read(n); for i:=1 to n do begin read(x); a:= (1 + sqrt(8*x-7))/2; if (Frac(a) = 0.0) then write('1 ') else write('0 '); end; end. |
| Please!!! what is wrong with my code. WA2????????????? | Shohruh | 1130. Nikifor's Walk | 6 Jan 2013 23:48 | 1 |
program acm_1130; type vec=record x,y:longint; end; var w,a:array[1..3]of vec; c,b:vec; i,n,nn:longint; L:longint; p:array[0..10000,1..3,1..2] of byte; q:array[0..10000,1..3]of shortint; f:boolean; procedure delta(nn,r:longint); var j:longint; begin if nn=0 then exit; for j:=1 to 2 do if p[nn,r,j]>0 then begin q[nn-1,p[nn,r,j]]:=-q[nn-1,p[nn,r,j]]; delta(nn-1,p[nn,r,j]); end; end; procedure minn(i:longint); begin if sqr(a[1].x+a[2].x)+sqr(a[1].y+a[2].y)<=sqr(L) then begin w[1].x:=a[1].x+a[2].x; w[1].y:=a[1].y+a[2].y; w[2]:=a[3]; q[i,1]:=1; q[i,2]:=1; q[i,3]:=1; p[i+1,1,1]:=1; p[i+1,1,2]:=2; p[i+1,2,1]:=3; exit; end; if sqr(a[1].x-a[2].x)+sqr(a[1].y-a[2].y)<=sqr(L) then begin w[1].x:=a[1].x+a[2].x; w[1].y:=a[1].y+a[2].y; w[2]:=a[3]; q[i,1]:=1; q[i,2]:=-1; q[i,3]:=1; p[i+1,1,1]:=1; p[i+1,1,2]:=2; p[i+1,2,1]:=3; exit; end; if sqr(a[1].x+a[3].x)+sqr(a[1].y+a[3].y)<=sqr(L) then begin w[1].x:=a[1].x+a[3].x; w[1].y:=a[1].y+a[3].y; w[2]:=a[2]; q[i,1]:=1; q[i,2]:=1; q[i,3]:=1; p[i+1,1,1]:=1; p[i+1,1,2]:=3; p[i+1,2,1]:=2; exit; end; if sqr(a[1].x-a[3].x)+sqr(a[1].y-a[3].y)<=sqr(L) then begin w[1].x:=a[1].x-a[3].x; w[1].y:=a[1].y-a[3].y; w[2]:=a[2]; q[i,1]:=1; q[i,2]:=1; q[i,3]:=-1; p[i+1,1,1]:=1; p[i+1,1,2]:=3; p[i+1,2,1]:=2; exit; end; if sqr(a[2].x+a[3].x)+sqr(a[2].y+a[3].y)<=sqr(L) then begin w[1].x:=a[2].x+a[3].x; w[1].y:=a[2].y+a[3].y; w[2]:=a[2]; q[i,1]:=1; q[i,2]:=1; q[i,3]:=1; p[i+1,1,1]:=2; p[i+1,1,2]:=3; p[i+1,2,1]:=1; exit; end; if sqr(a[2].x-a[3].x)+sqr(a[2].y-a[3].y)<=sqr(L) then begin w[1].x:=a[2].x-a[3].x; w[1].y:=a[2].y-a[3].y; w[2]:=a[2]; q[i,1]:=1; q[i,2]:=1; q[i,3]:=-1; p[i+1,1,1]:=2; p[i+1,1,2]:=3; p[i+1,2,1]:=1; exit; end; end; begin read(n); read(L); if n=1 then begin write('+'); exit; end; if n=2 then begin read(c.x,c.y); read(b.x,b.y); if sqr(c.x-b.x)+sqr(c.y-b.y)<sqr(c.x+b.x)+sqr(c.y+b.y) then writeln('+-') else writeln('++'); exit; end; for i:=1 to 3 do read(a[i].x,a[i].y); fillchar(p,sizeof(p),0); fillchar(q,sizeof(q),1); minn(0); a[1]:=w[1]; a[2]:=w[2]; for i:=1 to n-3 do begin read(a[3].x,a[3].y); minn(i); a[1]:=w[1]; a[2]:=w[2]; end; f:=true; if sqr(a[1].x-a[2].x)+sqr(a[1].y-a[2].y)<sqr(a[1].x+a[2].x)+sqr(a[1].y+a[2].y) then f:=true else f:=false; if f then begin nn:=n-2; delta(nn,2); end; writeln('YES'); for i:=1 to 3 do if q[0,i]>0 then write('+') else write('-'); for i:=1 to n-3 do if q[i,3]>0 then write('+') else write('-'); end. Edited by author 07.01.2013 14:31 |
| WA 7 | TinyJanssen | 1794. Masterpieces of World Architecture | 6 Jan 2013 16:40 | 2 |
WA 7 TinyJanssen 1 Jan 2013 16:42 What is special about this problem? I get WA 7 all the time. My algo [code deleted] Edited by author 01.01.2013 16:44 Edited by author 01.01.2013 20:16 Edited by author 01.01.2013 20:18 Edited by moderator 29.11.2019 14:27 I found the error, it was not the algo. It was in the routine to find the maximum. The algo is perfect. |
| This is my code in c++ .Why got WR 3 | saba_tavdgiridze | 1881. Long problem statement | 6 Jan 2013 14:43 | 1 |
#include<iostream> #include<string> using namespace std; int main(){ int line=1,liner,start=0,paper=1,word,symbol; cin>>liner>>symbol>>word; for(int i=0;i<word;i++){ string s; cin>>s; int a; if(start==0) a=s.size(); else a=s.size()+1; if((start+a)<symbol) start=start+a; else { start=0; line++;} } if(line%liner==0) cout<<(line/liner); else cout<<(line/liner+1); system("pause"); return 0; } |
| why the answer to the first sample is 2 I THANK IT IT 1 | boleyn.su | 1948. The Robot on the Line | 6 Jan 2013 14:21 | 2 |
why the answer to the first sample is 2 I THANK IT IT 1 because let x=1 then f(x)=0 so it only takes 1 sec I misunderstood the statement. |
| WA5 | Nikiror | 1944. Record of the Attack at the Orbit | 6 Jan 2013 12:40 | 5 |
WA5 Nikiror 5 Jan 2013 14:51 Re: WA5 Andrew Sboev [USU] 5 Jan 2013 15:50 For example :) 1 -5 5 Answer *....| .....| .....| .....| .....| -----+ Thank you. I pass this test and now I get WA16 (= Отослал написано Accepted, но в рейтинге стоит вопросик, хотя система засчитала правильный ответ. Так и должно быть? |
| AV #33 | balalaeshnik | 1353. Milliard Vasya's Function | 6 Jan 2013 05:44 | 2 |
AV #33 balalaeshnik 6 Jan 2013 04:51 What's wrong with 33th test?)) Or what reazons to access violation? And my IDE write correct answer - 31861500 |
| What is Test #8 input ? | kotez | 1014. Product of Digits | 6 Jan 2013 04:59 | 1 |
if N=1 000 000 000 i have Q->555555555888. And as i read it's right answer. Edited by author 06.01.2013 05:07 |
| how to get a 0.19 in the first test ? | QProgS | 1934. Black Spot | 5 Jan 2013 22:01 | 4 |
how to get a 0.19 in the first test ? what formula ? |
| There is question sign in front of the assingment although system accepted my work | neeilya | | 5 Jan 2013 17:56 | 1 |
What is it? Edited by author 05.01.2013 17:57 Edited by author 05.01.2013 17:57 |
| About compilator | Aliaksei | 1941. Scary Martian Word | 5 Jan 2013 17:37 | 3 |
What I have to include for using function getline(cin,S)? include <string> Edited by author 05.01.2013 17:37 |
| AHMEDE | [TDUweAI] daminus | 1941. Scary Martian Word | 5 Jan 2013 17:13 | 1 |
AHMEDE [TDUweAI] daminus 5 Jan 2013 17:13 ahmet mende altynjy barlag yalnysh jogap diyya, name bolmagy mumkin? mysal yaz hany shona.... |
| What does this mean? | Sure | 1942. Attack at the Orbit | 5 Jan 2013 17:03 | 12 |
Who can explain "The captain can’t rotate the weapon aiming system.",please? The captain can't rotate angle Does it mean that the system can only shoot at targets both coordinates of which are integers on just one line? Edited by author 05.01.2013 15:25 What??Sorry, I can't see what you say. Edited by author 05.01.2013 15:54 "laser can shoot at targets both coordinates of which are integers" Any target with both integer coordinates in new coordinate system can be destroyed. Really? This ought to be one of the most confusing statements I've ever seen, if this is true... "The captain can’t rotate the weapon aiming system." How come I can be at point (0, 0) and shoot at (1, 0) and (0, 1) if I can't rotate the aiming system? You are not in point (0,0) - you are in the space near the planet. :) And all the points including (0,0) are on the planet's surface. Are you Sure? But I got Wrong Answer many times. If it is true, I think the second answer must be less than 0.5*sqrt(2). Am I right? Then is it true that every two pads can both be destroyed if they are equal after the decimal point? This is true, for example, for pads with positive coordinates. Pads (0.0, 0.3) and (0.0, -0.7) can both be destroyed too. |
| No subject | Looksery DotaClub | 1945. Many-armed Brothers | 5 Jan 2013 16:39 | 2 |
Can we consider a guy with one hand to be a brother of another one with three hands if there is no 2-hands guy in input data? Of course g>=3 in this case. Yes, if g>=3 then 1-hand and 3-hands guys may be brothers. And their 2-hands brother just didn't go to cinema. :) |
| WA1 Is the first test from task? | Birne Ageev | 1948. The Robot on the Line | 5 Jan 2013 16:03 | 4 |
f**king #ifndef ONLINE_JUDGE Sorry for stupid questions. |
| WA#1 | Rushboy | 1428. Jedi Riddle | 5 Jan 2013 16:02 | 1 |
WA#1 Rushboy 5 Jan 2013 16:02 why? here is the code: #include <iostream> #include <cmath> using namespace std; int main(){ long long X,Y,Z,k,l,m; short A,B,C; cin>>A>>B>>C; k=(C-1)/A; l=(C-1)/B; X=1;Y=1; for(long i=1;i<=k;i++) X*=2; for(long i=1;i<=l;i++) Y*=2; cout<<X<<" "<<Y<<" "<<"2"; return 0; } |
| Problem about H | mbrc | 1948. The Robot on the Line | 5 Jan 2013 15:59 | 2 |
Will the total dist travelled after k seconds be f(x)+f(x+1)+f(x+2)+...f(x+k-1) or it will be f(x+k-1) just? Thanks! f(x)+f(x+1)+f(x+2)+...f(x+k-1) |