Task: | Spiraali |
Sender: | WalkStalker |
Submission time: | 2021-10-06 12:05:08 +0300 |
Language: | Pascal |
Status: | READY |
Result: | 15 |
group | verdict | score |
---|---|---|
#1 | ACCEPTED | 15 |
#2 | WRONG ANSWER | 0 |
#3 | WRONG ANSWER | 0 |
test | verdict | time | group | |
---|---|---|---|---|
#1 | ACCEPTED | 0.01 s | 1 | details |
#2 | WRONG ANSWER | 0.01 s | 2 | details |
#3 | WRONG ANSWER | 0.01 s | 3 | details |
Compiler report
/usr/bin/ld.bfd: warning: output/link.res contains output sections; did you forget -T?
Code
program abc; var n,t,x,y,p,resultat,net,am:integer; begin readln (n,t); repeat readln (x,y); x:=2*(x-1)-n+1; y:=2*(y-1)-n+1; if abs(x)>=abs(y) then net:=abs(x) else net:=abs(y); p:=(x+y)div 2; if (x < y) then p:=2*net-p; resultat:=n*n-net*net-net+p; writeln (resultat); am:=am+1; until am=t; end.
Test details
Test 1
Group: 1
Verdict: ACCEPTED
input |
---|
10 100 1 1 1 2 1 3 1 4 ... |
correct output |
---|
1 36 35 34 33 ... |
user output |
---|
1 36 35 34 33 ... Truncated |
Test 2
Group: 2
Verdict: WRONG ANSWER
input |
---|
1000 1000 371 263 915 322 946 880 53 738 ... |
correct output |
---|
773533 312166 206053 200080 593922 ... |
user output |
---|
-12899 -15514 9445 3472 4098 ... Truncated |
Test 3
Group: 3
Verdict: WRONG ANSWER
input |
---|
1000000000 1000 177757853 827347032 409613589 419171337 739269360 256524697 328695530 896842209 ... |
correct output |
---|
571375684522141210 967321186816598569 762879105851175000 370065046779516790 936897883750373771 ... |
user output |
---|
-20478 8745 -20392 13578 15921 ... Truncated |