QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#20152 | #2425. The Collection Game | Wu_Ren# | 0 | 11ms | 3824kb | C++20 | 640b | 2022-02-14 21:13:30 | 2022-05-03 09:08:10 |
Judging History
answer
#include <bits/stdc++.h>
#include "swaps.h"
using namespace std;
int p[510];
void solve(int n,int v){
for(int i=0;i<n;i++) p[i]=i+1;
int len=1;
while(len<n){
len<<=1;
for(int i=0;i<n;i+=len){
int r=min(i+len,n);
if(i+len/2<r) reverse(p+i+(len/2),p+r);
}
for(int k=len/2;k>=1;k/=2){
for(int i=0;i+k<n;i+=2*k){
for(int y=min(i+2*k,n)-1,x=i+k-1;x>=i&&y>=i+k;x--,y--) schedule(p[y],p[x]);
}
int o=0;
vector<int> res=visit();
for(int i=0;i+k<n;i+=2*k){
for(int y=min(i+2*k,n)-1,x=i+k-1;x>=i&&y>=i+k;x--,y--) if(res[o++]) swap(p[x],p[y]);
}
}
}
answer(vector<int>(p,p+n));
}
详细
Subtask #1:
score: 0
Accepted
Test #1:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
4 50 2 0 0 2 1 0 2 0 1
output:
946149565 2 1 946149565 4 3 547293220 946149565 3 2 946149565 4 1 547293220 946149565 3 1 946149565 2 4 547293220 345685428 1 3 2 4
result:
points 1.0 points 1.0 Correct
Subtask #2:
score: 0
Wrong Answer
Test #2:
score: 5
Accepted
time: 3ms
memory: 3820kb
input:
10 5000 5 1 1 1 1 1 4 1 0 1 0 5 1 0 0 1 0 4 1 0 0 0 4 1 0 0 1 5 1 1 0 0 0 2 1 1 4 1 0 0 0 4 0 0 1 1 5 0 0 1 0 0
output:
946149565 2 1 946149565 4 3 946149565 6 5 946149565 8 7 946149565 10 9 547293220 946149565 4 1 946149565 3 2 946149565 8 5 946149565 7 6 547293220 946149565 4 2 946149565 1 3 946149565 8 6 946149565 5 7 946149565 9 10 547293220 946149565 6 1 946149565 8 3 946149565 5 2 946149565 7 4 547293220 946149...
result:
points 1.0 points 1.0 Correct
Test #3:
score: -5
Wrong Answer
time: 6ms
memory: 3812kb
input:
100 5000 50 1 0 1 0 0 0 1 1 0 1 1 1 0 1 1 1 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 0 1 0 1 0 1 1 1 1 1 1 0 0 0 0 0 1 50 1 0 1 0 0 0 1 1 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 1 1 0 1 0 1 0 0 0 1 0 1 0 1 0 0 0 1 0 1 1 1 1 1 1 1 0 50 1 0 1 1 0 1 1 0 1 1 0 1 1 0 0 1 1 1 1 0 1 0 1 0 1 0 0 0 0 1 0 1 1 1 1 1 1 1 0 1 1 ...
output:
946149565 2 1 946149565 4 3 946149565 6 5 946149565 8 7 946149565 10 9 946149565 12 11 946149565 14 13 946149565 16 15 946149565 18 17 946149565 20 19 946149565 22 21 946149565 24 23 946149565 26 25 946149565 28 27 946149565 30 29 946149565 32 31 946149565 34 33 946149565 36 35 946149565 38 37 94614...
result:
points 0.0 points 0.0 Not correct
Subtask #3:
score: 0
Wrong Answer
Test #10:
score: 0
Wrong Answer
time: 11ms
memory: 3672kb
input:
500 1000 250 1 1 1 0 1 1 0 1 1 0 1 0 1 1 0 0 1 1 0 0 0 1 0 0 0 1 0 1 1 0 0 1 0 1 1 1 1 0 1 1 0 1 0 1 1 0 1 0 1 1 0 1 0 0 0 1 1 0 0 1 0 0 0 1 1 0 1 1 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 1 1 0 1 1 1 0 1 1 1 1 0 1 0 0 0 1 1 0 0 1 1 0 1 1 1 0 0 0 1 1 1 1 0 1 0 0 0 0 1 1 1 0 0 1 1 0 0 1 1 1 0 0 1 0 0 0 1 1 0 1...
output:
946149565 2 1 946149565 4 3 946149565 6 5 946149565 8 7 946149565 10 9 946149565 12 11 946149565 14 13 946149565 16 15 946149565 18 17 946149565 20 19 946149565 22 21 946149565 24 23 946149565 26 25 946149565 28 27 946149565 30 29 946149565 32 31 946149565 34 33 946149565 36 35 946149565 38 37 94614...
result:
points 0.0 points 0.0 Not correct
Subtask #4:
score: 0
Wrong Answer
Test #15:
score: 3
Accepted
time: 1ms
memory: 3684kb
input:
10 5000 5 1 1 1 1 1 4 1 1 1 1 5 1 1 1 1 1 4 1 1 1 1 4 1 1 1 1 5 1 1 1 1 1 2 1 1 4 1 1 1 1 4 1 1 1 1 5 1 1 1 1 1
output:
946149565 2 1 946149565 4 3 946149565 6 5 946149565 8 7 946149565 10 9 547293220 946149565 4 1 946149565 3 2 946149565 8 5 946149565 7 6 547293220 946149565 4 3 946149565 1 2 946149565 8 7 946149565 5 6 946149565 9 10 547293220 946149565 8 2 946149565 7 1 946149565 5 3 946149565 6 4 547293220 946149...
result:
points 1.0 points 1.0 Correct
Test #16:
score: -3
Wrong Answer
time: 5ms
memory: 3824kb
input:
100 5000 50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 50 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...
output:
946149565 2 1 946149565 4 3 946149565 6 5 946149565 8 7 946149565 10 9 946149565 12 11 946149565 14 13 946149565 16 15 946149565 18 17 946149565 20 19 946149565 22 21 946149565 24 23 946149565 26 25 946149565 28 27 946149565 30 29 946149565 32 31 946149565 34 33 946149565 36 35 946149565 38 37 94614...
result:
points 0.0 points 0.0 Not correct
Subtask #5:
score: 0
Skipped
Dependency #4:
0%
Subtask #6:
score: 0
Skipped
Dependency #4:
0%
Subtask #7:
score: 0
Skipped
Dependency #2:
0%
Subtask #8:
score: 0
Skipped
Dependency #4:
0%
Subtask #9:
score: 0
Skipped
Dependency #3:
0%
Subtask #10:
score: 0
Skipped
Dependency #8:
0%
Subtask #11:
score: 0
Skipped
Dependency #9:
0%
Subtask #12:
score: 0
Skipped
Dependency #10:
0%
Subtask #13:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #2:
0%