QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#719249 | #9428. Be Positive | Layn# | WA | 0ms | 3732kb | C++14 | 556b | 2024-11-06 23:39:07 | 2024-11-06 23:39:07 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int T,n;
int main() {
scanf("%d",&T);
while(T--) {
scanf("%d",&n);
if(n==1||n%4==0){puts("No");continue;}
if(n==2){puts("1 0");continue;}
printf("1 0 2 ");
for(int i=3;i<n;i+=4) {
if(i+1>=n)break;
printf("%d ",i+1);
if(i>=n)break;
printf("%d ",i);
if(i+2>=n)break;
printf("%d ",i+2);
if(i+3>=n)break;
printf("%d ",i+3);
}puts("");
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3732kb
input:
4 1 2 3 4
output:
No 1 0 1 0 2 No
result:
wrong answer Token parameter [name=first] equals to "No", doesn't correspond to pattern "[0-9a-z]*" (test case 1)