QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#83627#5528. Least Annoying Constructive ProblemCrysflyAC ✓267ms5496kbC++171.4kb2023-03-02 19:25:472023-03-02 19:25:47

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-03-02 19:25:47]
  • 评测
  • 测评结果:AC
  • 用时:267ms
  • 内存:5496kb
  • [2023-03-02 19:25:47]
  • 提交

answer

// what is matter? never mind. 
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
#define ll long long
#define ull unsigned long long
using namespace std;
inline int read()
{
	char c=getchar();int x=0;bool f=0;
	for(;!isdigit(c);c=getchar())f^=!(c^45);
	for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
	if(f)x=-x;return x;
}

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

#define maxn 400005
#define inf 0x3f3f3f3f

int n,m,a[505][505];
pii e[maxn];

void sol0()
{
	For(i,1,n-1){
		a[i][n]=a[n][i]=(i-1)*(n/2)+1;
		int l=i,r=i;
		For(j,2,n/2){
			--l,++r;
			if(l==0)l=n-1;
			if(r==n)r=1;
			a[l][r]=a[r][l]=(i-1)*(n/2)+j;
		}
	}
	m=n*(n-1)/2;
	For(i,1,n)For(j,i+1,n)e[a[i][j]]=mkp(i,j);
}

void sol1()
{
	int i=1;
	For(_,1,n){
		int l=i,r=i+1;
		if(r==n+1)r=1;
		For(__,1,n/2){
			e[++m]=mkp(min(l,r),max(l,r));
			--l,++r;
			if(l==0)l=n;
			if(r==n+1)r=1;
		}
		i=l;
	}
}

int fa[9999];
int gf(int x){
	while(x^fa[x])x=fa[x]=fa[fa[x]];
	return x;
}
void chk(int l,int r){
	For(i,1,n)fa[i]=i;
	For(i,l,r){
		if(gf(e[i].fi)==gf(e[i].se))assert(0);
		fa[gf(e[i].fi)]=gf(e[i].se);
	}
}

