QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#120481 | #3273. Datalab | zhouhuanyi | 10 | 531ms | 3904kb | C++11 | 461b | 2023-07-06 19:07:32 | 2023-07-06 19:07:33 |
Judging History
answer
#include"datalab.h"
#include<iostream>
#include<cstdio>
#include<vector>
#define N 8191
using namespace std;
bitset<N+1>A;
bitset<N+1>B;
vector<int>solve(int k,int LIMIT)
{
bool op;
vector<int>p(k);
p[k-2]=-1,p[k-1]=1;
for (int i=k-3;i>=0;--i)
{
op=1;
for (int j=0;j<=k-1;++j) A[j]=(j==i);
B=Add(A,A);
for (int j=0;j<=k-1;++j) op&=(B[j]==(j==i+1));
if (op) p[i]=p[i+1];
else p[i]=-p[i+1];
}
return p;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 521ms
memory: 3784kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #2:
score: 10
Accepted
time: 525ms
memory: 3792kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #3:
score: 10
Accepted
time: 521ms
memory: 3896kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #4:
score: 10
Accepted
time: 529ms
memory: 3788kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #5:
score: 10
Accepted
time: 530ms
memory: 3724kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #6:
score: 10
Accepted
time: 530ms
memory: 3792kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #7:
score: 10
Accepted
time: 530ms
memory: 3728kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #8:
score: 10
Accepted
time: 529ms
memory: 3792kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #9:
score: 10
Accepted
time: 531ms
memory: 3848kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #10:
score: 10
Accepted
time: 526ms
memory: 3880kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #11:
score: 10
Accepted
time: 531ms
memory: 3896kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #12:
score: 10
Accepted
time: 529ms
memory: 3904kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Test #13:
score: 10
Accepted
time: 524ms
memory: 3788kb
output:
AC 8190
result:
ok Correct, 8190 queries used
Subtask #2:
score: 0
Wrong Answer
Test #14:
score: 0
Wrong Answer
time: 356ms
memory: 3672kb
output:
WA Too Many Queries!
result:
wrong answer
Subtask #3:
score: 0
Wrong Answer
Test #46:
score: 0
Wrong Answer
time: 264ms
memory: 3612kb
output:
WA Too Many Queries!
result:
wrong answer