QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#683121 | #8934. Challenge NPC | lqh2024# | WA | 0ms | 3604kb | C++20 | 889b | 2024-10-27 18:51:37 | 2024-10-27 18:51:37 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define int long long
int id ;
struct node{
int u,v ;
};
vector<node>edge ;
vector<int>g[2] ;
void create(int k){
int nx1 , nx2 ;
nx1 = ++id ; nx2 = ++id ;
for(auto x:g[1])
edge.push_back((node){nx1,x}) ;
for(auto x:g[0])
edge.push_back((node){nx2,x}) ;
g[0].push_back(nx1) ;
g[1].push_back(nx2) ;
}
int a[10000] ;
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
g[0].push_back(++id) ;
g[1].push_back(++id) ;
int k ; cin >> k ;
for(int i = 2 ; i <= k+2 ; i++)
create(i) ;
cout<<id<<" "<<edge.size()<<" "<<2<<"\n" ;
for(auto x:g[1])
a[x] = 1 ;
for(int i = 1 ; i <= id ; i++)
cout<<a[i]<<" " ;
cout<<"\n" ;
for(auto [x,y] : edge)
cout<<x<<" "<<y<<"\n" ;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3604kb
input:
1
output:
6 6 2 0 1 0 1 0 1 3 2 4 1 5 2 5 4 6 1 6 3
result:
wrong answer Integer parameter [name=col] equals to 0, violates the range [1, 2]