signed main()
{
	n=read();
	if(n%2==0)sol0();
	else sol1();
	For(i,1,m) cout<<e[i].fi<<" "<<e[i].se<<"\n"; 
	For(i,1,m-(n-1)+1) chk(i,i+(n-1)-1);
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 2ms
memory: 3376kb

input:

3

output:

1 2
1 3
2 3

result:

ok Correct

Test #2:

score: 0
Accepted
time: 2ms
memory: 3512kb

input:

4

output:

1 4
2 3
2 4
1 3
3 4
1 2

result:

ok Correct

Test #3:

score: 0
Accepted
time: 2ms
memory: 3300kb

input:

5

output:

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

result:

ok Correct

Test #4:

score: 0
Accepted
time: 2ms
memory: 3376kb

input:

6

output:

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

result:

ok Correct

Test #5:

score: 0
Accepted
time: 2ms
memory: 3396kb

input:

7

output:

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

result:

ok Correct

Test #6:

score: 0
Accepted
time: 2ms
memory: 3280kb

input:

8

output:

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

result:

ok Correct

Test #7:

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

input:

9

output:

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

result:

ok Correct

Test #8:

score: 0
Accepted
time: 2ms
memory: 3284kb

input:

10

output:

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

result:

ok Correct

Test #9:

score: 0
Accepted
time: 2ms
memory: 3500kb

input:

11

output:

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

result:

ok Correct

Test #10:

score: 0
Accepted
time: 2ms
memory: 3332kb

input:

12

output:

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

result:

ok Correct

Test #11:

score: 0
Accepted
time: 2ms
memory: 3344kb

input:

13

output:

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

result:

ok Correct

Test #12:

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

input:

14

output:

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

result:

ok Correct

Test #13:

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

input:

15

output:

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

result:

ok Correct

Test #14:

score: 0
Accepted
time: 2ms
memory: 3384kb

input:

16

output:

1 16
2 15
3 14
4 13
5 12
6 11
7 10
8 9
2 16
1 3
4 15
5 14
6 13
7 12
8 11
9 10
3 16
2 4
1 5
6 15
7 14
8 13
9 12
10 11
4 16
3 5
2 6
1 7
8 15
9 14
10 13
11 12
5 16
4 6
3 7
2 8
1 9
10 15
11 14
12 13
6 16
5 7
4 8
3 9
2 10
1 11
12 15
13 14
7 16
6 8
5 9
4 10
3 11
2 12
1 13
14 15
8 16
7 9
6 10
5 11
4 12
3 1...

result:

ok Correct

Test #15:

score: 0
Accepted
time: 2ms
memory: 3380kb

input:

17

output:

1 2
3 17
4 16
5 15
6 14
7 13
8 12
9 11
10 11
9 12
8 13
7 14
6 15
5 16
4 17
1 3
2 3
1 4
5 17
6 16
7 15
8 14
9 13
10 12
11 12
10 13
9 14
8 15
7 16
6 17
1 5
2 4
3 4
2 5
1 6
7 17
8 16
9 15
10 14
11 13
12 13
11 14
10 15
9 16
8 17
1 7
2 6
3 5
4 5
3 6
2 7
1 8
9 17
10 16
11 15
12 14
13 14
12 15
11 16
10 17
...

result:

ok Correct

Test #16:

score: 0
Accepted
time: 2ms
memory: 3408kb

input:

18

output:

1 18
2 17
3 16
4 15
5 14
6 13
7 12
8 11
9 10
2 18
1 3
4 17
5 16
6 15
7 14
8 13
9 12
10 11
3 18
2 4
1 5
6 17
7 16
8 15
9 14
10 13
11 12
4 18
3 5
2 6
1 7
8 17
9 16
10 15
11 14
12 13
5 18
4 6
3 7
2 8
1 9
10 17
11 16
12 15
13 14
6 18
5 7
4 8
3 9
2 10
1 11
12 17
13 16
14 15
7 18
6 8
5 9
4 10
3 11
2 12
1 ...

result:

ok Correct

Test #17:

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

input:

19

output:

1 2
3 19
4 18
5 17
6 16
7 15
8 14
9 13
10 12
11 12
10 13
9 14
8 15
7 16
6 17
5 18
4 19
1 3
2 3
1 4
5 19
6 18
7 17
8 16
9 15
10 14
11 13
12 13
11 14
10 15
9 16
8 17
7 18
6 19
1 5
2 4
3 4
2 5
1 6
7 19
8 18
9 17
10 16
11 15
12 14
13 14
12 15
11 16
10 17
9 18
8 19
1 7
2 6
3 5
4 5
3 6
2 7
1 8
9 19
10 18
...

result:

ok Correct

Test #18:

score: 0
Accepted
time: 2ms
memory: 3300kb

input:

20

output:

1 20
2 19
3 18
4 17
5 16
6 15
7 14
8 13
9 12
10 11
2 20
1 3
4 19
5 18
6 17
7 16
8 15
9 14
10 13
11 12
3 20
2 4
1 5
6 19
7 18
8 17
9 16
10 15
11 14
12 13
4 20
3 5
2 6
1 7
8 19
9 18
10 17
11 16
12 15
13 14
5 20
4 6
3 7
2 8
1 9
10 19
11 18
12 17
13 16
14 15
6 20
5 7
4 8
3 9
2 10
1 11
12 19
13 18
14 17
...

result:

ok Correct

Test #19:

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

input:

21

output:

1 2
3 21
4 20
5 19
6 18
7 17
8 16
9 15
10 14
11 13
12 13
11 14
10 15
9 16
8 17
7 18
6 19
5 20
4 21
1 3
2 3
1 4
5 21
6 20
7 19
8 18
9 17
10 16
11 15
12 14
13 14
12 15
11 16
10 17
9 18
8 19
7 20
6 21
1 5
2 4
3 4
2 5
1 6
7 21
8 20
9 19
10 18
11 17
12 16
13 15
14 15
13 16
12 17
11 18
10 19
9 20
8 21
1 7...

result:

ok Correct

Test #20:

score: 0
Accepted
time: 2ms
memory: 3552kb

input:

22

output:

1 22
2 21
3 20
4 19
5 18
6 17
7 16
8 15
9 14
10 13
11 12
2 22
1 3
4 21
5 20
6 19
7 18
8 17
9 16
10 15
11 14
12 13
3 22
2 4
1 5
6 21
7 20
8 19
9 18
10 17
11 16
12 15
13 14
4 22
3 5
2 6
1 7
8 21
9 20
10 19
11 18
12 17
13 16
14 15
5 22
4 6
3 7
2 8
1 9
10 21
11 20
12 19
13 18
14 17
15 16
6 22
5 7
4 8
3 ...

result:

ok Correct

Test #21:

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

input:

23

output:

1 2
3 23
4 22
5 21
6 20
7 19
8 18
9 17
10 16
11 15
12 14
13 14
12 15
11 16
10 17
9 18
8 19
7 20
6 21
5 22
4 23
1 3
2 3
1 4
5 23
6 22
7 21
8 20
9 19
10 18
11 17
12 16
13 15
14 15
13 16
12 17
11 18
10 19
9 20
8 21
7 22
6 23
1 5
2 4
3 4
2 5
1 6
7 23
8 22
9 21
10 20
11 19
12 18
13 17
14 16
15 16
14 17
1...

result:

ok Correct

Test #22:

score: 0
Accepted
time: 2ms
memory: 3412kb

input:

24

output:

1 24
2 23
3 22
4 21
5 20
6 19
7 18
8 17
9 16
10 15
11 14
12 13
2 24
1 3
4 23
5 22
6 21
7 20
8 19
9 18
10 17
11 16
12 15
13 14
3 24
2 4
1 5
6 23
7 22
8 21
9 20
10 19
11 18
12 17
13 16
14 15
4 24
3 5
2 6
1 7
8 23
9 22
10 21
11 20
12 19
13 18
14 17
15 16
5 24
4 6
3 7
2 8
1 9
10 23
11 22
12 21
13 20
14 ...

result:

ok Correct

Test #23:

score: 0
Accepted
time: 2ms
memory: 3256kb

input:

25

output:

1 2
3 25
4 24
5 23
6 22
7 21
8 20
9 19
10 18
11 17
12 16
13 15
14 15
13 16
12 17
11 18
10 19
9 20
8 21
7 22
6 23
5 24
4 25
1 3
2 3
1 4
5 25
6 24
7 23
8 22
9 21
10 20
11 19
12 18
13 17
14 16
15 16
14 17
13 18
12 19
11 20
10 21
9 22
8 23
7 24
6 25
1 5
2 4
3 4
2 5
1 6
7 25
8 24
9 23
10 22
11 21
12 20
1...

result:

ok Correct

Test #24:

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

input:

26

output:

1 26
2 25
3 24
4 23
5 22
6 21
7 20
8 19
9 18
10 17
11 16
12 15
13 14
2 26
1 3
4 25
5 24
6 23
7 22
8 21
9 20
10 19
11 18
12 17
13 16
14 15
3 26
2 4
1 5
6 25
7 24
8 23
9 22
10 21
11 20
12 19
13 18
14 17
15 16
4 26
3 5
2 6
1 7
8 25
9 24
10 23
11 22
12 21
13 20
14 19
15 18
16 17
5 26
4 6
3 7
2 8
1 9
10 ...

result:

ok Correct

Test #25:

score: 0
Accepted
time: 2ms
memory: 3260kb

input:

27

output:

1 2
3 27
4 26
5 25
6 24
7 23
8 22
9 21
10 20
11 19
12 18
13 17
14 16
15 16
14 17
13 18
12 19
11 20
10 21
9 22
8 23
7 24
6 25
5 26
4 27
1 3
2 3
1 4
5 27
6 26
7 25
8 24
9 23
10 22
11 21
12 20
13 19
14 18
15 17
16 17
15 18
14 19
13 20
12 21
11 22
10 23
9 24
8 25
7 26
6 27
1 5
2 4
3 4
2 5
1 6
7 27
8 26
...

result:

ok Correct

Test #26:

score: 0
Accepted
time: 2ms
memory: 3432kb

input:

28

output:

1 28
2 27
3 26
4 25
5 24
6 23
7 22
8 21
9 20
10 19
11 18
12 17
13 16
14 15
2 28
1 3
4 27
5 26
6 25
7 24
8 23
9 22
10 21
11 20
12 19
13 18
14 17
15 16
3 28
2 4
1 5
6 27
7 26
8 25
9 24
10 23
11 22
12 21
13 20
14 19
15 18
16 17
4 28
3 5
2 6
1 7
8 27
9 26
10 25
11 24
12 23
13 22
14 21
15 20
16 19
17 18
...

result:

ok Correct

Test #27:

score: 0
Accepted
time: 2ms
memory: 3524kb

input:

29

output:

1 2
3 29
4 28
5 27
6 26
7 25
8 24
9 23
10 22
11 21
12 20
13 19
14 18
15 17
16 17
15 18
14 19
13 20
12 21
11 22
10 23
9 24
8 25
7 26
6 27
5 28
4 29
1 3
2 3
1 4
5 29
6 28
7 27
8 26
9 25
10 24
11 23
12 22
13 21
14 20
15 19
16 18
17 18
16 19
15 20
14 21
13 22
12 23
11 24
10 25
9 26
8 27
7 28
6 29
1 5
2 ...

result:

ok Correct

Test #28:

score: 0
Accepted
time: 2ms
memory: 3376kb

input:

30

output:

1 30
2 29
3 28
4 27
5 26
6 25
7 24
8 23
9 22
10 21
11 20
12 19
13 18
14 17
15 16
2 30
1 3
4 29
5 28
6 27
7 26
8 25
9 24
10 23
11 22
12 21
13 20
14 19
15 18
16 17
3 30
2 4
1 5
6 29
7 28
8 27
9 26
10 25
11 24
12 23
13 22
14 21
15 20
16 19
17 18
4 30
3 5
2 6
1 7
8 29
9 28
10 27
11 26
12 25
13 24
14 23
...

result:

ok Correct

Test #29:

score: 0
Accepted
time: 4ms
memory: 3740kb

input:

90

output:

1 90
2 89
3 88
4 87
5 86
6 85
7 84
8 83
9 82
10 81
11 80
12 79
13 78
14 77
15 76
16 75
17 74
18 73
19 72
20 71
21 70
22 69
23 68
24 67
25 66
26 65
27 64
28 63
29 62
30 61
31 60
32 59
33 58
34 57
35 56
36 55
37 54
38 53
39 52
40 51
41 50
42 49
43 48
44 47
45 46
2 90
1 3
4 89
5 88
6 87
7 86
8 85
9 84
...

result:

ok Correct

Test #30:

score: 0
Accepted
time: 4ms
memory: 3288kb

input:

91

output:

1 2
3 91
4 90
5 89
6 88
7 87
8 86
9 85
10 84
11 83
12 82
13 81
14 80
15 79
16 78
17 77
18 76
19 75
20 74
21 73
22 72
23 71
24 70
25 69
26 68
27 67
28 66
29 65
30 64
31 63
32 62
33 61
34 60
35 59
36 58
37 57
38 56
39 55
40 54
41 53
42 52
43 51
44 50
45 49
46 48
47 48
46 49
45 50
44 51
43 52
42 53
41 ...

result:

ok Correct

Test #31:

score: 0
Accepted
time: 2ms
memory: 3588kb

input:

92

output:

1 92
2 91
3 90
4 89
5 88
6 87
7 86
8 85
9 84
10 83
11 82
12 81
13 80
14 79
15 78
16 77
17 76
18 75
19 74
20 73
21 72
22 71
23 70
24 69
25 68
26 67
27 66
28 65
29 64
30 63
31 62
32 61
33 60
34 59
35 58
36 57
37 56
38 55
39 54
40 53
41 52
42 51
43 50
44 49
45 48
46 47
2 92
1 3
4 91
5 90
6 89
7 88
8 87...

result:

ok Correct

Test #32:

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

input:

93

output:

1 2
3 93
4 92
5 91
6 90
7 89
8 88
9 87
10 86
11 85
12 84
13 83
14 82
15 81
16 80
17 79
18 78
19 77
20 76
21 75
22 74
23 73
24 72
25 71
26 70
27 69
28 68
29 67
30 66
31 65
32 64
33 63
34 62
35 61
36 60
37 59
38 58
39 57
40 56
41 55
42 54
43 53
44 52
45 51
46 50
47 49
48 49
47 50
46 51
45 52
44 53
43 ...

result:

ok Correct

Test #33:

score: 0
Accepted
time: 4ms
memory: 3568kb

input:

94

output:

1 94
2 93
3 92
4 91
5 90
6 89
7 88
8 87
9 86
10 85
11 84
12 83
13 82
14 81
15 80
16 79
17 78
18 77
19 76
20 75
21 74
22 73
23 72
24 71
25 70
26 69
27 68
28 67
29 66
30 65
31 64
32 63
33 62
34 61
35 60
36 59
37 58
38 57
39 56
40 55
41 54
42 53
43 52
44 51
45 50
46 49
47 48
2 94
1 3
4 93
5 92
6 91
7 9...

result:

ok Correct

Test #34:

score: 0
Accepted
time: 4ms
memory: 3400kb

input:

95

output:

1 2
3 95
4 94
5 93
6 92
7 91
8 90
9 89
10 88
11 87
12 86
13 85
14 84
15 83
16 82
17 81
18 80
19 79
20 78
21 77
22 76
23 75
24 74
25 73
26 72
27 71
28 70
29 69
30 68
31 67
32 66
33 65
34 64
35 63
36 62
37 61
38 60
39 59
40 58
41 57
42 56
43 55
44 54
45 53
46 52
47 51
48 50
49 50
48 51
47 52
46 53
45 ...

result:

ok Correct

Test #35:

score: 0
Accepted
time: 5ms
memory: 3588kb

input:

96

output:

1 96
2 95
3 94
4 93
5 92
6 91
7 90
8 89
9 88
10 87
11 86
12 85
13 84
14 83
15 82
16 81
17 80
18 79
19 78
20 77
21 76
22 75
23 74
24 73
25 72
26 71
27 70
28 69
29 68
30 67
31 66
32 65
33 64
34 63
35 62
36 61
37 60
38 59
39 58
40 57
41 56
42 55
43 54
44 53
45 52
46 51
47 50
48 49
2 96
1 3
4 95
5 94
6 ...

result:

ok Correct

Test #36:

score: 0
Accepted
time: 5ms
memory: 3372kb

input:

97

output:

1 2
3 97
4 96
5 95
6 94
7 93
8 92
9 91
10 90
11 89
12 88
13 87
14 86
15 85
16 84
17 83
18 82
19 81
20 80
21 79
22 78
23 77
24 76
25 75
26 74
27 73
28 72
29 71
30 70
31 69
32 68
33 67
34 66
35 65
36 64
37 63
38 62
39 61
40 60
41 59
42 58
43 57
44 56
45 55
46 54
47 53
48 52
49 51
50 51
49 52
48 53
47 ...

result:

ok Correct

Test #37:

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

input:

98

output:

1 98
2 97
3 96
4 95
5 94
6 93
7 92
8 91
9 90
10 89
11 88
12 87
13 86
14 85
15 84
16 83
17 82
18 81
19 80
20 79
21 78
22 77
23 76
24 75
25 74
26 73
27 72
28 71
29 70
30 69
31 68
32 67
33 66
34 65
35 64
36 63
37 62
38 61
39 60
40 59
41 58
42 57
43 56
44 55
45 54
46 53
47 52
48 51
49 50
2 98
1 3
4 97
5...

result:

ok Correct

Test #38:

score: 0
Accepted
time: 4ms
memory: 3348kb

input:

99

output:

1 2
3 99
4 98
5 97
6 96
7 95
8 94
9 93
10 92
11 91
12 90
13 89
14 88
15 87
16 86
17 85
18 84
19 83
20 82
21 81
22 80
23 79
24 78
25 77
26 76
27 75
28 74
29 73
30 72
31 71
32 70
33 69
34 68
35 67
36 66
37 65
38 64
39 63
40 62
41 61
42 60
43 59
44 58
45 57
46 56
47 55
48 54
49 53
50 52
51 52
50 53
49 ...

result:

ok Correct

Test #39:

score: 0
Accepted
time: 2ms
memory: 3768kb

input:

100

output:

1 100
2 99
3 98
4 97
5 96
6 95
7 94
8 93
9 92
10 91
11 90
12 89
13 88
14 87
15 86
16 85
17 84
18 83
19 82
20 81
21 80
22 79
23 78
24 77
25 76
26 75
27 74
28 73
29 72
30 71
31 70
32 69
33 68
34 67
35 66
36 65
37 64
38 63
39 62
40 61
41 60
42 59
43 58
44 57
45 56
46 55
47 54
48 53
49 52
50 51
2 100
1 ...

result:

ok Correct

Test #40:

score: 0
Accepted
time: 231ms
memory: 5368kb

input:

490

output:

1 490
2 489
3 488
4 487
5 486
6 485
7 484
8 483
9 482
10 481
11 480
12 479
13 478
14 477
15 476
16 475
17 474
18 473
19 472
20 471
21 470
22 469
23 468
24 467
25 466
26 465
27 464
28 463
29 462
30 461
31 460
32 459
33 458
34 457
35 456
36 455
37 454
38 453
39 452
40 451
41 450
42 449
43 448
44 447
4...

result:

ok Correct

Test #41:

score: 0
Accepted
time: 212ms
memory: 4196kb

input:

491

output:

1 2
3 491
4 490
5 489
6 488
7 487
8 486
9 485
10 484
11 483
12 482
13 481
14 480
15 479
16 478
17 477
18 476
19 475
20 474
21 473
22 472
23 471
24 470
25 469
26 468
27 467
28 466
29 465
30 464
31 463
32 462
33 461
34 460
35 459
36 458
37 457
38 456
39 455
40 454
41 453
42 452
43 451
44 450
45 449
46...

result:

ok Correct

Test #42:

score: 0
Accepted
time: 241ms
memory: 5424kb

input:

492

output:

1 492
2 491
3 490
4 489
5 488
6 487
7 486
8 485
9 484
10 483
11 482
12 481
13 480
14 479
15 478
16 477
17 476
18 475
19 474
20 473
21 472
22 471
23 470
24 469
25 468
26 467
27 466
28 465
29 464
30 463
31 462
32 461
33 460
34 459
35 458
36 457
37 456
38 455
39 454
40 453
41 452
42 451
43 450
44 449
4...

result:

ok Correct

Test #43:

score: 0
Accepted
time: 214ms
memory: 4448kb

input:

493

output:

1 2
3 493
4 492
5 491
6 490
7 489
8 488
9 487
10 486
11 485
12 484
13 483
14 482
15 481
16 480
17 479
18 478
19 477
20 476
21 475
22 474
23 473
24 472
25 471
26 470
27 469
28 468
29 467
30 466
31 465
32 464
33 463
34 462
35 461
36 460
37 459
38 458
39 457
40 456
41 455
42 454
43 453
44 452
45 451
46...

result:

ok Correct

Test #44:

score: 0
Accepted
time: 236ms
memory: 5460kb

input:

494

output:

1 494
2 493
3 492
4 491
5 490
6 489
7 488
8 487
9 486
10 485
11 484
12 483
13 482
14 481
15 480
16 479
17 478
18 477
19 476
20 475
21 474
22 473
23 472
24 471
25 470
26 469
27 468
28 467
29 466
30 465
31 464
32 463
33 462
34 461
35 460
36 459
37 458
38 457
39 456
40 455
41 454
42 453
43 452
44 451
4...

result:

ok Correct

Test #45:

score: 0
Accepted
time: 232ms
memory: 4480kb

input:

495

output:

1 2
3 495
4 494
5 493
6 492
7 491
8 490
9 489
10 488
11 487
12 486
13 485
14 484
15 483
16 482
17 481
18 480
19 479
20 478
21 477
22 476
23 475
24 474
25 473
26 472
27 471
28 470
29 469
30 468
31 467
32 466
33 465
34 464
35 463
36 462
37 461
38 460
39 459
40 458
41 457
42 456
43 455
44 454
45 453
46...

result:

ok Correct

Test #46:

score: 0
Accepted
time: 253ms
memory: 5304kb

input:

496

output:

1 496
2 495
3 494
4 493
5 492
6 491
7 490
8 489
9 488
10 487
11 486
12 485
13 484
14 483
15 482
16 481
17 480
18 479
19 478
20 477
21 476
22 475
23 474
24 473
25 472
26 471
27 470
28 469
29 468
30 467
31 466
32 465
33 464
34 463
35 462
36 461
37 460
38 459
39 458
40 457
41 456
42 455
43 454
44 453
4...

result:

ok Correct

Test #47:

score: 0
Accepted
time: 212ms
memory: 4340kb

input:

497

output:

1 2
3 497
4 496
5 495
6 494
7 493
8 492
9 491
10 490
11 489
12 488
13 487
14 486
15 485
16 484
17 483
18 482
19 481
20 480
21 479
22 478
23 477
24 476
25 475
26 474
27 473
28 472
29 471
30 470
31 469
32 468
33 467
34 466
35 465
36 464
37 463
38 462
39 461
40 460
41 459
42 458
43 457
44 456
45 455
46...

result:

ok Correct

Test #48:

score: 0
Accepted
time: 267ms
memory: 5480kb

input:

498

output:

1 498
2 497
3 496
4 495
5 494
6 493
7 492
8 491
9 490
10 489
11 488
12 487
13 486
14 485
15 484
16 483
17 482
18 481
19 480
20 479
21 478
22 477
23 476
24 475
25 474
26 473
27 472
28 471
29 470
30 469
31 468
32 467
33 466
34 465
35 464
36 463
37 462
38 461
39 460
40 459
41 458
42 457
43 456
44 455
4...

result:

ok Correct

Test #49:

score: 0
Accepted
time: 220ms
memory: 4320kb

input:

499

output:

1 2
3 499
4 498
5 497
6 496
7 495
8 494
9 493
10 492
11 491
12 490
13 489
14 488
15 487
16 486
17 485
18 484
19 483
20 482
21 481
22 480
23 479
24 478
25 477
26 476
27 475
28 474
29 473
30 472
31 471
32 470
33 469
34 468
35 467
36 466
37 465
38 464
39 463
40 462
41 461
42 460
43 459
44 458
45 457
46...

result:

ok Correct

Test #50:

score: 0
Accepted
time: 265ms
memory: 5496kb

input:

500

output:

1 500
2 499
3 498
4 497
5 496
6 495
7 494
8 493
9 492
10 491
11 490
12 489
13 488
14 487
15 486
16 485
17 484
18 483
19 482
20 481
21 480
22 479
23 478
24 477
25 476
26 475
27 474
28 473
29 472
30 471
31 470
32 469
33 468
34 467
35 466
36 465
37 464
38 463
39 462
40 461
41 460
42 459
43 458
44 457
4...

result:

ok Correct