QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#663121 | #2670. Arranging shoes | Pioneer# | 50 | 10ms | 15088kb | C++20 | 1.4kb | 2024-10-21 13:24:33 | 2024-10-21 13:24:40 |
Judging History
answer
#include "shoes.h"
#include <bits/stdc++.h>
#define sz(s) ((int)s.size())
#define close gg
using namespace std;
const int MAX=1e5+10;
struct segtree{
int t[4*MAX];
void build(int v,int tl,int tr){
if(tl==tr){
t[v]=1;
return;
}
int tm=(tl+tr)/2;
build(2*v,tl,tm);
build(2*v+1,tm+1,tr);
t[v]=t[2*v]+t[2*v+1];
}
void update(int v,int tl,int tr,int pos,int x){
if(tl==tr){
t[v]+=x;
return;
}
int tm=(tl+tr)/2;
if(pos<=tm)update(2*v,tl,tm,pos,x);
else update(2*v+1,tm+1,tr,pos,x);
t[v]=t[2*v]+t[2*v+1];
}
int get(int v,int tl,int tr,int l,int r){
if(l>r||tl>r||l>tr)return 0;
if(l<=tl&&tr<=r)return t[v];
int tm=(tl+tr)/2;
return get(2*v,tl,tm,l,r)+get(2*v+1,tm+1,tr,l,r);
}
}t;
set<int> open[MAX],close[MAX];
long long count_swaps(vector<int> S) {
int n=sz(S);
t.build(1,0,n-1);
for(int i=0;i<n;i++){
S[i]=-S[i];
if(S[i]>0)open[S[i]].insert(i);
else close[-S[i]].insert(i);
}
long long ans=0;
for(int i=0;i<n;i++){
if(t.get(1,0,n-1,i,i)==0)continue;
if(S[i]>0){
open[S[i]].erase(i);
int pos=*close[S[i]].begin();
close[S[i]].erase(pos);
ans+=t.get(1,0,n-1,i+1,pos-1);
t.update(1,0,n-1,pos,-1);
}
else{
S[i]=-S[i];
close[S[i]].erase(i);
int pos=*open[S[i]].begin();
open[S[i]].erase(pos);
ans+=t.get(1,0,n-1,i,pos-1);
t.update(1,0,n-1,pos,-1);
}
}
return ans;
}
详细
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 3ms
memory: 13496kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1 -1 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #2:
score: 10
Accepted
time: 0ms
memory: 13184kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1 1 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Subtask #2:
score: 20
Accepted
Dependency #1:
100%
Accepted
Test #3:
score: 20
Accepted
time: 0ms
memory: 13152kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -1 -2 2 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 2
result:
ok 3 lines
Test #4:
score: 20
Accepted
time: 0ms
memory: 13452kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -2 1 -1 2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 3
result:
ok 3 lines
Test #5:
score: 20
Accepted
time: 0ms
memory: 13820kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -2 2 -1 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #6:
score: 20
Accepted
time: 0ms
memory: 13888kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -1 -2 2 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 2
result:
ok 3 lines
Test #7:
score: 20
Accepted
time: 0ms
memory: 13668kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -1 2 1 -2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 2
result:
ok 3 lines
Test #8:
score: 20
Accepted
time: 0ms
memory: 13964kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 2 -2 -1 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Test #9:
score: 20
Accepted
time: 2ms
memory: 13924kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 1 2 -2 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 4
result:
ok 3 lines
Test #10:
score: 20
Accepted
time: 2ms
memory: 13436kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 2 -2 1 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 2
result:
ok 3 lines
Test #11:
score: 20
Accepted
time: 3ms
memory: 13888kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 1 2 -2 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 4
result:
ok 3 lines
Test #12:
score: 20
Accepted
time: 0ms
memory: 13184kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 3 -3 -2 1 2 3 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 5
result:
ok 3 lines
Test #13:
score: 20
Accepted
time: 3ms
memory: 14744kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 -1 1 -2 2 -4 4 -3 3
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #14:
score: 20
Accepted
time: 0ms
memory: 13152kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 -2 3 -4 -3 -2 2 4 2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 7
result:
ok 3 lines
Test #15:
score: 20
Accepted
time: 0ms
memory: 14040kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 1 2 2 2 -2 -2 -2 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 13
result:
ok 3 lines
Test #16:
score: 20
Accepted
time: 0ms
memory: 13876kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 4 4 4 4 -4 -4 -4 -4
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 10
result:
ok 3 lines
Test #17:
score: 20
Accepted
time: 0ms
memory: 13792kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 2 -2 3 -3 2 -2 3 -3
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 4
result:
ok 3 lines
Test #18:
score: 20
Accepted
time: 0ms
memory: 13152kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 1 2 4 2 -4 -1 -2 -2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 12
result:
ok 3 lines
Test #19:
score: 20
Accepted
time: 2ms
memory: 14092kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 2 4 1 3 -2 -4 -1 -3
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 10
result:
ok 3 lines
Test #20:
score: 20
Accepted
time: 3ms
memory: 14544kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 2 -1 -1 3 -3 1 1 -2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 13
result:
ok 3 lines
Test #21:
score: 20
Accepted
time: 0ms
memory: 14280kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 -1 -3 -1 -1 1 1 3 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 7
result:
ok 3 lines
Test #22:
score: 20
Accepted
time: 3ms
memory: 13900kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 3 3 1 1 -1 -1 -3 -3
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 14
result:
ok 3 lines
Test #23:
score: 20
Accepted
time: 3ms
memory: 13152kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 4 3 4 1 4 -4 -1 -4 -3
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 13
result:
ok 3 lines
Test #24:
score: 20
Accepted
time: 0ms
memory: 13472kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 6 6 2 -5 -1 3 -3 1 4 -2 -6 5 -4
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 25
result:
ok 3 lines
Test #25:
score: 20
Accepted
time: 3ms
memory: 13768kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 7 -7 5 -7 1 -1 -3 -5 7 7 3 4 -6 6 -4
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 18
result:
ok 3 lines
Test #26:
score: 20
Accepted
time: 3ms
memory: 14400kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 -5 5 -3 3 -6 6 -8 8 -4 4 -7 7 -1 1 -2 2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #27:
score: 20
Accepted
time: 3ms
memory: 13464kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 -6 7 6 -7 3 -1 -5 5 -3 1 3 -4 -3 4 8 -8
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 11
result:
ok 3 lines
Test #28:
score: 20
Accepted
time: 0ms
memory: 14824kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 5 2 8 4 5 1 1 3 -3 -1 -1 -5 -4 -8 -2 -5
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 56
result:
ok 3 lines
Test #29:
score: 20
Accepted
time: 3ms
memory: 13820kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 8 -8 8 8 -8 -8 8 -8 8 -8 8 8 -8 8 -8 -8
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 11
result:
ok 3 lines
Test #30:
score: 20
Accepted
time: 3ms
memory: 14492kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 2 -2 2 -2 2 -2 1 -1 2 -2 2 -2 2 -2 2 -2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 8
result:
ok 3 lines
Test #31:
score: 20
Accepted
time: 0ms
memory: 14688kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 5 5 8 5 5 4 5 8 -8 -5 -5 -5 -4 -8 -5 -5
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 41
result:
ok 3 lines
Test #32:
score: 20
Accepted
time: 0ms
memory: 13272kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 7 8 1 2 2 7 7 2 -7 -8 -1 -2 -2 -7 -7 -2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 36
result:
ok 3 lines
Test #33:
score: 20
Accepted
time: 3ms
memory: 13668kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 4 1 -8 8 5 -8 -6 -5 5 6 8 -5 -8 8 -1 -4
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 36
result:
ok 3 lines
Test #34:
score: 20
Accepted
time: 0ms
memory: 13760kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 -2 -8 -4 -4 -3 -8 -1 -5 5 1 8 3 4 4 8 2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 48
result:
ok 3 lines
Test #35:
score: 20
Accepted
time: 0ms
memory: 13112kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 1 5 7 5 5 3 6 5 -5 -6 -3 -5 -5 -7 -5 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 52
result:
ok 3 lines
Test #36:
score: 20
Accepted
time: 3ms
memory: 14700kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 4 3 5 2 4 8 6 2 -2 -6 -8 -4 -2 -5 -3 -4
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 52
result:
ok 3 lines
Subtask #3:
score: 0
Runtime Error
Test #37:
score: 20
Accepted
time: 0ms
memory: 14572kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -2 -2 2 2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Test #38:
score: 20
Accepted
time: 3ms
memory: 14672kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -1 1 -1 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #39:
score: 20
Accepted
time: 0ms
memory: 14680kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -1 1 -1 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #40:
score: 20
Accepted
time: 0ms
memory: 13152kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -2 -2 2 2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Test #41:
score: 20
Accepted
time: 3ms
memory: 14572kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -1 1 1 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Test #42:
score: 20
Accepted
time: 3ms
memory: 14512kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 2 -2 -2 2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Test #43:
score: 20
Accepted
time: 2ms
memory: 13364kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 1 1 -1 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 3
result:
ok 3 lines
Test #44:
score: 20
Accepted
time: 3ms
memory: 14936kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 2 -2 2 -2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 2
result:
ok 3 lines
Test #45:
score: 20
Accepted
time: 0ms
memory: 14588kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 1 1 -1 -1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 3
result:
ok 3 lines
Test #46:
score: 20
Accepted
time: 0ms
memory: 13176kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 3 2 -2 -2 2 -2 2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Test #47:
score: 20
Accepted
time: 2ms
memory: 13188kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 8 -3 -3 -3 3 -3 -3 -3 3 3 3 3 3 3 3 -3 -3
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 15
result:
ok 3 lines
Test #48:
score: 20
Accepted
time: 3ms
memory: 13364kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 11 5 5 -5 5 5 -5 -5 5 5 -5 5 -5 -5 5 -5 -5 -5 -5 5 5 -5 5
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 19
result:
ok 3 lines
Test #49:
score: 20
Accepted
time: 2ms
memory: 13156kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 43 -35 -35 -35 35 35 -35 -35 -35 35 -35 35 -35 35 35 -35 35 35 -35 -35 35 35 35 -35 -35 -35 35 -35 35 -35 35 35 35 35 35 35 35 -35 35 -35 -35 -35 -35 35 35 35 35 -35 35 -35 35 35 -35 -35 -35 35 35 -35 35 -35 35 35 -35 35 35 35 35 -35 -35 -35 -35 -35 35 -35 -35 -3...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 117
result:
ok 3 lines
Test #50:
score: 20
Accepted
time: 0ms
memory: 13328kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 117 50 -50 -50 -50 50 50 -50 50 -50 -50 50 50 50 50 50 -50 -50 -50 50 -50 50 -50 50 50 50 50 50 50 50 -50 50 50 50 -50 -50 -50 50 50 -50 -50 50 50 50 -50 -50 -50 -50 -50 50 -50 50 -50 -50 50 -50 50 50 50 -50 50 -50 50 50 50 50 50 -50 50 50 -50 50 50 -50 50 -50 -5...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1000
result:
ok 3 lines
Test #51:
score: 20
Accepted
time: 0ms
memory: 14344kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 304 -44 -44 44 44 44 -44 -44 44 44 44 44 -44 -44 -44 44 -44 44 44 -44 -44 44 44 44 -44 -44 -44 -44 44 -44 44 -44 44 44 -44 -44 -44 44 44 -44 44 44 44 -44 -44 44 44 44 44 44 -44 44 44 -44 -44 -44 44 -44 44 -44 44 -44 -44 -44 -44 -44 -44 -44 44 -44 -44 44 44 -44 -4...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1711
result:
ok 3 lines
Test #52:
score: 20
Accepted
time: 0ms
memory: 14820kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 999 -636 636 636 -636 636 636 -636 636 -636 636 -636 636 -636 636 -636 636 -636 636 -636 -636 -636 636 636 -636 -636 -636 636 -636 636 -636 -636 -636 -636 636 -636 -636 636 -636 636 636 -636 -636 -636 636 -636 -636 -636 -636 636 636 636 636 636 -636 -636 -636 -63...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 19586
result:
ok 3 lines
Test #53:
score: 20
Accepted
time: 3ms
memory: 14692kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1001 -498 -498 -498 -498 -498 -498 -498 -498 -498 -498 -498 498 -498 -498 -498 -498 498 -498 -498 -498 498 -498 498 498 498 498 -498 498 -498 498 -498 -498 498 -498 -498 498 -498 498 -498 -498 498 -498 498 498 498 498 -498 -498 -498 498 498 -498 -498 498 -498 -49...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 29174
result:
ok 3 lines
Test #54:
score: 20
Accepted
time: 5ms
memory: 15088kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 9998 -1466 1466 1466 1466 1466 1466 -1466 1466 1466 -1466 1466 1466 1466 1466 -1466 -1466 1466 1466 -1466 1466 -1466 -1466 1466 -1466 1466 -1466 -1466 1466 -1466 1466 -1466 -1466 -1466 -1466 1466 1466 1466 1466 -1466 -1466 -1466 -1466 -1466 -1466 -1466 1466 -1466...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 434563
result:
ok 3 lines
Test #55:
score: 20
Accepted
time: 10ms
memory: 13908kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 10003 -9391 -9391 9391 9391 -9391 -9391 -9391 9391 9391 9391 -9391 -9391 9391 -9391 9391 -9391 -9391 -9391 -9391 9391 -9391 9391 -9391 9391 -9391 -9391 9391 -9391 -9391 9391 9391 9391 9391 -9391 -9391 -9391 -9391 -9391 9391 -9391 -9391 -9391 9391 -9391 -9391 9391...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 662066
result:
ok 3 lines
Test #56:
score: 0
Runtime Error
input:
08f55b3f-c300-4051-a472-59ca2a776178 99999 -20650 -20650 20650 20650 -20650 -20650 -20650 20650 20650 20650 -20650 -20650 20650 20650 20650 20650 20650 20650 -20650 20650 20650 -20650 20650 20650 20650 20650 20650 -20650 20650 20650 20650 -20650 -20650 20650 20650 -20650 -20650 20650 20650 20650 206...
output:
Unauthorized output
result:
Subtask #4:
score: 0
Runtime Error
Test #74:
score: 15
Accepted
time: 3ms
memory: 14100kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1 -1 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #75:
score: 15
Accepted
time: 0ms
memory: 14212kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -1 -2 1 2
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Test #76:
score: 15
Accepted
time: 0ms
memory: 14632kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -2 -1 2 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Test #77:
score: 15
Accepted
time: 0ms
memory: 13180kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 2 -1 -1 1 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1
result:
ok 3 lines
Test #78:
score: 0
Runtime Error
input:
08f55b3f-c300-4051-a472-59ca2a776178 99998 -93375 -85998 -57472 -57320 -92144 -31526 -99604 -77181 -65443 -97629 -29716 -1904 -93293 -41761 -55949 -50927 -80082 -21357 -51929 -54 -33477 -36300 -49484 -70830 -98314 -40123 -79568 -89806 -90528 -51711 -49394 -2023 -42435 -61625 -61156 -82943 -47590 -69...
output:
Unauthorized output
result:
Subtask #5:
score: 20
Accepted
Dependency #2:
100%
Accepted
Test #84:
score: 20
Accepted
time: 0ms
memory: 14224kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 11 -1 -3 -5 3 11 10 2 4 -2 -11 -10 -4 9 -9 -6 11 5 1 -8 -11 8 6
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 48
result:
ok 3 lines
Test #85:
score: 20
Accepted
time: 0ms
memory: 13696kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 43 -41 -36 30 16 38 31 2 19 -17 -2 11 -23 34 -19 25 -11 23 29 7 -20 -43 -1 9 -14 -30 17 -38 -28 28 -4 -12 13 -16 -18 1 21 -39 -34 -31 -35 33 -3 18 12 20 -9 26 -27 -26 5 -6 -33 -37 39 -24 36 -40 -25 41 40 -42 3 -29 32 -15 8 35 14 24 10 -10 -22 6 -7 42 4 -13 22 -32...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 748
result:
ok 3 lines
Test #86:
score: 20
Accepted
time: 0ms
memory: 14736kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 117 -102 50 1 42 -56 104 47 18 -29 15 -100 52 54 14 40 -11 -21 -2 102 67 -27 -42 94 -24 -1 -95 72 -115 -16 101 -69 -103 -25 -71 24 41 117 82 19 -81 23 -31 -46 105 -35 -94 -13 -32 -110 -9 36 12 -47 43 62 77 -113 -70 46 81 32 89 116 -57 -48 10 -55 -60 59 -66 38 113...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 6364
result:
ok 3 lines
Test #87:
score: 20
Accepted
time: 0ms
memory: 14228kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 304 -253 187 15 29 -151 303 174 -29 -18 184 -157 145 -67 -109 -270 -172 -222 265 211 156 91 -9 25 -133 -166 -290 227 -294 31 -189 141 151 255 -187 161 -94 94 70 -135 279 -106 168 50 154 64 -270 -69 -83 165 -170 -154 62 278 -45 -259 -224 145 50 -251 238 164 33 -26...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 40471
result:
ok 3 lines
Test #88:
score: 20
Accepted
time: 0ms
memory: 14324kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 999 -756 815 -883 643 -7 685 735 -124 691 388 -838 681 -390 -640 602 -607 -59 54 386 -68 -564 463 -125 -323 -668 875 424 147 940 -62 620 -769 -959 677 826 953 931 171 -657 -15 -272 456 -235 780 -856 885 -936 -994 -546 -677 -622 -20 -954 86 -528 684 180 975 -175 -...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 505420
result:
ok 3 lines
Test #89:
score: 20
Accepted
time: 0ms
memory: 13576kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 -781 781 -172 172 -358 358 -731 731 -755 755 -916 916 -57 57 -949 949 -354 354 -984 984 -649 649 -749 749 -403 403 -776 776 -797 797 -597 597 -97 97 -499 499 -170 170 -598 598 -117 117 -706 706 -156 156 -897 897 -513 513 -877 877 -198 198 -786 786 -190 190 -...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #90:
score: 20
Accepted
time: 0ms
memory: 14680kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 -467 -303 467 303 -194 194 -337 -697 697 212 -212 337 37 -37 -854 854 442 -442 488 165 -165 -698 -548 698 761 911 548 -761 -911 -488 292 360 -292 -360 -210 210 412 -412 -690 690 615 777 -615 -672 772 860 -772 -860 672 98 -98 789 -777 -879 879 -789 763 989 -7...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 50139
result:
ok 3 lines
Test #91:
score: 20
Accepted
time: 3ms
memory: 13268kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 482 646 33 633 908 983 220 499 756 906 916 569 968 505 612 748 476 771 451 981 405 295 242 567 55 467 727 353 450 714 214 678 453 588 263 830 266 379 670 300 640 957 465 64 739 889 858 576 931 352 729 134 485 519 464 559 924 660 843 585 969 439 524 211 485 7...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 851849
result:
ok 3 lines
Test #92:
score: 20
Accepted
time: 0ms
memory: 13264kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 596 -596 65 124 104 821 -821 764 -764 -104 -124 493 311 -311 761 848 759 312 986 -986 214 66 -66 -214 -312 -759 742 954 726 37 -37 -726 125 -125 48 879 -879 333 -333 -48 -954 -742 -848 729 -729 -761 -493 203 -203 -65 420 -420 152 -152 691 -691 149 196 770 -7...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 42016
result:
ok 3 lines
Test #93:
score: 20
Accepted
time: 4ms
memory: 13268kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 320 -320 476 -476 776 -776 864 -864 182 -182 519 -519 279 -279 316 -316 557 -557 287 -287 803 -803 95 -95 876 -876 13 -13 675 -675 762 -762 607 -607 596 -596 881 -881 601 -601 312 -312 102 -102 236 -236 883 -883 900 -900 740 -740 868 -868 1 -1 433 -433 510 -...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1000
result:
ok 3 lines
Test #94:
score: 20
Accepted
time: 0ms
memory: 14120kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 282 858 10 431 93 451 831 768 325 46 246 968 895 43 423 34 923 474 667 139 11 32 74 230 482 795 289 245 380 817 922 553 526 542 38 865 424 291 679 849 525 141 799 76 932 43 128 208 266 609 466 631 939 478 361 451 70 152 993 545 476 249 681 585 960 98 621 152...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 677826
result:
ok 3 lines
Test #95:
score: 20
Accepted
time: 0ms
memory: 13756kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 656 841 638 497 592 553 396 730 298 703 53 969 217 74 167 574 383 507 471 547 568 373 180 553 497 616 862 612 129 840 168 477 558 981 308 862 198 179 822 168 969 403 209 612 633 791 471 200 903 598 733 591 882 365 841 593 789 731 758 82 903 173 985 600 146 2...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 500500
result:
ok 3 lines
Test #96:
score: 20
Accepted
time: 0ms
memory: 14304kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 901 145 844 251 826 -571 833 813 564 -707 -972 191 975 -159 -195 440 930 291 -401 985 846 617 -926 -186 354 809 733 470 -251 733 186 861 835 850 -707 -243 222 557 -362 356 5 957 733 218 171 351 -733 -837 972 -972 88 -46 -801 -552 975 901 898 -939 -362 -11 -1...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 311826
result:
ok 3 lines
Test #97:
score: 20
Accepted
time: 0ms
memory: 13568kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 -997 -739 -997 -189 -997 -203 -203 -189 -997 -739 -997 -544 -997 -997 -997 -997 -189 -431 -189 -997 -997 -997 -822 -203 -189 -997 -997 -997 -739 -822 -739 -997 -544 -743 -203 -997 -189 -203 -203 -203 -997 -997 -203 -997 -997 -997 -189 -739 -203 -997 -739 -18...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 528922
result:
ok 3 lines
Test #98:
score: 20
Accepted
time: 0ms
memory: 13824kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 199 19...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 500500
result:
ok 3 lines
Test #99:
score: 20
Accepted
time: 3ms
memory: 14248kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1000 917 531 200 739 477 766 234 243 816 755 74 625 132 342 432 83 930 304 330 616 230 614 532 58 822 398 977 205 929 935 194 791 329 897 378 426 33 4 109 222 161 602 164 474 369 270 923 801 502 663 98 344 856 707 753 945 155 444 455 82 561 254 762 772 415 168 73...
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 1000000
result:
ok 3 lines
Subtask #6:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
100%
Accepted
Dependency #3:
0%