QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#553634#8934. Challenge NPCucup-team191#AC ✓18ms5312kbC++23667b2024-09-08 16:57:552024-09-08 16:57:55

Judging History

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

  • [2024-09-08 16:57:55]
  • 评测
  • 测评结果:AC
  • 用时:18ms
  • 内存:5312kb
  • [2024-09-08 16:57:55]
  • 提交

answer

#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
using ll=long long;
using pii=pair<int,int>;
using vi=vector<int>;
using vl=vector<ll>;
#define pb push_back
#define all(a) begin(a),end(a)

const int N=300010,MOD=1e9+7;
const char en='\n';
const ll LLINF=1ll<<60;

int k;

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cin>>k;
	vector<pii> ed;
	for (int i=0;i<k+2;++i) for (int p=0;p<2;++p)
	{
		for (int j=0;j<i;++j) ed.pb({i*2+p,j*2+!p});
	}
	cout<<(k+2)*2<<' '<<ed.size()<<' '<<2<<en;
	for (int i=0;i<(k+2)*2;++i) cout<<i%2+1<<' ';
	cout<<en;
	for (auto x: ed) cout<<x.x+1<<' '<<x.y+1<<en;
}

这程序好像有点Bug,我给组数据试试?

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3520kb

input:

1

output:

6 6 2
1 2 1 2 1 2 
3 2
4 1
5 2
5 4
6 1
6 3

result:

ok ok

Test #2:

score: 0
Accepted
time: 1ms
memory: 3596kb

input:

2

output:

8 12 2
1 2 1 2 1 2 1 2 
3 2
4 1
5 2
5 4
6 1
6 3
7 2
7 4
7 6
8 1
8 3
8 5

result:

ok ok

Test #3:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

3

output:

10 20 2
1 2 1 2 1 2 1 2 1 2 
3 2
4 1
5 2
5 4
6 1
6 3
7 2
7 4
7 6
8 1
8 3
8 5
9 2
9 4
9 6
9 8
10 1
10 3
10 5
10 7

result:

ok ok

Test #4:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

4

output:

12 30 2
1 2 1 2 1 2 1 2 1 2 1 2 
3 2
4 1
5 2
5 4
6 1
6 3
7 2
7 4
7 6
8 1
8 3
8 5
9 2
9 4
9 6
9 8
10 1
10 3
10 5
10 7
11 2
11 4
11 6
11 8
11 10
12 1
12 3
12 5
12 7
12 9

result:

ok ok

Test #5:

score: 0
Accepted
time: 0ms
memory: 3744kb

input:

5

output:

14 42 2
1 2 1 2 1 2 1 2 1 2 1 2 1 2 
3 2
4 1
5 2
5 4
6 1
6 3
7 2
7 4
7 6
8 1
8 3
8 5
9 2
9 4
9 6
9 8
10 1
10 3
10 5
10 7
11 2
11 4
11 6
11 8
11 10
12 1
12 3
12 5
12 7
12 9
13 2
13 4
13 6
13 8
13 10
13 12
14 1
14 3
14 5
14 7
14 9
14 11

result:

ok ok

Test #6:

score: 0
Accepted
time: 14ms
memory: 5244kb

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: 15ms
memory: 5312kb

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: 18ms
memory: 5128kb

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: 11ms
memory: 5160kb

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: 18ms
memory: 5148kb

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