QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#161641#5528. Least Annoying Constructive ProblemfryanAC ✓16ms5292kbC++203.3kb2023-09-03 01:03:522023-09-03 01:03:52

Judging History

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

  • [2023-09-03 01:03:52]
  • 评测
  • 测评结果:AC
  • 用时:16ms
  • 内存:5292kb
  • [2023-09-03 01:03:52]
  • 提交

answer


#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfenv>
#include <cfloat>
#include <chrono>
#include <cinttypes>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <immintrin.h>
#include <initializer_list>
#include <iomanip>
#include <ios>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stack>
#include <streambuf>
#include <string>
#include <tuple>
#include <type_traits>
#include <variant>
using namespace std;

//numbers
using ll=long long;
#define int ll
using ld=long double;
//pairs
#define P pair
#define pi P<int,int>
#define ff first
#define ss second
#define mp make_pair
//std data structure
#define all(x) begin(x), end(x)
#define sz(x) (int) (x).size()
//vectors
#define V vector
#define vi V<int>
#define v2i V<vi>
#define v3i V<v2i>
#define vpi V<pi>
#define vsi V<si>
#define pb push_back
//sets
#define S set
#define MS multiset
#define US unordered_set
#define si S<int>
#define msi MS<int>
#define usi US<int>
#define ins insert
#define era erase
//maps
#define M map
#define UM unordered_map
#define mii M<int,int>
#define mivi UM<int,vi>
#define misi UM<int,si>
#define umii UM<int,int>
#define umivi UM<int,vi>
#define umisi UM<int,si>
//queues
#define Q queue
#define PQ priority_queue
#define qi Q<int>
#define qpi Q<pi>
#define pqi PQ<int>
#define rpqi PQ<int,vi,greater<int> >
#define pqpi PQ<pi>
#define rpqpi PQ<pi,vpi,greater<pi> >
//constants
const int MOD=998244353;
const int INF=922337203685477580;
//nt functions
int binpow(int a, int b, int m=MOD) {
    a%=m; int res=1;
    while (b>0) {
        if (b&1) res=res*a%m;
        a=a*a%m;
        b>>=1;
    }
    return res;
}
int gcd (int a, int b) {
    return b?gcd (b,a%b):a;
}
int lcm (int a, int b) {
    return a/gcd(a,b)*b;
}
int inv(int i, int m=MOD) {
	return binpow(i, m-2, m);
}
//new header wip

int n;
vpi e;

int c(int v) {
	return (v%n+n)%n;
}

