QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#719249#9428. Be PositiveLayn#WA 0ms3732kbC++14556b2024-11-06 23:39:072024-11-06 23:39:07

Judging History

你现在查看的是最新测评结果

  • [2024-11-06 23:39:07]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3732kb
  • [2024-11-06 23:39:07]
  • 提交

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("");
    }
}

详细

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)