QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#18739 | #1837. Hamiltonian | JohnAlfnov | AC ✓ | 3ms | 3852kb | C++14 | 8.1kb | 2022-01-25 21:46:34 | 2022-05-06 02:19:53 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
int n;
int C(int x)
{ return x * (x - 1) / 2; }
void output43()
{
printf("12 18\n");
printf("1 6\n");
printf("1 9\n");
printf("2 10\n");
printf("2 11\n");
printf("3 5\n");
printf("3 7\n");
printf("4 5\n");
printf("4 6\n");
printf("4 8\n");
printf("5 8\n");
printf("5 11\n");
printf("6 9\n");
printf("7 10\n");
printf("7 12\n");
printf("8 11\n");
printf("8 12\n");
printf("9 10\n");
printf("10 12\n");
}
void output57()
{
printf("12 29\n");
printf("1 11\n");
printf("1 12\n");
printf("2 3\n");
printf("2 4\n");
printf("2 5\n");
printf("2 6\n");
printf("2 7\n");
printf("2 9\n");
printf("2 12\n");
printf("3 4\n");
printf("3 7\n");
printf("3 11\n");
printf("3 12\n");
printf("4 8\n");
printf("4 12\n");
printf("5 9\n");
printf("5 10\n");
printf("5 11\n");
printf("5 12\n");
printf("6 9\n");
printf("6 11\n");
printf("6 12\n");
printf("7 8\n");
printf("7 9\n");
printf("7 11\n");
printf("7 12\n");
printf("9 12\n");
printf("10 11\n");
printf("10 12\n");
}
void output58()
{
printf("12 21\n");
printf("1 5\n");
printf("1 6\n");
printf("1 9\n");
printf("1 10\n");
printf("1 11\n");
printf("2 6\n");
printf("2 7\n");
printf("2 8\n");
printf("3 4\n");
printf("3 5\n");
printf("3 7\n");
printf("4 7\n");
printf("4 8\n");
printf("4 10\n");
printf("4 11\n");
printf("5 8\n");
printf("5 10\n");
printf("6 12\n");
printf("7 12\n");
printf("9 10\n");
printf("9 11\n");
}
void output59()
{
printf("12 26\n");
printf("1 2\n");
printf("1 5\n");
printf("1 7\n");
printf("1 10\n");
printf("1 12\n");
printf("2 8\n");
printf("2 11\n");
printf("3 5\n");
printf("3 12\n");
printf("4 8\n");
printf("4 9\n");
printf("4 12\n");
printf("5 7\n");
printf("5 9\n");
printf("5 10\n");
printf("5 12\n");
printf("6 10\n");
printf("6 11\n");
printf("7 8\n");
printf("7 10\n");
printf("8 10\n");
printf("8 11\n");
printf("8 12\n");
printf("9 12\n");
printf("10 11\n");
printf("10 12\n");
}
void output38()
{
printf("10 20\n");
printf("1 2\n");
printf("1 5\n");
printf("1 7\n");
printf("1 9\n");
printf("1 10\n");
printf("2 6\n");
printf("3 5\n");
printf("3 7\n");
printf("3 8\n");
printf("3 10\n");
printf("4 6\n");
printf("4 7\n");
printf("4 8\n");
printf("5 8\n");
printf("5 10\n");
printf("6 7\n");
printf("7 8\n");
printf("7 9\n");
printf("8 9\n");
printf("8 10\n");
}
void output51()
{
printf("11 17\n");
printf("1 2\n");
printf("1 8\n");
printf("1 9\n");
printf("2 6\n");
printf("2 7\n");
printf("3 4\n");
printf("3 8\n");
printf("4 7\n");
printf("4 10\n");
printf("5 6\n");
printf("5 10\n");
printf("5 11\n");
printf("6 9\n");
printf("7 10\n");
printf("7 11\n");
printf("8 11\n");
printf("9 11\n");
}
void output53()
{
printf("11 25\n");
printf("1 3\n");
printf("1 4\n");
printf("1 7\n");
printf("1 9\n");
printf("1 10\n");
printf("1 11\n");
printf("2 4\n");
printf("2 5\n");
printf("3 7\n");
printf("3 8\n");
printf("3 10\n");
printf("3 11\n");
printf("4 5\n");
printf("4 6\n");
printf("4 9\n");
printf("4 11\n");
printf("5 8\n");
printf("6 7\n");
printf("6 8\n");
printf("6 10\n");
printf("6 11\n");
printf("7 9\n");
printf("8 9\n");
printf("8 11\n");
printf("9 11\n");
}
void output46()
{
printf("13 25\n");
printf("1 2\n");
printf("1 6\n");
printf("1 10\n");
printf("1 11\n");
printf("2 3\n");
printf("2 4\n");
printf("2 5\n");
printf("2 10\n");
printf("2 11\n");
printf("3 9\n");
printf("3 11\n");
printf("4 7\n");
printf("4 9\n");
printf("5 8\n");
printf("6 8\n");
printf("6 11\n");
printf("7 10\n");
printf("7 11\n");
printf("7 12\n");
printf("8 9\n");
printf("8 10\n");
printf("8 13\n");
printf("10 13\n");
printf("11 12\n");
printf("11 13\n");
}
void output47()
{
printf("11 24\n");
printf("1 3\n");
printf("1 6\n");
printf("2 3\n");
printf("2 4\n");
printf("2 5\n");
printf("2 6\n");
printf("2 7\n");
printf("2 8\n");
printf("2 9\n");
printf("2 10\n");
printf("3 5\n");
printf("3 6\n");
printf("3 7\n");
printf("3 8\n");
printf("3 9\n");
printf("4 5\n");
printf("4 7\n");
printf("4 11\n");
printf("5 7\n");
printf("5 10\n");
printf("5 11\n");
printf("6 8\n");
printf("7 10\n");
printf("9 10\n");
}
void output29()
{
printf("9 17\n");
printf("1 2\n");
printf("1 3\n");
printf("1 4\n");
printf("1 7\n");
printf("1 8\n");
printf("1 9\n");
printf("2 4\n");
printf("2 5\n");
printf("2 8\n");
printf("2 9\n");
printf("3 4\n");
printf("3 6\n");
printf("5 6\n");
printf("5 7\n");
printf("5 9\n");
printf("6 8\n");
printf("6 9\n");
}
void output23()
{
printf("8 13\n");
printf("1 5\n");
printf("1 7\n");
printf("2 3\n");
printf("2 4\n");
printf("2 8\n");
printf("3 4\n");
printf("3 5\n");
printf("3 6\n");
printf("4 6\n");
printf("4 8\n");
printf("5 6\n");
printf("5 7\n");
printf("6 7\n");
}
void output31()
{
printf("10 19\n");
printf("1 2\n");
printf("1 3\n");
printf("1 6\n");
printf("2 3\n");
printf("2 5\n");
printf("2 6\n");
printf("2 8\n");
printf("2 10\n");
printf("3 6\n");
printf("3 10\n");
printf("4 5\n");
printf("4 7\n");
printf("4 8\n");
printf("4 9\n");
printf("4 10\n");
printf("6 7\n");
printf("8 9\n");
printf("8 10\n");
printf("9 10\n");
}
void output37()
{
printf("11 22\n");
printf("1 2\n");
printf("1 3\n");
printf("1 4\n");
printf("1 7\n");
printf("1 8\n");
printf("2 7\n");
printf("2 8\n");
printf("2 9\n");
printf("2 10\n");
printf("2 11\n");
printf("3 5\n");
printf("3 6\n");
printf("3 8\n");
printf("4 6\n");
printf("4 7\n");
printf("5 11\n");
printf("6 7\n");
printf("6 8\n");
printf("6 10\n");
printf("6 11\n");
printf("8 9\n");
printf("8 11\n");
}
void output41()
{
printf("10 18\n");
printf("1 2\n");
printf("1 9\n");
printf("2 4\n");
printf("2 5\n");
printf("2 7\n");
printf("3 4\n");
printf("3 5\n");
printf("3 6\n");
printf("3 8\n");
printf("4 5\n");
printf("4 8\n");
printf("4 10\n");
printf("5 8\n");
printf("5 10\n");
printf("6 7\n");
printf("7 10\n");
printf("8 9\n");
printf("8 10\n");
}
int main()
{
scanf("%d", &n);
if (n == 1)
{
puts("2 1\n1 2");
return 0;
}
if (n == 2)
{
puts("4 4\n1 2\n1 3\n2 3\n3 4");
return 0;
}
if (n == 23)
{
output23();
return 0;
}
if (n == 29)
{
output29();
return 0;
}
if (n == 31)
{
output31();
return 0;
}
if (n == 37)
{
output37();
return 0;
}
if (n == 41)
{
output41();
return 0;
}
if (n == 43)
{
output43();
return 0;
}
if (n == 46)
{
output46();
return 0;
}
if (n == 47)
{
output47();
return 0;
}
if (n <= 20)
{
printf("%d %d\n", n, n);
for (int i = 1; i <= n; i++) printf("%d %d\n", i, i % n + 1);
return 0;
}
if (n == 51)
{
output51();
return 0;
}
if (n == 53)
{
output53();
return 0;
}
if (n == 57)
{
output57();
return 0;
}
if (n == 38)
{
output38();
return 0;
}
if (n == 58)
{
output58();
return 0;
}
if (n == 59)
{
output59();
return 0;
}
for (int a=1;a<=20;a++)
for (int b=1;a+b+1<=20;b++)
if (n==a*b){
printf("%d %d\n",a+b+1,a+b+a+b-(a<=2)-(b<=2));
for (int i=1;i<=a-(a<=2);i++) printf("%d %d\n",i,i%a+1);
for (int i=1;i<=b-(b<=2);i++) printf("%d %d\n",i+a,i%b+a+1);
for (int i=1;i<=a+b;i++) printf("%d %d\n",i,a+b+1);
return 0;
}
for (int a = 1; a <= 20; a++)
for (int b = 1; a + b + 2 <= 20; b++)
if (n == C(a + b) + a + b + a + b)
{
printf("%d %d\n", a + b + 2, a + b + a + b + a + b);
for (int i = 1; i <= a; i++) printf("%d %d\n", i, i % a + 1);
for (int i = 1; i <= b; i++) printf("%d %d\n", i + a, i % b + a + 1);
for (int i = 1; i <= a + b; i++) printf("%d %d\n", i, a + b + 1);
for (int i = 1; i <= a + b; i++) printf("%d %d\n", i, a + b + 2);
return 0;
}
return -1;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 3524kb
input:
1
output:
2 1 1 2
result:
ok correct
Test #2:
score: 0
Accepted
time: 3ms
memory: 3636kb
input:
2
output:
4 4 1 2 1 3 2 3 3 4
result:
ok correct
Test #3:
score: 0
Accepted
time: 3ms
memory: 3764kb
input:
3
output:
3 3 1 2 2 3 3 1
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
4
output:
4 4 1 2 2 3 3 4 4 1
result:
ok correct
Test #5:
score: 0
Accepted
time: 2ms
memory: 3736kb
input:
5
output:
5 5 1 2 2 3 3 4 4 5 5 1
result:
ok correct
Test #6:
score: 0
Accepted
time: 1ms
memory: 3760kb
input:
6
output:
6 6 1 2 2 3 3 4 4 5 5 6 6 1
result:
ok correct
Test #7:
score: 0
Accepted
time: 2ms
memory: 3780kb
input:
7
output:
7 7 1 2 2 3 3 4 4 5 5 6 6 7 7 1
result:
ok correct
Test #8:
score: 0
Accepted
time: 2ms
memory: 3716kb
input:
8
output:
8 8 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 1
result:
ok correct
Test #9:
score: 0
Accepted
time: 2ms
memory: 3784kb
input:
9
output:
9 9 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 1
result:
ok correct
Test #10:
score: 0
Accepted
time: 3ms
memory: 3716kb
input:
10
output:
10 10 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 1
result:
ok correct
Test #11:
score: 0
Accepted
time: 2ms
memory: 3736kb
input:
11
output:
11 11 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 1
result:
ok correct
Test #12:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
12
output:
12 12 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 1
result:
ok correct
Test #13:
score: 0
Accepted
time: 2ms
memory: 3732kb
input:
13
output:
13 13 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 1
result:
ok correct
Test #14:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
14
output:
14 14 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 1
result:
ok correct
Test #15:
score: 0
Accepted
time: 2ms
memory: 3780kb
input:
15
output:
15 15 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 1
result:
ok correct
Test #16:
score: 0
Accepted
time: 3ms
memory: 3852kb
input:
16
output:
16 16 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 1
result:
ok correct
Test #17:
score: 0
Accepted
time: 3ms
memory: 3760kb
input:
17
output:
17 17 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 1
result:
ok correct
Test #18:
score: 0
Accepted
time: 1ms
memory: 3716kb
input:
18
output:
18 18 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 1
result:
ok correct
Test #19:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
19
output:
19 19 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 1
result:
ok correct
Test #20:
score: 0
Accepted
time: 1ms
memory: 3716kb
input:
20
output:
20 20 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 1
result:
ok correct
Test #21:
score: 0
Accepted
time: 1ms
memory: 3780kb
input:
21
output:
11 20 1 2 2 3 3 1 4 5 5 6 6 7 7 8 8 9 9 10 10 4 1 11 2 11 3 11 4 11 5 11 6 11 7 11 8 11 9 11 10 11
result:
ok correct
Test #22:
score: 0
Accepted
time: 3ms
memory: 3792kb
input:
22
output:
14 25 1 2 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 3 1 14 2 14 3 14 4 14 5 14 6 14 7 14 8 14 9 14 10 14 11 14 12 14 13 14
result:
ok correct
Test #23:
score: 0
Accepted
time: 1ms
memory: 3692kb
input:
23
output:
8 13 1 5 1 7 2 3 2 4 2 8 3 4 3 5 3 6 4 6 4 8 5 6 5 7 6 7
result:
ok correct
Test #24:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
24
output:
15 27 1 2 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 3 1 15 2 15 3 15 4 15 5 15 6 15 7 15 8 15 9 15 10 15 11 15 12 15 13 15 14 15
result:
ok correct
Test #25:
score: 0
Accepted
time: 2ms
memory: 3776kb
input:
25
output:
11 20 1 2 2 3 3 4 4 5 5 1 6 7 7 8 8 9 9 10 10 6 1 11 2 11 3 11 4 11 5 11 6 11 7 11 8 11 9 11 10 11
result:
ok correct
Test #26:
score: 0
Accepted
time: 2ms
memory: 3764kb
input:
26
output:
16 29 1 2 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 3 1 16 2 16 3 16 4 16 5 16 6 16 7 16 8 16 9 16 10 16 11 16 12 16 13 16 14 16 15 16
result:
ok correct
Test #27:
score: 0
Accepted
time: 3ms
memory: 3788kb
input:
27
output:
13 24 1 2 2 3 3 1 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 4 1 13 2 13 3 13 4 13 5 13 6 13 7 13 8 13 9 13 10 13 11 13 12 13
result:
ok correct
Test #28:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
28
output:
17 31 1 2 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 3 1 17 2 17 3 17 4 17 5 17 6 17 7 17 8 17 9 17 10 17 11 17 12 17 13 17 14 17 15 17 16 17
result:
ok correct
Test #29:
score: 0
Accepted
time: 3ms
memory: 3688kb
input:
29
output:
9 17 1 2 1 3 1 4 1 7 1 8 1 9 2 4 2 5 2 8 2 9 3 4 3 6 5 6 5 7 5 9 6 8 6 9
result:
ok correct
Test #30:
score: 0
Accepted
time: 2ms
memory: 3784kb
input:
30
output:
18 33 1 2 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 3 1 18 2 18 3 18 4 18 5 18 6 18 7 18 8 18 9 18 10 18 11 18 12 18 13 18 14 18 15 18 16 18 17 18
result:
ok correct
Test #31:
score: 0
Accepted
time: 2ms
memory: 3804kb
input:
31
output:
10 19 1 2 1 3 1 6 2 3 2 5 2 6 2 8 2 10 3 6 3 10 4 5 4 7 4 8 4 9 4 10 6 7 8 9 8 10 9 10
result:
ok correct
Test #32:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
32
output:
19 35 1 2 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 3 1 19 2 19 3 19 4 19 5 19 6 19 7 19 8 19 9 19 10 19 11 19 12 19 13 19 14 19 15 19 16 19 17 19 18 19
result:
ok correct
Test #33:
score: 0
Accepted
time: 2ms
memory: 3852kb
input:
33
output:
15 28 1 2 2 3 3 1 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 4 1 15 2 15 3 15 4 15 5 15 6 15 7 15 8 15 9 15 10 15 11 15 12 15 13 15 14 15
result:
ok correct
Test #34:
score: 0
Accepted
time: 2ms
memory: 3780kb
input:
34
output:
20 37 1 2 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 3 1 20 2 20 3 20 4 20 5 20 6 20 7 20 8 20 9 20 10 20 11 20 12 20 13 20 14 20 15 20 16 20 17 20 18 20 19 20
result:
ok correct
Test #35:
score: 0
Accepted
time: 1ms
memory: 3760kb
input:
35
output:
13 24 1 2 2 3 3 4 4 5 5 1 6 7 7 8 8 9 9 10 10 11 11 12 12 6 1 13 2 13 3 13 4 13 5 13 6 13 7 13 8 13 9 13 10 13 11 13 12 13
result:
ok correct
Test #36:
score: 0
Accepted
time: 2ms
memory: 3812kb
input:
36
output:
16 30 1 2 2 3 3 1 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 4 1 16 2 16 3 16 4 16 5 16 6 16 7 16 8 16 9 16 10 16 11 16 12 16 13 16 14 16 15 16
result:
ok correct
Test #37:
score: 0
Accepted
time: 3ms
memory: 3808kb
input:
37
output:
11 22 1 2 1 3 1 4 1 7 1 8 2 7 2 8 2 9 2 10 2 11 3 5 3 6 3 8 4 6 4 7 5 11 6 7 6 8 6 10 6 11 8 9 8 11
result:
ok correct
Test #38:
score: 0
Accepted
time: 1ms
memory: 3848kb
input:
38
output:
10 20 1 2 1 5 1 7 1 9 1 10 2 6 3 5 3 7 3 8 3 10 4 6 4 7 4 8 5 8 5 10 6 7 7 8 7 9 8 9 8 10
result:
ok correct
Test #39:
score: 0
Accepted
time: 2ms
memory: 3788kb
input:
39
output:
17 32 1 2 2 3 3 1 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 4 1 17 2 17 3 17 4 17 5 17 6 17 7 17 8 17 9 17 10 17 11 17 12 17 13 17 14 17 15 17 16 17
result:
ok correct
Test #40:
score: 0
Accepted
time: 2ms
memory: 3688kb
input:
40
output:
15 28 1 2 2 3 3 4 4 1 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 5 1 15 2 15 3 15 4 15 5 15 6 15 7 15 8 15 9 15 10 15 11 15 12 15 13 15 14 15
result:
ok correct
Test #41:
score: 0
Accepted
time: 2ms
memory: 3808kb
input:
41
output:
10 18 1 2 1 9 2 4 2 5 2 7 3 4 3 5 3 6 3 8 4 5 4 8 4 10 5 8 5 10 6 7 7 10 8 9 8 10
result:
ok correct
Test #42:
score: 0
Accepted
time: 3ms
memory: 3848kb
input:
42
output:
18 34 1 2 2 3 3 1 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 4 1 18 2 18 3 18 4 18 5 18 6 18 7 18 8 18 9 18 10 18 11 18 12 18 13 18 14 18 15 18 16 18 17 18
result:
ok correct
Test #43:
score: 0
Accepted
time: 1ms
memory: 3848kb
input:
43
output:
12 18 1 6 1 9 2 10 2 11 3 5 3 7 4 5 4 6 4 8 5 8 5 11 6 9 7 10 7 12 8 11 8 12 9 10 10 12
result:
ok correct
Test #44:
score: 0
Accepted
time: 2ms
memory: 3808kb
input:
44
output:
16 30 1 2 2 3 3 4 4 1 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 5 1 16 2 16 3 16 4 16 5 16 6 16 7 16 8 16 9 16 10 16 11 16 12 16 13 16 14 16 15 16
result:
ok correct
Test #45:
score: 0
Accepted
time: 3ms
memory: 3764kb
input:
45
output:
19 36 1 2 2 3 3 1 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 4 1 19 2 19 3 19 4 19 5 19 6 19 7 19 8 19 9 19 10 19 11 19 12 19 13 19 14 19 15 19 16 19 17 19 18 19
result:
ok correct
Test #46:
score: 0
Accepted
time: 3ms
memory: 3772kb
input:
46
output:
13 25 1 2 1 6 1 10 1 11 2 3 2 4 2 5 2 10 2 11 3 9 3 11 4 7 4 9 5 8 6 8 6 11 7 10 7 11 7 12 8 9 8 10 8 13 10 13 11 12 11 13
result:
ok correct
Test #47:
score: 0
Accepted
time: 3ms
memory: 3776kb
input:
47
output:
11 24 1 3 1 6 2 3 2 4 2 5 2 6 2 7 2 8 2 9 2 10 3 5 3 6 3 7 3 8 3 9 4 5 4 7 4 11 5 7 5 10 5 11 6 8 7 10 9 10
result:
ok correct
Test #48:
score: 0
Accepted
time: 2ms
memory: 3764kb
input:
48
output:
20 38 1 2 2 3 3 1 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 4 1 20 2 20 3 20 4 20 5 20 6 20 7 20 8 20 9 20 10 20 11 20 12 20 13 20 14 20 15 20 16 20 17 20 18 20 19 20
result:
ok correct
Test #49:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
49
output:
15 28 1 2 2 3 3 4 4 5 5 6 6 7 7 1 8 9 9 10 10 11 11 12 12 13 13 14 14 8 1 15 2 15 3 15 4 15 5 15 6 15 7 15 8 15 9 15 10 15 11 15 12 15 13 15 14 15
result:
ok correct
Test #50:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
50
output:
16 30 1 2 2 3 3 4 4 5 5 1 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 6 1 16 2 16 3 16 4 16 5 16 6 16 7 16 8 16 9 16 10 16 11 16 12 16 13 16 14 16 15 16
result:
ok correct
Test #51:
score: 0
Accepted
time: 3ms
memory: 3780kb
input:
51
output:
11 17 1 2 1 8 1 9 2 6 2 7 3 4 3 8 4 7 4 10 5 6 5 10 5 11 6 9 7 10 7 11 8 11 9 11
result:
ok correct
Test #52:
score: 0
Accepted
time: 3ms
memory: 3756kb
input:
52
output:
18 34 1 2 2 3 3 4 4 1 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 5 1 18 2 18 3 18 4 18 5 18 6 18 7 18 8 18 9 18 10 18 11 18 12 18 13 18 14 18 15 18 16 18 17 18
result:
ok correct
Test #53:
score: 0
Accepted
time: 3ms
memory: 3852kb
input:
53
output:
11 25 1 3 1 4 1 7 1 9 1 10 1 11 2 4 2 5 3 7 3 8 3 10 3 11 4 5 4 6 4 9 4 11 5 8 6 7 6 8 6 10 6 11 7 9 8 9 8 11 9 11
result:
ok correct
Test #54:
score: 0
Accepted
time: 3ms
memory: 3736kb
input:
54
output:
16 30 1 2 2 3 3 4 4 5 5 6 6 1 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 7 1 16 2 16 3 16 4 16 5 16 6 16 7 16 8 16 9 16 10 16 11 16 12 16 13 16 14 16 15 16
result:
ok correct
Test #55:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
55
output:
17 32 1 2 2 3 3 4 4 5 5 1 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 6 1 17 2 17 3 17 4 17 5 17 6 17 7 17 8 17 9 17 10 17 11 17 12 17 13 17 14 17 15 17 16 17
result:
ok correct
Test #56:
score: 0
Accepted
time: 3ms
memory: 3812kb
input:
56
output:
19 36 1 2 2 3 3 4 4 1 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 5 1 19 2 19 3 19 4 19 5 19 6 19 7 19 8 19 9 19 10 19 11 19 12 19 13 19 14 19 15 19 16 19 17 19 18 19
result:
ok correct
Test #57:
score: 0
Accepted
time: 3ms
memory: 3788kb
input:
57
output:
12 29 1 11 1 12 2 3 2 4 2 5 2 6 2 7 2 9 2 12 3 4 3 7 3 11 3 12 4 8 4 12 5 9 5 10 5 11 5 12 6 9 6 11 6 12 7 8 7 9 7 11 7 12 9 12 10 11 10 12
result:
ok correct
Test #58:
score: 0
Accepted
time: 2ms
memory: 3764kb
input:
58
output:
12 21 1 5 1 6 1 9 1 10 1 11 2 6 2 7 2 8 3 4 3 5 3 7 4 7 4 8 4 10 4 11 5 8 5 10 6 12 7 12 9 10 9 11
result:
ok correct
Test #59:
score: 0
Accepted
time: 3ms
memory: 3812kb
input:
59
output:
12 26 1 2 1 5 1 7 1 10 1 12 2 8 2 11 3 5 3 12 4 8 4 9 4 12 5 7 5 9 5 10 5 12 6 10 6 11 7 8 7 10 8 10 8 11 8 12 9 12 10 11 10 12
result:
ok correct
Test #60:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
60
output:
20 38 1 2 2 3 3 4 4 1 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 5 1 20 2 20 3 20 4 20 5 20 6 20 7 20 8 20 9 20 10 20 11 20 12 20 13 20 14 20 15 20 16 20 17 20 18 20 19 20
result:
ok correct