QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#563733 | #8934. Challenge NPC | ucup-team3691# | AC ✓ | 24ms | 5080kb | C++20 | 841b | 2024-09-14 15:31:10 | 2024-09-14 15:31:11 |
Judging History
answer
#include <iostream>
#include <vector>
using namespace std;
vector<int>vec[1005];
int main()
{
int n,i,j,k,l,edges=0;
cin>>n;
n=n*2+4;
for(i=4;i<=n;i+=2)
{
for(j=1;j<i/2;j++)
{
if((i/2-j)%2==1)
{
vec[j*2-1].push_back(i-1);
vec[j*2].push_back(i);
edges+=2;
}
else
{
vec[j*2-1].push_back(i);
vec[j*2].push_back(i-1);
edges+=2;
}
}
}
cout<<n<<" "<<edges<<" "<<2<<'\n';
for(i=1;i<=n;i++)
{
cout<<(i%4)/2+1<<" ";
}
cout<<'\n';
for(i=1;i<=n;i++)
{
for(auto j:vec[i])
{
cout<<i<<" "<<j<<'\n';
}
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3596kb
input:
1
output:
6 6 2 1 2 2 1 1 2 1 3 1 6 2 4 2 5 3 5 4 6
result:
ok ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
2
output:
8 12 2 1 2 2 1 1 2 2 1 1 3 1 6 1 7 2 4 2 5 2 8 3 5 3 8 4 6 4 7 5 7 6 8
result:
ok ok
Test #3:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
3
output:
10 20 2 1 2 2 1 1 2 2 1 1 2 1 3 1 6 1 7 1 10 2 4 2 5 2 8 2 9 3 5 3 8 3 9 4 6 4 7 4 10 5 7 5 10 6 8 6 9 7 9 8 10
result:
ok ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
4
output:
12 30 2 1 2 2 1 1 2 2 1 1 2 2 1 1 3 1 6 1 7 1 10 1 11 2 4 2 5 2 8 2 9 2 12 3 5 3 8 3 9 3 12 4 6 4 7 4 10 4 11 5 7 5 10 5 11 6 8 6 9 6 12 7 9 7 12 8 10 8 11 9 11 10 12
result:
ok ok
Test #5:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
5
output:
14 42 2 1 2 2 1 1 2 2 1 1 2 2 1 1 2 1 3 1 6 1 7 1 10 1 11 1 14 2 4 2 5 2 8 2 9 2 12 2 13 3 5 3 8 3 9 3 12 3 13 4 6 4 7 4 10 4 11 4 14 5 7 5 10 5 11 5 14 6 8 6 9 6 12 6 13 7 9 7 12 7 13 8 10 8 11 8 14 9 11 9 14 10 12 10 13 11 13 12 14
result:
ok ok
Test #6:
score: 0
Accepted
time: 10ms
memory: 4672kb
input:
433
output:
870 188790 2 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1...
result:
ok ok
Test #7:
score: 0
Accepted
time: 23ms
memory: 5080kb
input:
500
output:
1004 251502 2 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 ...
result:
ok ok
Test #8:
score: 0
Accepted
time: 18ms
memory: 4952kb
input:
499
output:
1002 250500 2 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 ...
result:
ok ok
Test #9:
score: 0
Accepted
time: 15ms
memory: 4856kb
input:
457
output:
918 210222 2 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1...
result:
ok ok
Test #10:
score: 0
Accepted
time: 24ms
memory: 5072kb
input:
497
output:
998 248502 2 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1...
result:
ok ok
Extra Test:
score: 0
Extra Test Passed