QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#665713 | #8934. Challenge NPC | Layn | WA | 0ms | 3744kb | C++14 | 556b | 2024-10-22 14:54:20 | 2024-10-22 14:54:34 |
Judging History
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]