signed main() {
	ios::sync_with_stdio(false); cin.tie(nullptr);
	
	cin>>n;
	if (n%2==0) {
		n--;
		for (int i=0; i<n; i++) {
			for (int j=1; j<=n/2; j++) {
				e.pb(mp(c(i+j),c(i-j)));
			}
			e.pb(mp(i,n));
		} n++;
		
		for (int i=0; i<sz(e); i++) {
			if (e[i].ss<e[i].ff) {
				swap(e[i].ff,e[i].ss);
			}
		}
		
		int k;
		for (int i=0; i<sz(e); i++) {
			if (e[i].ff==0 && e[i].ss==1) {
				k=i; break;
			}
		}
		for (int i=0; i<sz(e); i++) {
			int j=(i+k)%sz(e);
			cout<<e[j].ff+1<<" "<<e[j].ss+1<<"\n";
		}
		
		
	} else {
		for (int i=0; i<n; i++) {
			for (int j=1; j<=n/2; j++) {
				e.pb(mp(c(i+j),c(i-j)));
			}
		}
		for (int i=0; i<sz(e); i++) {
			if (e[i].ss<e[i].ff) {
				swap(e[i].ff,e[i].ss);
			}
		}
		int k;
		for (int i=0; i<sz(e); i++) {
			if (e[i].ff==0 && e[i].ss==1) {
				k=i; break;
			}
		}
		for (int i=0; i<sz(e); i++) {
			int j=(i+k)%sz(e);
			cout<<e[j].ff+1<<" "<<e[j].ss+1<<"\n";
		}
	}
	
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3672kb

input:

3

output:

1 2
2 3
1 3

result:

ok Correct

Test #2:

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

input:

4

output:

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

result:

ok Correct

Test #3:

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

input:

5

output:

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

result:

ok Correct

Test #4:

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

input:

6

output:

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

result:

ok Correct

Test #5:

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

input:

7

output:

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

result:

ok Correct

Test #6:

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

input:

8

output:

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

result:

ok Correct

Test #7:

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

input:

9

output:

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

result:

ok Correct

Test #8:

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

input:

10

output:

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

result:

ok Correct

Test #9:

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

input:

11

output:

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

result:

ok Correct

Test #10:

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

input:

12

output:

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

result:

ok Correct

Test #11:

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

input:

13

output:

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

result:

ok Correct

Test #12:

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

input:

14

output:

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

result:

ok Correct

Test #13:

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

input:

15

output:

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

result:

ok Correct

Test #14:

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

input:

16

output:

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

result:

ok Correct

Test #15:

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

input:

17

output:

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

result:

ok Correct

Test #16:

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

input:

18

output:

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

result:

ok Correct

Test #17:

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

input:

19

output:

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

result:

ok Correct

Test #18:

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

input:

20

output:

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

result:

ok Correct

Test #19:

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

input:

21

output:

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

result:

ok Correct

Test #20:

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

input:

22

output:

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

result:

ok Correct

Test #21:

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

input:

23

output:

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

result:

ok Correct

Test #22:

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

input:

24

output:

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

result:

ok Correct

Test #23:

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

input:

25

output:

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

result:

ok Correct

Test #24:

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

input:

26

output:

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

result:

ok Correct

Test #25:

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

input:

27

output:

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

result:

ok Correct

Test #26:

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

input:

28

output:

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

result:

ok Correct

Test #27:

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

input:

29

output:

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

result:

ok Correct

Test #28:

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

input:

30

output:

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

result:

ok Correct

Test #29:

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

input:

90

output:

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

result:

ok Correct

Test #30:

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

input:

91

output:

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

result:

ok Correct

Test #31:

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

input:

92

output:

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

result:

ok Correct

Test #32:

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

input:

93

output:

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

result:

ok Correct

Test #33:

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

input:

94

output:

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

result:

ok Correct

Test #34:

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

input:

95

output:

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

result:

ok Correct

Test #35:

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

input:

96

output:

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

result:

ok Correct

Test #36:

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

input:

97

output:

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

result:

ok Correct

Test #37:

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

input:

98

output:

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

result:

ok Correct

Test #38:

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

input:

99

output:

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

result:

ok Correct

Test #39:

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

input:

100

output:

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

result:

ok Correct

Test #40:

score: 0
Accepted
time: 10ms
memory: 5228kb

input:

490

output:

1 2
246 490
246 248
245 249
244 250
243 251
242 252
241 253
240 254
239 255
238 256
237 257
236 258
235 259
234 260
233 261
232 262
231 263
230 264
229 265
228 266
227 267
226 268
225 269
224 270
223 271
222 272
221 273
220 274
219 275
218 276
217 277
216 278
215 279
214 280
213 281
212 282
211 283
...

result:

ok Correct

Test #41:

score: 0
Accepted
time: 10ms
memory: 5284kb

input:

491

output:

1 2
247 249
246 250
245 251
244 252
243 253
242 254
241 255
240 256
239 257
238 258
237 259
236 260
235 261
234 262
233 263
232 264
231 265
230 266
229 267
228 268
227 269
226 270
225 271
224 272
223 273
222 274
221 275
220 276
219 277
218 278
217 279
216 280
215 281
214 282
213 283
212 284
211 285
...

result:

ok Correct

Test #42:

score: 0
Accepted
time: 8ms
memory: 5204kb

input:

492

output:

1 2
247 492
247 249
246 250
245 251
244 252
243 253
242 254
241 255
240 256
239 257
238 258
237 259
236 260
235 261
234 262
233 263
232 264
231 265
230 266
229 267
228 268
227 269
226 270
225 271
224 272
223 273
222 274
221 275
220 276
219 277
218 278
217 279
216 280
215 281
214 282
213 283
212 284
...

result:

ok Correct

Test #43:

score: 0
Accepted
time: 15ms
memory: 5276kb

input:

493

output:

1 2
248 250
247 251
246 252
245 253
244 254
243 255
242 256
241 257
240 258
239 259
238 260
237 261
236 262
235 263
234 264
233 265
232 266
231 267
230 268
229 269
228 270
227 271
226 272
225 273
224 274
223 275
222 276
221 277
220 278
219 279
218 280
217 281
216 282
215 283
214 284
213 285
212 286
...

result:

ok Correct

Test #44:

score: 0
Accepted
time: 7ms
memory: 5284kb

input:

494

output:

1 2
248 494
248 250
247 251
246 252
245 253
244 254
243 255
242 256
241 257
240 258
239 259
238 260
237 261
236 262
235 263
234 264
233 265
232 266
231 267
230 268
229 269
228 270
227 271
226 272
225 273
224 274
223 275
222 276
221 277
220 278
219 279
218 280
217 281
216 282
215 283
214 284
213 285
...

result:

ok Correct

Test #45:

score: 0
Accepted
time: 6ms
memory: 5180kb

input:

495

output:

1 2
249 251
248 252
247 253
246 254
245 255
244 256
243 257
242 258
241 259
240 260
239 261
238 262
237 263
236 264
235 265
234 266
233 267
232 268
231 269
230 270
229 271
228 272
227 273
226 274
225 275
224 276
223 277
222 278
221 279
220 280
219 281
218 282
217 283
216 284
215 285
214 286
213 287
...

result:

ok Correct

Test #46:

score: 0
Accepted
time: 8ms
memory: 5184kb

input:

496

output:

1 2
249 496
249 251
248 252
247 253
246 254
245 255
244 256
243 257
242 258
241 259
240 260
239 261
238 262
237 263
236 264
235 265
234 266
233 267
232 268
231 269
230 270
229 271
228 272
227 273
226 274
225 275
224 276
223 277
222 278
221 279
220 280
219 281
218 282
217 283
216 284
215 285
214 286
...

result:

ok Correct

Test #47:

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

input:

497

output:

1 2
250 252
249 253
248 254
247 255
246 256
245 257
244 258
243 259
242 260
241 261
240 262
239 263
238 264
237 265
236 266
235 267
234 268
233 269
232 270
231 271
230 272
229 273
228 274
227 275
226 276
225 277
224 278
223 279
222 280
221 281
220 282
219 283
218 284
217 285
216 286
215 287
214 288
...

result:

ok Correct

Test #48:

score: 0
Accepted
time: 15ms
memory: 5208kb

input:

498

output:

1 2
250 498
250 252
249 253
248 254
247 255
246 256
245 257
244 258
243 259
242 260
241 261
240 262
239 263
238 264
237 265
236 266
235 267
234 268
233 269
232 270
231 271
230 272
229 273
228 274
227 275
226 276
225 277
224 278
223 279
222 280
221 281
220 282
219 283
218 284
217 285
216 286
215 287
...

result:

ok Correct

Test #49:

score: 0
Accepted
time: 10ms
memory: 5260kb

input:

499

output:

1 2
251 253
250 254
249 255
248 256
247 257
246 258
245 259
244 260
243 261
242 262
241 263
240 264
239 265
238 266
237 267
236 268
235 269
234 270
233 271
232 272
231 273
230 274
229 275
228 276
227 277
226 278
225 279
224 280
223 281
222 282
221 283
220 284
219 285
218 286
217 287
216 288
215 289
...

result:

ok Correct

Test #50:

score: 0
Accepted
time: 16ms
memory: 5292kb

input:

500

output:

1 2
251 500
251 253
250 254
249 255
248 256
247 257
246 258
245 259
244 260
243 261
242 262
241 263
240 264
239 265
238 266
237 267
236 268
235 269
234 270
233 271
232 272
231 273
230 274
229 275
228 276
227 277
226 278
225 279
224 280
223 281
222 282
221 283
220 284
219 285
218 286
217 287
216 288
...

result:

ok Correct