QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#721281 | #1880. Nikanor Loves Games | Nt_Yester | AC ✓ | 94ms | 22336kb | C++20 | 1.4kb | 2024-11-07 15:45:54 | 2024-11-07 15:45:54 |
Judging History
answer
#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#define N 1000005
#define LL long long
#define INF 0x3f3f3f3f3f3f3f3f
inline int R() {
int x=0; bool f=0; char c=getchar();
while (!isdigit(c)) f|=(c=='-'),c=getchar();
while (isdigit(c)) x=x*10+c-'0',c=getchar();
return f?-x:x;
}
template<typename T>
void W(T x,int op=0) {
if (x<0) return putchar('-'),W(-x,op);
if (x>9) W(x/10); putchar(x%10+'0');
if (op) putchar(op==1?' ':'\n');
}
using namespace std;
int n,a[N],b[N],x[N],k,c[N]; LL sum[N];
int main() {
// freopen("b.in","r",stdin);
n=R();
for (int i=1;i<=n;i++)
c[++k]=a[i]=R(),c[++k]=b[i]=R(),x[i]=R();
c[++k]=1; LL Sum=0;
sort(c+1,c+k+1); k=unique(c+1,c+k+1)-c-1;
for (int i=1;i<=n;i++) {
a[i]=lower_bound(c+1,c+k+1,a[i])-c;
b[i]=lower_bound(c+1,c+k+1,b[i])-c;
sum[a[i]]+=x[i],sum[b[i]]+=x[i],Sum+=2*x[i];
}
for (int i=1;i<=k;i++) sum[i]+=sum[i-1];
for (int i=1;i<=k;i++) sum[i]=2*sum[i]-Sum;
LL ans=-INF;
for (int i=1,j=k;i<=k;i++) {
while (j>1 and sum[j]-4ll*c[i]*c[j]<=sum[j-1]-4ll*c[i]*c[j-1]) --j;
for (int _=-5;_<=5;_++)
if (j+_>=1 and j+_<=k) ans=max(ans,sum[i]+sum[j+_]-4ll*c[i]*c[j+_]);
}
// W(ans,2);
printf("%.7lf\n",ans/4.0);
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 10064kb
input:
2 1 4 15 3 5 10
output:
2.5000000
result:
ok found '2.5000000', expected '2.5000000', error '0.0000000'
Test #2:
score: 0
Accepted
time: 0ms
memory: 10032kb
input:
1 2 2 8
output:
4.0000000
result:
ok found '4.0000000', expected '4.0000000', error '0.0000000'
Test #3:
score: 0
Accepted
time: 0ms
memory: 10028kb
input:
3 94 68 49 51 2 63 26 85 20
output:
-73.0000000
result:
ok found '-73.0000000', expected '-73.0000000', error '-0.0000000'
Test #4:
score: 0
Accepted
time: 1ms
memory: 10040kb
input:
2 14 68 12 28 2 46
output:
-16.0000000
result:
ok found '-16.0000000', expected '-16.0000000', error '-0.0000000'
Test #5:
score: 0
Accepted
time: 1ms
memory: 10036kb
input:
5 6 6 8 6 1 11 6 1 13 6 1 5 5 1 2
output:
9.5000000
result:
ok found '9.5000000', expected '9.5000000', error '0.0000000'
Test #6:
score: 0
Accepted
time: 0ms
memory: 10036kb
input:
5 5 4 2 4 1 10 3 1 3 2 1 3 5 1 5
output:
5.5000000
result:
ok found '5.5000000', expected '5.5000000', error '0.0000000'
Test #7:
score: 0
Accepted
time: 0ms
memory: 9900kb
input:
5 1 5 2 4 2 7 2 2 2 2 5 14 1 4 2
output:
4.5000000
result:
ok found '4.5000000', expected '4.5000000', error '0.0000000'
Test #8:
score: 0
Accepted
time: 1ms
memory: 10092kb
input:
5 4 1 9 1 5 13 3 6 10 6 5 8 3 5 5
output:
9.0000000
result:
ok found '9.0000000', expected '9.0000000', error '0.0000000'
Test #9:
score: 0
Accepted
time: 1ms
memory: 10088kb
input:
5 3 7 9 5 7 12 4 6 13 3 6 6 2 1 2
output:
-6.0000000
result:
ok found '-6.0000000', expected '-6.0000000', error '-0.0000000'
Test #10:
score: 0
Accepted
time: 1ms
memory: 9968kb
input:
10 8 10 26 11 2 28 13 4 13 11 1 26 6 15 23 12 8 7 9 8 11 11 10 17 8 11 18 3 10 27
output:
32.0000000
result:
ok found '32.0000000', expected '32.0000000', error '0.0000000'
Test #11:
score: 0
Accepted
time: 0ms
memory: 9968kb
input:
10 6 5 10 10 15 21 7 2 30 14 6 12 1 11 6 1 13 19 8 13 29 9 4 14 1 4 29 4 12 17
output:
12.0000000
result:
ok found '12.0000000', expected '12.0000000', error '0.0000000'
Test #12:
score: 0
Accepted
time: 1ms
memory: 10040kb
input:
10 5 15 15 3 14 20 11 14 26 15 12 22 5 15 11 12 10 10 1 12 18 7 7 14 3 5 10 12 9 23
output:
-6.0000000
result:
ok found '-6.0000000', expected '-6.0000000', error '-0.0000000'
Test #13:
score: 0
Accepted
time: 1ms
memory: 9964kb
input:
10 3 9 29 9 5 27 14 13 21 3 15 15 14 11 24 9 14 22 9 3 20 12 15 27 5 13 21 13 11 14
output:
-5.0000000
result:
ok found '-5.0000000', expected '-5.0000000', error '-0.0000000'
Test #14:
score: 0
Accepted
time: 1ms
memory: 10072kb
input:
10 3 13 11 3 5 20 9 10 1 5 5 25 10 1 29 6 10 26 1 15 1 10 10 18 6 6 2 14 6 20
output:
21.0000000
result:
ok found '21.0000000', expected '21.0000000', error '0.0000000'
Test #15:
score: 0
Accepted
time: 0ms
memory: 10028kb
input:
100 68 91 90 56 38 71 69 57 87 80 62 21 31 80 25 36 48 40 71 66 49 15 57 78 96 69 43 25 73 57 86 13 5 23 98 18 83 94 9 8 22 43 46 3 50 81 11 26 14 35 39 49 68 73 41 11 25 35 47 48 5 96 15 15 56 60 42 1 40 11 4 25 57 72 9 43 3 90 16 45 36 83 50 17 55 40 39 72 37 6 70 84 24 12 36 95 43 15 13 82 28 68 ...
output:
35.5000000
result:
ok found '35.5000000', expected '35.5000000', error '0.0000000'
Test #16:
score: 0
Accepted
time: 0ms
memory: 10096kb
input:
100 92 35 39 34 92 36 45 45 46 66 5 64 22 21 48 53 70 91 93 19 98 97 67 54 57 77 64 90 81 23 12 83 92 59 3 26 13 65 47 19 23 58 27 58 38 60 18 70 32 94 53 100 66 97 33 53 16 56 2 64 8 9 55 93 92 22 27 25 39 45 49 24 76 80 89 73 55 77 69 53 90 39 77 40 86 12 11 23 87 25 8 96 31 73 45 98 52 62 55 98 9...
output:
-100.0000000
result:
ok found '-100.0000000', expected '-100.0000000', error '-0.0000000'
Test #17:
score: 0
Accepted
time: 0ms
memory: 10072kb
input:
100 20 84 93 15 45 13 28 33 2 49 41 12 12 50 59 62 89 49 11 60 42 74 84 33 14 94 85 51 2 89 26 66 87 92 12 26 47 32 84 34 16 80 20 16 27 48 34 14 54 61 66 52 47 21 41 87 3 81 45 68 24 18 94 71 23 87 12 49 34 79 6 6 91 92 56 3 15 64 22 69 41 91 3 60 21 76 79 65 41 48 46 9 35 34 54 92 68 10 1 22 82 17...
output:
25.5000000
result:
ok found '25.5000000', expected '25.5000000', error '0.0000000'
Test #18:
score: 0
Accepted
time: 1ms
memory: 10076kb
input:
100 44 28 47 89 7 89 7 21 57 27 92 56 14 96 86 79 11 7 29 4 95 56 93 16 71 2 6 100 14 59 53 32 82 24 20 35 73 7 22 44 9 91 5 70 24 31 41 50 72 19 80 100 44 46 33 26 94 2 4 72 27 35 29 49 54 44 92 73 33 13 55 92 6 3 31 37 76 47 75 77 87 44 33 80 63 48 51 12 90 66 83 17 46 99 59 78 76 61 35 39 52 91 9...
output:
-57.0000000
result:
ok found '-57.0000000', expected '-57.0000000', error '-0.0000000'
Test #19:
score: 0
Accepted
time: 1ms
memory: 9980kb
input:
100 68 73 96 63 60 58 86 13 29 13 32 95 4 25 97 96 30 61 55 57 43 34 98 95 32 14 27 65 26 38 79 10 69 56 33 35 98 82 59 55 9 5 82 25 12 19 53 94 90 82 6 48 29 70 29 60 76 23 59 89 38 44 64 31 81 10 77 96 24 51 99 79 25 19 11 68 32 34 28 89 38 100 64 4 94 16 19 58 40 89 17 34 57 64 69 80 92 12 81 63 ...
output:
-81.5000000
result:
ok found '-81.5000000', expected '-81.5000000', error '-0.0000000'
Test #20:
score: 0
Accepted
time: 27ms
memory: 16620kb
input:
200000 14 11 10 2 6 10 18 13 7 8 5 11 13 5 14 16 14 2 4 5 17 4 20 7 7 3 9 9 8 11 15 1 20 19 13 3 19 17 15 9 16 20 5 5 15 2 1 6 11 14 13 8 13 7 2 3 10 7 18 9 1 4 12 17 3 7 14 4 17 12 14 11 18 11 6 11 7 15 10 4 13 13 2 14 2 1 18 7 3 18 12 16 19 17 13 7 7 17 1 20 9 2 2 1 2 6 13 11 7 11 9 20 16 3 9 4 4 ...
output:
2100856.0000000
result:
ok found '2100856.0000000', expected '2100856.0000000', error '0.0000000'
Test #21:
score: 0
Accepted
time: 27ms
memory: 16624kb
input:
200000 18 20 15 4 20 7 1 5 6 6 8 19 3 2 5 14 17 17 2 18 18 17 18 10 8 11 11 6 9 2 1 19 11 16 18 7 13 8 13 7 9 2 6 4 12 6 9 10 5 5 6 16 2 15 18 18 1 8 9 1 8 10 11 14 18 12 19 8 8 18 11 17 9 19 1 17 3 2 3 11 15 9 17 10 12 17 6 14 17 20 10 16 11 18 2 6 16 5 3 4 2 16 3 16 16 16 11 14 4 2 4 5 8 6 17 8 9 ...
output:
2101118.0000000
result:
ok found '2101118.0000000', expected '2101118.0000000', error '0.0000000'
Test #22:
score: 0
Accepted
time: 26ms
memory: 12812kb
input:
200000 6 4 9 1 13 15 16 13 6 13 8 19 5 11 12 11 3 11 4 19 6 3 7 9 9 20 12 3 17 12 4 6 6 8 3 8 19 3 6 14 13 13 19 18 20 13 20 10 3 20 4 4 11 15 15 12 12 9 16 9 20 7 6 12 1 17 4 11 7 12 16 4 8 11 17 11 19 5 16 3 14 5 3 18 15 17 17 20 7 19 8 9 18 7 12 16 12 12 17 8 11 10 4 19 11 18 18 17 13 9 12 10 20 ...
output:
2100494.0000000
result:
ok found '2100494.0000000', expected '2100494.0000000', error '0.0000000'
Test #23:
score: 0
Accepted
time: 26ms
memory: 12888kb
input:
200000 10 4 6 3 15 8 20 17 1 15 3 10 16 12 3 12 2 13 7 4 19 5 16 12 18 20 9 16 17 2 6 4 17 4 16 16 13 18 8 5 6 7 4 13 17 17 12 10 17 10 6 16 16 4 7 19 19 14 11 13 3 4 5 10 13 15 5 15 6 10 4 18 11 2 4 1 15 7 1 11 4 14 17 2 10 9 5 7 16 2 18 1 5 12 1 10 20 3 19 16 20 4 5 14 17 19 17 16 9 4 11 14 12 15 ...
output:
2104832.0000000
result:
ok found '2104832.0000000', expected '2104832.0000000', error '0.0000000'
Test #24:
score: 0
Accepted
time: 22ms
memory: 14720kb
input:
200000 14 9 12 13 9 5 7 10 8 13 7 10 6 2 10 9 4 3 9 12 7 3 6 11 15 12 10 1 10 9 12 19 4 17 4 16 6 5 5 19 7 6 1 3 6 20 3 14 15 5 20 7 10 4 11 13 10 15 2 5 14 13 16 12 8 20 6 15 17 4 17 20 7 18 3 12 15 10 14 19 19 10 8 6 1 1 9 14 6 4 12 2 16 13 10 4 8 15 13 20 1 19 2 1 11 5 8 15 14 16 15 19 8 18 9 19 ...
output:
2103344.0000000
result:
ok found '2103344.0000000', expected '2103344.0000000', error '0.0000000'
Test #25:
score: 0
Accepted
time: 23ms
memory: 16384kb
input:
200000 18 17 6 14 18 10 18 18 4 15 7 14 20 3 1 18 19 6 7 17 8 8 19 7 16 20 11 18 10 19 18 13 4 13 17 20 12 20 3 6 20 20 6 18 19 20 15 18 17 12 13 11 15 4 7 11 12 16 13 14 18 10 15 14 19 1 15 2 16 18 6 11 6 2 19 2 15 17 11 15 1 6 14 13 4 5 1 20 11 3 10 6 4 18 19 19 5 18 3 17 15 5 3 8 6 11 6 2 10 11 1...
output:
2099791.0000000
result:
ok found '2099791.0000000', expected '2099791.0000000', error '0.0000000'
Test #26:
score: 0
Accepted
time: 23ms
memory: 14884kb
input:
200000 6 17 15 12 20 7 6 18 19 2 18 17 6 16 8 15 1 16 5 2 16 6 8 6 13 9 8 15 2 17 12 3 15 5 18 4 18 11 5 13 12 15 19 12 15 20 6 14 15 10 7 7 12 17 19 6 19 1 8 18 5 15 15 16 2 19 4 6 7 12 11 13 1 13 6 16 19 4 16 19 16 2 20 17 19 13 13 7 5 2 4 3 15 7 16 13 13 9 17 1 4 19 4 15 8 17 13 5 15 2 18 5 12 11...
output:
2097689.0000000
result:
ok found '2097689.0000000', expected '2097689.0000000', error '0.0000000'
Test #27:
score: 0
Accepted
time: 22ms
memory: 16084kb
input:
200000 6 10 9 9 13 3 1 6 19 20 18 1 17 9 7 12 20 18 7 15 9 4 17 9 10 9 10 15 3 8 18 2 2 18 7 8 3 6 18 11 13 13 15 11 4 7 14 18 13 17 1 15 13 13 15 20 10 2 15 10 16 16 10 13 17 20 17 6 6 2 8 19 16 9 5 6 20 7 10 7 7 14 11 5 14 9 16 9 15 20 2 15 18 20 5 7 9 8 19 17 1 13 5 10 3 3 12 20 12 18 17 14 17 2 ...
output:
2104030.0000000
result:
ok found '2104030.0000000', expected '2104030.0000000', error '0.0000000'
Test #28:
score: 0
Accepted
time: 22ms
memory: 12808kb
input:
200000 14 14 19 19 15 8 4 18 14 2 17 9 11 7 18 9 6 8 9 15 9 1 11 8 11 17 11 16 15 14 16 12 1 10 20 13 17 5 20 18 10 12 20 5 13 11 18 2 7 16 14 3 2 5 7 18 17 3 6 18 20 10 9 11 8 5 6 13 5 16 12 6 11 1 5 17 16 14 3 3 13 7 1 17 13 9 8 20 4 7 19 16 5 5 11 1 17 16 1 17 14 7 6 1 1 9 2 3 16 5 1 7 9 5 13 3 1...
output:
2098865.0000000
result:
ok found '2098865.0000000', expected '2098865.0000000', error '0.0000000'
Test #29:
score: 0
Accepted
time: 22ms
memory: 12920kb
input:
200000 14 1 14 8 20 15 2 15 11 20 16 8 3 15 5 20 19 2 1 18 11 8 16 7 4 17 12 14 15 17 8 9 10 5 20 10 2 4 11 15 20 19 20 15 16 14 13 14 5 17 15 17 3 7 8 8 7 3 8 14 19 6 13 4 15 19 10 18 9 7 20 17 5 8 8 7 6 6 18 3 15 2 17 14 3 17 5 11 2 19 12 20 10 10 5 2 7 18 9 13 11 12 20 13 15 12 20 2 15 17 3 13 18...
output:
2102647.0000000
result:
ok found '2102647.0000000', expected '2102647.0000000', error '0.0000000'
Test #30:
score: 0
Accepted
time: 94ms
memory: 17284kb
input:
200000 558273441 797132086 95394395 410375788 603346154 991788394 501822655 954838746 104557620 987594944 800261563 456008910 944698458 473660405 947257686 43525951 515134254 221154267 581712330 247867513 268703732 553202136 786196487 556214428 384021989 736444004 231738414 760952860 568578734 24958...
output:
-999998979.0000000
result:
ok found '-999998979.0000000', expected '-999998979.0000000', error '-0.0000000'
Test #31:
score: 0
Accepted
time: 89ms
memory: 17332kb
input:
200000 441389569 370680930 99240357 581229458 437471216 536267171 936627342 298022734 325491775 269899126 474522003 217568653 587531252 498486839 464195305 120973868 798381976 80434530 750110349 687131754 560991673 878382618 156079804 73056107 406335846 606754213 944832635 486601913 447068854 291628...
output:
-999998827.0000000
result:
ok found '-999998827.0000000', expected '-999998827.0000000', error '-0.0000000'
Test #32:
score: 0
Accepted
time: 93ms
memory: 17412kb
input:
200000 914440289 239197071 838245102 311891640 711787765 931002844 106590814 641206722 546425930 257236013 853815147 274095693 820298639 673056376 831389820 198421785 931886595 84938984 623541071 831428699 413088125 793497691 671187313 440154683 133682407 887129829 657926856 772059478 470783166 1839...
output:
-999998765.0000000
result:
ok found '-999998765.0000000', expected '-999998765.0000000', error '-0.0000000'
Test #33:
score: 0
Accepted
time: 94ms
memory: 19868kb
input:
200000 797556417 812745915 432025656 632488413 250945531 770448917 541395501 984390710 177425494 834507491 528075586 740688141 758098729 697882809 53360143 275869702 215134317 239186542 791939089 125468747 560151874 268421277 186294823 956996362 861028968 612215845 665988373 647451634 644240583 3711...
output:
-999996518.0000000
result:
ok found '-999996518.0000000', expected '-999996518.0000000', error '-0.0000000'
Test #34:
score: 0
Accepted
time: 89ms
memory: 17544kb
input:
200000 975639841 241070567 25806210 363150595 230294784 314927693 416391676 327574698 398359649 116811673 202336026 797215180 255707331 577485050 420554658 58350323 498382040 243690996 665369811 269765692 707215622 888569055 996369628 178870745 883342825 482526053 379082594 78133391 667954895 263495...
output:
-999999511.0000000
result:
ok found '-999999511.0000000', expected '-999999511.0000000', error '-0.0000000'
Test #35:
score: 0
Accepted
time: 90ms
memory: 17816kb
input:
200000 858755969 814619412 469843659 388780073 209644038 299597958 146163660 815982878 619293805 104148560 581629169 413550732 193507421 602311484 642524981 281022432 631886658 397938555 538800533 563805741 704536267 213749537 366252945 695712424 610689386 352836262 92176815 658558252 251477719 1557...
output:
-999997283.0000000
result:
ok found '-999997283.0000000', expected '-999997283.0000000', error '-0.0000000'
Test #36:
score: 0
Accepted
time: 94ms
memory: 20836kb
input:
200000 331806689 388168256 63624213 264666446 43769099 844076735 875935643 864199570 400036472 681420038 550856905 470077772 131307512 776881021 304686792 358470349 915134381 552186113 707198551 413135390 556632719 688673122 586393159 917586808 633003243 782954982 805271037 238983113 570159328 48095...
output:
-999999554.0000000
result:
ok found '-999999554.0000000', expected '-999999554.0000000', error '-0.0000000'
Test #37:
score: 0
Accepted
time: 94ms
memory: 17340kb
input:
200000 214922817 256684396 802628959 290295924 318085649 388555512 750931818 502350854 620970628 963724220 930150048 936670219 774140306 801707454 231689819 730885562 48638999 851657863 580629273 852399631 703696468 308820900 101500668 284685383 655317100 653265190 518365258 964632166 593873640 2353...
output:
-999997884.0000000
result:
ok found '-999997884.0000000', expected '-999997884.0000000', error '-0.0000000'
Test #38:
score: 0
Accepted
time: 94ms
memory: 18000kb
input:
200000 393006241 830233241 396409512 20958105 297434902 373225777 480703802 550567546 841904783 951061106 459186296 993197259 711940396 976276991 748627438 808333480 331886722 710938125 749027291 146439679 995984408 928968678 616608177 801527062 382663661 523575398 231459479 545057027 472363760 1276...
output:
-999996509.0000000
result:
ok found '-999996509.0000000', expected '-999996509.0000000', error '-0.0000000'
Test #39:
score: 0
Accepted
time: 82ms
memory: 17988kb
input:
200000 176134865 314986440 192976643 734033578 470296570 221712417 307891930 5847500 328204234 654772568 801336351 645473605 899239098 215972848 448723117 856016589 938455076 584325619 580303234 558661085 890043594 977046894 648887104 547270709 472232271 700221682 176360621 781520985 119330492 54135...
output:
-999994005.0000000
result:
ok found '-999994005.0000000', expected '-999994005.0000000', error '-0.0000000'
Test #40:
score: 0
Accepted
time: 90ms
memory: 20668kb
input:
200000 59250993 448343796 786757197 759663055 449645824 471223898 37663913 494255680 549138390 642109454 330372599 702000645 396847700 390542385 110884928 638497210 221702798 883797369 748701252 702958030 182331534 597194672 163994613 769145092 494546128 275564594 889454842 656913142 997820613 94643...
output:
-999996865.0000000
result:
ok found '-999996865.0000000', expected '-999996865.0000000', error '-0.0000000'
Test #41:
score: 0
Accepted
time: 89ms
memory: 19836kb
input:
200000 532301713 316859936 525761942 635549429 283770885 310669971 912660088 837439668 475105249 219380932 709665742 463560389 334647790 120401522 37887955 715945127 209983225 743077631 327164678 142222270 34427987 922375153 679102122 285986772 367116881 145874803 897516359 87594899 726567629 133702...
output:
-999989816.0000000
result:
ok found '-999989816.0000000', expected '-999989816.0000000', error '-0.0000000'
Test #42:
score: 0
Accepted
time: 94ms
memory: 17792kb
input:
200000 415417842 890408781 119542496 661178906 558087435 372940 642432072 180623656 696039405 501685114 383926182 520087428 567415176 294971059 700049766 793393044 638455139 337516677 495562696 436262319 181491735 397298739 48985440 653085347 389430738 575993523 610610580 668019760 900025045 2600273...
output:
-999999319.0000000
result:
ok found '-999999319.0000000', expected '-999999319.0000000', error '-0.0000000'
Test #43:
score: 0
Accepted
time: 90ms
memory: 20720kb
input:
200000 298533970 463957625 418355754 391841088 537436689 839819013 222460951 523807644 916973560 489022001 353153918 281647172 210247971 319797493 627052793 870840961 921702862 196796940 663960714 580559264 473779676 17446517 859060245 169927026 411744595 446303731 28737505 248444620 923739358 91830...
output:
-999999481.0000000
result:
ok found '-999999481.0000000', expected '-999999481.0000000', error '-0.0000000'
Test #44:
score: 0
Accepted
time: 91ms
memory: 20460kb
input:
200000 476617394 332473766 157360499 417470566 76594454 384297789 247200230 866991632 842940420 66293479 732447061 897982724 148048061 494367030 289214604 93513070 55207480 496268690 537391437 19823505 620843424 932561591 374167754 391801409 139091156 316613939 36799023 974093673 802229478 665378284...
output:
-999997710.0000000
result:
ok found '-999997710.0000000', expected '-999997710.0000000', error '-0.0000000'
Test #45:
score: 0
Accepted
time: 90ms
memory: 17216kb
input:
200000 654700818 611055314 751141053 148132747 55943708 74000758 827229110 210175620 768907279 348597661 406707501 954509763 85848151 519193463 511184927 170960987 338455203 355548952 705789455 18896257 767907173 407485176 594307968 908643088 866437717 186924148 749893244 554518534 825943790 8526454...
output:
-999998470.0000000
result:
ok found '-999998470.0000000', expected '-999998470.0000000', error '-0.0000000'
Test #46:
score: 0
Accepted
time: 93ms
memory: 19068kb
input:
200000 832784242 334347262 900211207 318986417 890068769 913446831 557001093 258392312 989841435 335934547 786000644 716069507 728680945 693763000 733155250 953441608 471959821 655020702 284252881 163193202 620003625 732665658 964191285 130517472 888751574 617042868 462987465 280167587 849658103 399...
output:
-999997957.0000000
result:
ok found '-999997957.0000000', expected '-999997957.0000000', error '-0.0000000'
Test #47:
score: 0
Accepted
time: 89ms
memory: 19716kb
input:
200000 715900370 907896107 493991760 344615895 164385319 457925608 581740372 896543596 770584102 913206026 460261084 772596547 521256844 718589434 100349765 30889525 755207544 514300965 452650899 307490147 912291566 352813436 479298794 792583343 911065431 192385780 471048982 565625152 23115519 93221...
output:
-999997693.0000000
result:
ok found '-999997693.0000000', expected '-999997693.0000000', error '-0.0000000'
Test #48:
score: 0
Accepted
time: 86ms
memory: 20836kb
input:
200000 188951090 481444951 232996506 370245372 143734572 147628577 161769252 239727584 991518258 195510208 134521523 93964802 459056934 598191675 322320088 108337442 888712162 813772715 621048917 601530196 59355315 827737022 994406304 14457726 638411992 62695989 184143203 441017309 751862535 8245123...
output:
-999999902.0000000
result:
ok found '-999999902.0000000', expected '-999999902.0000000', error '-0.0000000'
Test #49:
score: 0
Accepted
time: 90ms
memory: 18088kb
input:
200000 971733980 8411329 916539861 153402642 119894963 979199114 574790997 628170531 504333076 476475878 640943162 524080762 806375605 656966653 307951111 531700502 700947328 230789962 961660335 995809167 117099285 540912158 282145820 449798541 487416391 495548188 922587305 808721998 103041947 98129...
output:
-999997130.0000000
result:
ok found '-999997130.0000000', expected '-999997130.0000000', error '-0.0000000'
Test #50:
score: 0
Accepted
time: 93ms
memory: 17864kb
input:
200000 149817404 581960174 510320415 473999416 99244217 818645187 449787172 676387223 430299935 463812764 315203602 435383609 744175695 536568894 234954138 609148419 984195051 385037521 835091057 289849216 264163034 161059936 92220625 816897116 509730248 70891100 930648823 239403755 126756259 990429...
output:
-999999684.0000000
result:
ok found '-999999684.0000000', expected '-999999684.0000000', error '-0.0000000'
Test #51:
score: 0
Accepted
time: 93ms
memory: 19888kb
input:
200000 327900828 450476314 249325161 204661597 933369278 508348156 884591859 19571211 651234091 41084242 989464041 196943353 976943081 856362623 897115949 686596336 117699669 684509271 708521779 434146160 411226782 341016226 607328134 333738795 237076809 941201308 643743044 819828616 710279083 17769...
output:
-999998211.0000000
result:
ok found '-999998211.0000000', expected '-999998211.0000000', error '-0.0000000'
Test #52:
score: 0
Accepted
time: 94ms
memory: 18364kb
input:
200000 211016956 878800967 548138418 230291075 912718532 347794228 54555330 362755199 872168246 323388425 368757185 253470393 619775875 735964865 824118976 764044253 105980096 838756829 581952501 728186209 558290531 256131299 122435644 555613179 964423370 811511517 651804561 400253477 28960692 69996...
output:
-999997901.0000000
result:
ok found '-999997901.0000000', expected '-999997901.0000000', error '-0.0000000'
Test #53:
score: 0
Accepted
time: 90ms
memory: 19676kb
input:
200000 94133084 452349811 287143164 255920552 187035081 892273005 489360018 705939188 798135106 310725311 43017625 15030136 412351774 55758594 486280787 546524875 534452010 843261283 750350520 577515858 555611175 876279077 197351665 72454858 986737227 241630237 364898782 125902530 52675004 817072436...
output:
-999995604.0000000
result:
ok found '-999995604.0000000', expected '-999995604.0000000', error '-0.0000000'
Test #54:
score: 0
Accepted
time: 82ms
memory: 20548kb
input:
200000 567183804 25898655 880923718 131806926 21160143 436751782 364356193 49123176 19069261 887996789 572053872 776589880 350151864 230328131 3218406 769196984 817699732 997508842 918748538 16780099 702674924 351202663 712459174 439553433 9051084 111940445 77993003 706327391 226132420 709372307 287...
output:
-999995094.0000000
result:
ok found '-999995094.0000000', expected '-999995094.0000000', error '-0.0000000'
Test #55:
score: 0
Accepted
time: 89ms
memory: 18076kb
input:
200000 450299932 599447500 324961167 157436404 509396 421422047 94128176 392307164 945036121 170300971 246314312 392925432 992984658 960187268 75445625 846644901 100947455 2013296 792179260 310820147 849738673 676383145 522533980 956395112 736397645 982250654 231278712 137009148 954879437 896639473 ...
output:
-999997310.0000000
result:
ok found '-999997310.0000000', expected '-999997310.0000000', error '-0.0000000'
Test #56:
score: 0
Accepted
time: 93ms
memory: 17188kb
input:
200000 628383356 467963640 623774425 888098585 979858650 670933528 823900160 735491152 871002980 157637858 920574751 449452471 930784748 134756806 592383244 924092818 234452073 156260854 665609982 455117092 142026613 296530922 37641489 883302199 758711502 707336670 944372933 12401305 128336853 78893...
output:
-999995345.0000000
result:
ok found '-999995345.0000000', expected '-999995345.0000000', error '-0.0000000'
Test #57:
score: 0
Accepted
time: 89ms
memory: 17440kb
input:
200000 511499485 41512484 217554979 913728063 813983712 215412304 403929039 78675140 91937135 734909336 299867895 211012215 868584839 159583239 519386271 1540735 222732500 160765308 539040704 894381333 994123066 916678700 407524806 105176583 781025359 987712286 657467155 592826166 152051166 68123921...
output:
-999998477.0000000
result:
ok found '-999998477.0000000', expected '-999998477.0000000', error '-0.0000000'
Test #58:
score: 0
Accepted
time: 89ms
memory: 18280kb
input:
200000 984550205 174869841 956559724 789614437 88300261 200082569 428668318 421859128 167647099 17213518 974128335 267539255 511417633 334152776 181548082 78988652 651204414 315012866 707438722 893454086 141186814 391602286 922632316 622018262 508371920 858022494 665528672 23507923 30541286 57353908...
output:
-999996461.0000000
result:
ok found '-999996461.0000000', expected '-999996461.0000000', error '-0.0000000'
Test #59:
score: 0
Accepted
time: 94ms
memory: 22336kb
input:
200000 622108903 996803515 640103080 17482106 64460652 326620403 691946959 810302075 385494621 152954996 775517269 552431022 8479408 392927754 726987616 797319008 168472284 732030114 193274332 582700353 493898081 104777423 210371832 202583269 357376318 141131590 403972774 391212612 231977593 8471565...
output:
-999999076.0000000
result:
ok found '-999999076.0000000', expected '-999999076.0000000', error '-0.0000000'
Test #60:
score: 0
Accepted
time: 11ms
memory: 12928kb
input:
200000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000000000 1 1 1000...
output:
199999999999999.0000000
result:
ok found '199999999999999.0000000', expected '199999999999999.0000000', error '0.0000000'
Test #61:
score: 0
Accepted
time: 21ms
memory: 16752kb
input:
200000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000...
output:
-1000000000.0000000
result:
ok found '-1000000000.0000000', expected '-1000000000.0000000', error '-0.0000000'
Test #62:
score: 0
Accepted
time: 28ms
memory: 16620kb
input:
200000 1 2 1 3 4 1 5 6 1 7 8 1 9 10 1 11 12 1 13 14 1 15 16 1 17 18 1 19 20 1 21 22 1 23 24 1 25 26 1 27 28 1 29 30 1 31 32 1 33 34 1 35 36 1 37 38 1 39 40 1 41 42 1 43 44 1 45 46 1 47 48 1 49 50 1 51 52 1 53 54 1 55 56 1 57 58 1 59 60 1 61 62 1 63 64 1 65 66 1 67 68 1 69 70 1 71 72 1 73 74 1 75 76 ...
output:
198999998985951.0000000
result:
ok found '198999998985951.0000000', expected '198999998985951.0000000', error '0.0000000'
Test #63:
score: 0
Accepted
time: 25ms
memory: 16276kb
input:
200000 1 2 1 3 4 1 5 6 1 7 8 1 9 10 1 11 12 1 13 14 1 15 16 1 17 18 1 19 20 1 21 22 1 23 24 1 25 26 1 27 28 1 29 30 1 31 32 1 33 34 1 35 36 1 37 38 1 39 40 1 41 42 1 43 44 1 45 46 1 47 48 1 49 50 1 51 52 1 53 54 1 55 56 1 57 58 1 59 60 1 61 62 1 63 64 1 65 66 1 67 68 1 69 70 1 71 72 1 73 74 1 75 76 ...
output:
197999995971951.0000000
result:
ok found '197999995971951.0000000', expected '197999995971951.0000000', error '0.0000000'
Test #64:
score: 0
Accepted
time: 26ms
memory: 17068kb
input:
200000 1 2 1 3 4 1 5 6 1 7 8 1 9 10 1 11 12 1 13 14 1 15 16 1 17 18 1 19 20 1 21 22 1 23 24 1 25 26 1 27 28 1 29 30 1 31 32 1 33 34 1 35 36 1 37 38 1 39 40 1 41 42 1 43 44 1 45 46 1 47 48 1 49 50 1 51 52 1 53 54 1 55 56 1 57 58 1 59 60 1 61 62 1 63 64 1 65 66 1 67 68 1 69 70 1 71 72 1 73 74 1 75 76 ...
output:
189999899859951.0000000
result:
ok found '189999899859951.0000000', expected '189999899859951.0000000', error '0.0000000'
Test #65:
score: 0
Accepted
time: 37ms
memory: 13172kb
input:
200000 1 2 1 3 4 1 5 6 1 7 8 1 9 10 1 11 12 1 13 14 1 15 16 1 17 18 1 19 20 1 21 22 1 23 24 1 25 26 1 27 28 1 29 30 1 31 32 1 33 34 1 35 36 1 37 38 1 39 40 1 41 42 1 43 44 1 45 46 1 47 48 1 49 50 1 51 52 1 53 54 1 55 56 1 57 58 1 59 60 1 61 62 1 63 64 1 65 66 1 67 68 1 69 70 1 71 72 1 73 74 1 75 76 ...
output:
179999599719951.0000000
result:
ok found '179999599719951.0000000', expected '179999599719951.0000000', error '0.0000000'
Test #66:
score: 0
Accepted
time: 43ms
memory: 17256kb
input:
200000 1 2 1 3 4 1 5 6 1 7 8 1 9 10 1 11 12 1 13 14 1 15 16 1 17 18 1 19 20 1 21 22 1 23 24 1 25 26 1 27 28 1 29 30 1 31 32 1 33 34 1 35 36 1 37 38 1 39 40 1 41 42 1 43 44 1 45 46 1 47 48 1 49 50 1 51 52 1 53 54 1 55 56 1 57 58 1 59 60 1 61 62 1 63 64 1 65 66 1 67 68 1 69 70 1 71 72 1 73 74 1 75 76 ...
output:
159998399439951.0000000
result:
ok found '159998399439951.0000000', expected '159998399439951.0000000', error '0.0000000'
Test #67:
score: 0
Accepted
time: 47ms
memory: 18024kb
input:
200000 1 2 1 3 4 1 5 6 1 7 8 1 9 10 1 11 12 1 13 14 1 15 16 1 17 18 1 19 20 1 21 22 1 23 24 1 25 26 1 27 28 1 29 30 1 31 32 1 33 34 1 35 36 1 37 38 1 39 40 1 41 42 1 43 44 1 45 46 1 47 48 1 49 50 1 51 52 1 53 54 1 55 56 1 57 58 1 59 60 1 61 62 1 63 64 1 65 66 1 67 68 1 69 70 1 71 72 1 73 74 1 75 76 ...
output:
119993598879951.0000000
result:
ok found '119993598879951.0000000', expected '119993598879951.0000000', error '0.0000000'
Test #68:
score: 0
Accepted
time: 1ms
memory: 9980kb
input:
20 1 1 20 2 2 19 3 3 18 4 4 17 5 5 16 6 6 15 7 7 14 8 8 13 9 9 12 10 10 11 11 11 10 12 12 9 13 13 8 14 14 7 15 15 6 16 16 5 17 17 4 18 18 3 19 19 2 20 20 1
output:
0.0000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #69:
score: 0
Accepted
time: 1ms
memory: 9976kb
input:
200 1 1 200 2 2 199 3 3 198 4 4 197 5 5 196 6 6 195 7 7 194 8 8 193 9 9 192 10 10 191 11 11 190 12 12 189 13 13 188 14 14 187 15 15 186 16 16 185 17 17 184 18 18 183 19 19 182 20 20 181 21 21 180 22 22 179 23 23 178 24 24 177 25 25 176 26 26 175 27 27 174 28 28 173 29 29 172 30 30 171 31 31 170 32 3...
output:
0.0000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #70:
score: 0
Accepted
time: 1ms
memory: 9996kb
input:
2000 1 1 2000 2 2 1999 3 3 1998 4 4 1997 5 5 1996 6 6 1995 7 7 1994 8 8 1993 9 9 1992 10 10 1991 11 11 1990 12 12 1989 13 13 1988 14 14 1987 15 15 1986 16 16 1985 17 17 1984 18 18 1983 19 19 1982 20 20 1981 21 21 1980 22 22 1979 23 23 1978 24 24 1977 25 25 1976 26 26 1975 27 27 1974 28 28 1973 29 29...
output:
0.0000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'
Test #71:
score: 0
Accepted
time: 52ms
memory: 16768kb
input:
200000 1 1 200000 2 2 199999 3 3 199998 4 4 199997 5 5 199996 6 6 199995 7 7 199994 8 8 199993 9 9 199992 10 10 199991 11 11 199990 12 12 199989 13 13 199988 14 14 199987 15 15 199986 16 16 199985 17 17 199984 18 18 199983 19 19 199982 20 20 199981 21 21 199980 22 22 199979 23 23 199978 24 24 199977...
output:
0.0000000
result:
ok found '0.0000000', expected '0.0000000', error '-0.0000000'