QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#486750 | #2670. Arranging shoes | Dan4Life# | 50 | 2ms | 5448kb | C++23 | 910b | 2024-07-22 00:10:33 | 2024-07-22 00:10:35 |
Judging History
answer
#include "shoes.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) begin(a),end(a)
using ll = long long;
using vi = vector<int>;
using ar2 = array<int,2>;
const int mxN = (int)1e5+10;
int n, fen[mxN];
void upd(int x, int v){
for(x++;x<mxN; x+=x&-x)fen[x]+=v;
}
int sum(int x){
int s = 0;
for(x++;x>0;x-=x&-x) s+=fen[x];
return s;
}
map<int,deque<int>> v;
ll count_swaps(vector<int> a) {
n = sz(a); v.clear(); ll ans = 0;
set<ar2> S; S.clear();
for(int i = 0; i < n; i++)
v[a[i]].pb(i), S.insert({i,a[i]});
while(sz(S)){
int i = (*S.begin())[0];
int I = i+sum(i);
int x = -(*S.begin())[1];
int j = v[x][0];
int J = j+sum(j);
upd(i,-1); upd(j,-1);
ans+=J-I-(x>0);
v[x].pop_front();
v[-x].pop_front();
S.erase(S.begin());
S.erase({j,a[j]});
}
return ans;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 0ms
memory: 3888kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1 -1 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #2:
score: 0
Accepted
time: 0ms
memory: 3840kb
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: 4120kb
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: 0
Accepted
time: 0ms
memory: 3920kb
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: 0
Accepted
time: 0ms
memory: 3892kb
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: 0
Accepted
time: 0ms
memory: 3920kb
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: 0
Accepted
time: 0ms
memory: 3844kb
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: 0
Accepted
time: 0ms
memory: 3932kb
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: 0
Accepted
time: 0ms
memory: 3860kb
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: 0
Accepted
time: 0ms
memory: 3872kb
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: 0
Accepted
time: 0ms
memory: 3856kb
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: 0
Accepted
time: 0ms
memory: 3852kb
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: 0
Accepted
time: 0ms
memory: 4148kb
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: 0
Accepted
time: 0ms
memory: 3848kb
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: 0
Accepted
time: 0ms
memory: 3860kb
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: 0
Accepted
time: 0ms
memory: 3932kb
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: 0
Accepted
time: 0ms
memory: 3852kb
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: 0
Accepted
time: 0ms
memory: 3860kb
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: 0
Accepted
time: 0ms
memory: 3912kb
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: 0
Accepted
time: 0ms
memory: 3852kb
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: 0
Accepted
time: 0ms
memory: 3916kb
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: 0
Accepted
time: 0ms
memory: 3932kb
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: 0
Accepted
time: 0ms
memory: 3916kb
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: 0
Accepted
time: 0ms
memory: 4160kb
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: 0
Accepted
time: 0ms
memory: 3936kb
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: 0
Accepted
time: 0ms
memory: 3856kb
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: 0
Accepted
time: 0ms
memory: 3856kb
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: 0
Accepted
time: 0ms
memory: 3804kb
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: 0
Accepted
time: 0ms
memory: 4152kb
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: 0
Accepted
time: 0ms
memory: 3936kb
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: 0
Accepted
time: 0ms
memory: 3932kb
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: 0
Accepted
time: 0ms
memory: 3888kb
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: 0
Accepted
time: 0ms
memory: 3868kb
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: 0
Accepted
time: 0ms
memory: 3848kb
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: 0
Accepted
time: 0ms
memory: 3852kb
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: 0
Accepted
time: 0ms
memory: 3868kb
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: 3916kb
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: 0
Accepted
time: 0ms
memory: 3892kb
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: 0
Accepted
time: 0ms
memory: 3852kb
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: 0
Accepted
time: 0ms
memory: 4144kb
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: 0
Accepted
time: 0ms
memory: 3860kb
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: 0
Accepted
time: 0ms
memory: 3912kb
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: 0
Accepted
time: 0ms
memory: 4144kb
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: 0
Accepted
time: 0ms
memory: 3920kb
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: 0
Accepted
time: 0ms
memory: 3888kb
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: 0
Accepted
time: 0ms
memory: 3868kb
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: 0
Accepted
time: 0ms
memory: 3856kb
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: 0
Accepted
time: 0ms
memory: 3916kb
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: 0
Accepted
time: 0ms
memory: 4144kb
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: 0
Accepted
time: 0ms
memory: 4148kb
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: 0
Accepted
time: 0ms
memory: 4180kb
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: 0
Accepted
time: 1ms
memory: 3996kb
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: 0
Accepted
time: 1ms
memory: 3952kb
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: 0
Accepted
time: 2ms
memory: 4564kb
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: 0
Accepted
time: 2ms
memory: 4528kb
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: -20
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: 0ms
memory: 3812kb
input:
08f55b3f-c300-4051-a472-59ca2a776178 1 -1 1
output:
9ce55564-5404-428a-8d2e-0d809c85101e OK 0
result:
ok 3 lines
Test #75:
score: 0
Accepted
time: 0ms
memory: 3812kb
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: 0
Accepted
time: 0ms
memory: 3856kb
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: 0
Accepted
time: 0ms
memory: 3864kb
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: -15
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: 3840kb
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: 0
Accepted
time: 0ms
memory: 3976kb
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: 0
Accepted
time: 0ms
memory: 4016kb
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: 0
Accepted
time: 0ms
memory: 4436kb
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: 0
Accepted
time: 2ms
memory: 5420kb
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: 0
Accepted
time: 2ms
memory: 5448kb
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: 0
Accepted
time: 2ms
memory: 5220kb
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: 0
Accepted
time: 2ms
memory: 5056kb
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: 0
Accepted
time: 2ms
memory: 5184kb
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: 0
Accepted
time: 0ms
memory: 5028kb
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: 0
Accepted
time: 1ms
memory: 4572kb
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: 0
Accepted
time: 1ms
memory: 4712kb
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: 0
Accepted
time: 1ms
memory: 4292kb
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: 0
Accepted
time: 1ms
memory: 3972kb
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: 0
Accepted
time: 1ms
memory: 3960kb
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: 0
Accepted
time: 2ms
memory: 5356kb
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%