QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#665713#8934. Challenge NPCLaynWA 0ms3744kbC++14556b2024-10-22 14:54:202024-10-22 14:54:34

Judging History

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

  • [2024-10-22 14:54:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3744kb
  • [2024-10-22 14:54:20]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
const int N=2000;
int n,m,k,c,a[N];
vector<int>t[2];
int main() {
    scanf("%d",&k);
    n=2*(k+1),m=k*k+k+1,c=2;
    printf("%d %d %d\n",n,m,c);
    t[0].push_back(0),t[1].push_back(1),printf("1 2\n"),a[0]=1,a[1]=2;
    for(int i=1;i<=k;i++) {
        int d=i&1,cur=2*i;
        for(auto j:t[d^1])if(a[j]<i)printf("%d %d\n",j+1,cur+1);
        t[d].push_back(cur),a[cur]=i;
        for(auto j:t[d])if(a[j]<i+2)printf("%d %d\n",j+1,cur+2);
        t[d^1].push_back(cur+1),a[cur+1]=i+2;
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3744kb

input:

1

output:

4 3 2
1 2
2 4
3 4

result:

wrong answer Integer parameter [name=col] equals to 4, violates the range [1, 2]