QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#606671 | #8934. Challenge NPC | Kanate# | AC ✓ | 59ms | 15428kb | C++14 | 1.0kb | 2024-10-03 11:23:58 | 2024-10-03 11:23:58 |
Judging History
answer
#include<bits/stdc++.h>
// #define int long long
//#define mod 1000000007
#define rep(i,j,k) for(int i=(j);i<=(k);i++)
#define per(i,j,k) for(int i=(j);i>=(k);i--)
using namespace std;
template<class T>void chkmax(T &a,T b){a=max(a,b);}
template<class T>void chkmin(T &a,T b){a=min(a,b);}
template<class T>T read(T &x)
{
x=0;T f=1;char c=getchar();
while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}
while(c>='0'&&c<='9'){x=x*10+(c^'0');c=getchar();}
return x*=f;
}
template<class T,class ...L>void read(T &x,L &...l){read(x),read(l...);}
template<class T>void write(T x)
{
if(x<0){putchar('-');x=-x;}
if(x>9){write(x/10);}putchar(x%10+'0');
}
template<class T>void write(T x,char c){write(x),putchar(c);}
int k;
set <pair<int,int>> g;
signed main()
{
read(k);
int n=2*(k+2);
rep(i,1,n)rep(j,i+1,n)if(i%2!=j%2)
{
if(i%2==1&&i+1==j)continue;
g.insert({i,j});
}
int c=2;
write(n,' '),write(g.size(),' '),write(c,'\n');
rep(i,1,n)write(i&1?1:2," \n"[i==n]);
for(auto [u,v]:g)
write(u,' '),write(v,'\n');
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3636kb
input:
1
output:
6 6 2 1 2 1 2 1 2 1 4 1 6 2 3 2 5 3 6 4 5
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
2
output:
8 12 2 1 2 1 2 1 2 1 2 1 4 1 6 1 8 2 3 2 5 2 7 3 6 3 8 4 5 4 7 5 8 6 7
result:
ok ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
3
output:
10 20 2 1 2 1 2 1 2 1 2 1 2 1 4 1 6 1 8 1 10 2 3 2 5 2 7 2 9 3 6 3 8 3 10 4 5 4 7 4 9 5 8 5 10 6 7 6 9 7 10 8 9
result:
ok ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
4
output:
12 30 2 1 2 1 2 1 2 1 2 1 2 1 2 1 4 1 6 1 8 1 10 1 12 2 3 2 5 2 7 2 9 2 11 3 6 3 8 3 10 3 12 4 5 4 7 4 9 4 11 5 8 5 10 5 12 6 7 6 9 6 11 7 10 7 12 8 9 8 11 9 12 10 11
result:
ok ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3636kb
input:
5
output:
14 42 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 4 1 6 1 8 1 10 1 12 1 14 2 3 2 5 2 7 2 9 2 11 2 13 3 6 3 8 3 10 3 12 3 14 4 5 4 7 4 9 4 11 4 13 5 8 5 10 5 12 5 14 6 7 6 9 6 11 6 13 7 10 7 12 7 14 8 9 8 11 8 13 9 12 9 14 10 11 10 13 11 14 12 13
result:
ok ok
Test #6:
score: 0
Accepted
time: 38ms
memory: 12424kb
input:
433
output:
870 188790 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2...
result:
ok ok
Test #7:
score: 0
Accepted
time: 59ms
memory: 15428kb
input:
500
output:
1004 251502 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
result:
ok ok
Test #8:
score: 0
Accepted
time: 48ms
memory: 15392kb
input:
499
output:
1002 250500 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 ...
result:
ok ok
Test #9:
score: 0
Accepted
time: 39ms
memory: 13496kb
input:
457
output:
918 210222 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2...
result:
ok ok
Test #10:
score: 0
Accepted
time: 57ms
memory: 15296kb
input:
497
output:
998 248502 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2...
result:
ok ok
Extra Test:
score: 0
Extra Test Passed