QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#234300#4902. 聚会zhouhuanyi45.454545 148ms3968kbC++23517b2023-11-01 15:41:122023-11-01 15:41:12

Judging History

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

  • [2023-11-01 15:41:12]
  • 评测
  • 测评结果:45.454545
  • 用时:148ms
  • 内存:3968kb
  • [2023-11-01 15:41:12]
  • 提交

answer

#include<iostream>
#include<cstdio>
using namespace std;
int read()
{
	char c=0;
	int sum=0;
	while (c<'0'||c>'9') c=getchar();
	while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
	return sum;
}
int n,t;
int main()
{
	n=read();
	if (n%6==3)
	{
		t=n/3;
		for (int i=0;i<t;++i) printf("%d %d %d\n",i+1,i+t+1,i+(t<<1)+1);
		for (int i=0;i<3;++i)
			for (int j=0;j<t;++j)
				for (int k=j+1;k<t;++k)
					printf("%d %d %d\n",i*t+j+1,i*t+k+1,((i+1)%3)*t+(j+k)*((t+1)>>1)%t+1);
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 9.09091
Accepted
time: 0ms
memory: 3580kb

input:

1

output:


result:

ok accepted

Test #2:

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

input:

3

output:

1 2 3

result:

ok accepted

Test #3:

score: -9.09091
Wrong Answer
time: 0ms
memory: 3524kb

input:

7

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #2:

score: 9.09091
Accepted

Test #12:

score: 9.09091
Accepted
time: 0ms
memory: 3968kb

input:

3

output:

1 2 3

result:

ok accepted

Test #13:

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

input:

9

output:

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

result:

ok accepted

Test #14:

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

input:

27

output:

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

result:

ok accepted

Test #15:

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

input:

81

output:

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

result:

ok accepted

Test #16:

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

input:

243

output:

1 82 163
2 83 164
3 84 165
4 85 166
5 86 167
6 87 168
7 88 169
8 89 170
9 90 171
10 91 172
11 92 173
12 93 174
13 94 175
14 95 176
15 96 177
16 97 178
17 98 179
18 99 180
19 100 181
20 101 182
21 102 183
22 103 184
23 104 185
24 105 186
25 106 187
26 107 188
27 108 189
28 109 190
29 110 191
30 111 1...

result:

ok accepted

Test #17:

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

input:

729

output:

1 244 487
2 245 488
3 246 489
4 247 490
5 248 491
6 249 492
7 250 493
8 251 494
9 252 495
10 253 496
11 254 497
12 255 498
13 256 499
14 257 500
15 258 501
16 259 502
17 260 503
18 261 504
19 262 505
20 263 506
21 264 507
22 265 508
23 266 509
24 267 510
25 268 511
26 269 512
27 270 513
28 271 514
2...

result:

ok accepted

Test #18:

score: 0
Accepted
time: 71ms
memory: 3860kb

input:

2187

output:

1 730 1459
2 731 1460
3 732 1461
4 733 1462
5 734 1463
6 735 1464
7 736 1465
8 737 1466
9 738 1467
10 739 1468
11 740 1469
12 741 1470
13 742 1471
14 743 1472
15 744 1473
16 745 1474
17 746 1475
18 747 1476
19 748 1477
20 749 1478
21 750 1479
22 751 1480
23 752 1481
24 753 1482
25 754 1483
26 755 14...

result:

ok accepted

Subtask #3:

score: 0
Wrong Answer

Test #19:

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

input:

1

output:


result:

ok accepted

Test #20:

score: -9.09091
Wrong Answer
time: 0ms
memory: 3728kb

input:

25

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #4:

score: 0
Wrong Answer

Test #24:

score: 0
Wrong Answer
time: 0ms
memory: 3648kb

input:

7

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #5:

score: 0
Wrong Answer

Test #29:

score: 0
Wrong Answer
time: 0ms
memory: 3648kb

input:

13

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #6:

score: 0
Wrong Answer

Test #34:

score: 0
Wrong Answer
time: 0ms
memory: 3588kb

input:

19

output:


result:

wrong output format Unexpected end of file - int32 expected

Subtask #7:

score: 9.09091
Accepted

Test #39:

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

input:

3

output:

1 2 3

result:

ok accepted

Test #40:

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

input:

27

output:

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

result:

ok accepted

Test #41:

score: 0
Accepted
time: 141ms
memory: 3788kb

input:

2979

output:

1 994 1987
2 995 1988
3 996 1989
4 997 1990
5 998 1991
6 999 1992
7 1000 1993
8 1001 1994
9 1002 1995
10 1003 1996
11 1004 1997
12 1005 1998
13 1006 1999
14 1007 2000
15 1008 2001
16 1009 2002
17 1010 2003
18 1011 2004
19 1012 2005
20 1013 2006
21 1014 2007
22 1015 2008
23 1016 2009
24 1017 2010
25 ...

result:

ok accepted

Test #42:

score: 0
Accepted
time: 146ms
memory: 3840kb

input:

2955

output:

1 986 1971
2 987 1972
3 988 1973
4 989 1974
5 990 1975
6 991 1976
7 992 1977
8 993 1978
9 994 1979
10 995 1980
11 996 1981
12 997 1982
13 998 1983
14 999 1984
15 1000 1985
16 1001 1986
17 1002 1987
18 1003 1988
19 1004 1989
20 1005 1990
21 1006 1991
22 1007 1992
23 1008 1993
24 1009 1994
25 1010 199...

result:

ok accepted

Test #43:

score: 0
Accepted
time: 33ms
memory: 3904kb

input:

1419

output:

1 474 947
2 475 948
3 476 949
4 477 950
5 478 951
6 479 952
7 480 953
8 481 954
9 482 955
10 483 956
11 484 957
12 485 958
13 486 959
14 487 960
15 488 961
16 489 962
17 490 963
18 491 964
19 492 965
20 493 966
21 494 967
22 495 968
23 496 969
24 497 970
25 498 971
26 499 972
27 500 973
28 501 974
2...

result:

ok accepted

Subtask #8:

score: 9.09091
Accepted

Test #44:

score: 9.09091
Accepted
time: 0ms
memory: 3916kb

input:

21

output:

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

result:

ok accepted

Test #45:

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

input:

45

output:

1 16 31
2 17 32
3 18 33
4 19 34
5 20 35
6 21 36
7 22 37
8 23 38
9 24 39
10 25 40
11 26 41
12 27 42
13 28 43
14 29 44
15 30 45
1 2 24
1 3 17
1 4 25
1 5 18
1 6 26
1 7 19
1 8 27
1 9 20
1 10 28
1 11 21
1 12 29
1 13 22
1 14 30
1 15 23
2 3 25
2 4 18
2 5 26
2 6 19
2 7 27
2 8 20
2 9 28
2 10 21
2 11 29
2 12 ...

result:

ok accepted

Test #46:

score: 0
Accepted
time: 135ms
memory: 3788kb

input:

2997

output:

1 1000 1999
2 1001 2000
3 1002 2001
4 1003 2002
5 1004 2003
6 1005 2004
7 1006 2005
8 1007 2006
9 1008 2007
10 1009 2008
11 1010 2009
12 1011 2010
13 1012 2011
14 1013 2012
15 1014 2013
16 1015 2014
17 1016 2015
18 1017 2016
19 1018 2017
20 1019 2018
21 1020 2019
22 1021 2020
23 1022 2021
24 1023 20...

result:

ok accepted

Test #47:

score: 0
Accepted
time: 136ms
memory: 3904kb

input:

2973

output:

1 992 1983
2 993 1984
3 994 1985
4 995 1986
5 996 1987
6 997 1988
7 998 1989
8 999 1990
9 1000 1991
10 1001 1992
11 1002 1993
12 1003 1994
13 1004 1995
14 1005 1996
15 1006 1997
16 1007 1998
17 1008 1999
18 1009 2000
19 1010 2001
20 1011 2002
21 1012 2003
22 1013 2004
23 1014 2005
24 1015 2006
25 10...

result:

ok accepted

Test #48:

score: 0
Accepted
time: 49ms
memory: 3780kb

input:

1869

output:

1 624 1247
2 625 1248
3 626 1249
4 627 1250
5 628 1251
6 629 1252
7 630 1253
8 631 1254
9 632 1255
10 633 1256
11 634 1257
12 635 1258
13 636 1259
14 637 1260
15 638 1261
16 639 1262
17 640 1263
18 641 1264
19 642 1265
20 643 1266
21 644 1267
22 645 1268
23 646 1269
24 647 1270
25 648 1271
26 649 12...

result:

ok accepted

Subtask #9:

score: 9.09091
Accepted

Test #49:

score: 9.09091
Accepted
time: 0ms
memory: 3788kb

input:

9

output:

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

result:

ok accepted

Test #50:

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

input:

33

output:

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

result:

ok accepted

Test #51:

score: 0
Accepted
time: 141ms
memory: 3836kb

input:

2985

output:

1 996 1991
2 997 1992
3 998 1993
4 999 1994
5 1000 1995
6 1001 1996
7 1002 1997
8 1003 1998
9 1004 1999
10 1005 2000
11 1006 2001
12 1007 2002
13 1008 2003
14 1009 2004
15 1010 2005
16 1011 2006
17 1012 2007
18 1013 2008
19 1014 2009
20 1015 2010
21 1016 2011
22 1017 2012
23 1018 2013
24 1019 2014
2...

result:

ok accepted

Test #52:

score: 0
Accepted
time: 133ms
memory: 3792kb

input:

2961

output:

1 988 1975
2 989 1976
3 990 1977
4 991 1978
5 992 1979
6 993 1980
7 994 1981
8 995 1982
9 996 1983
10 997 1984
11 998 1985
12 999 1986
13 1000 1987
14 1001 1988
15 1002 1989
16 1003 1990
17 1004 1991
18 1005 1992
19 1006 1993
20 1007 1994
21 1008 1995
22 1009 1996
23 1010 1997
24 1011 1998
25 1012 1...

result:

ok accepted

Test #53:

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

input:

2025

output:

1 676 1351
2 677 1352
3 678 1353
4 679 1354
5 680 1355
6 681 1356
7 682 1357
8 683 1358
9 684 1359
10 685 1360
11 686 1361
12 687 1362
13 688 1363
14 689 1364
15 690 1365
16 691 1366
17 692 1367
18 693 1368
19 694 1369
20 695 1370
21 696 1371
22 697 1372
23 698 1373
24 699 1374
25 700 1375
26 701 13...

result:

ok accepted

Subtask #10:

score: 9.09091
Accepted

Test #54:

score: 9.09091
Accepted
time: 0ms
memory: 3780kb

input:

15

output:

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

result:

ok accepted

Test #55:

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

input:

39

output:

1 14 27
2 15 28
3 16 29
4 17 30
5 18 31
6 19 32
7 20 33
8 21 34
9 22 35
10 23 36
11 24 37
12 25 38
13 26 39
1 2 21
1 3 15
1 4 22
1 5 16
1 6 23
1 7 17
1 8 24
1 9 18
1 10 25
1 11 19
1 12 26
1 13 20
2 3 22
2 4 16
2 5 23
2 6 17
2 7 24
2 8 18
2 9 25
2 10 19
2 11 26
2 12 20
2 13 14
3 4 23
3 5 17
3 6 24
3 ...

result:

ok accepted

Test #56:

score: 0
Accepted
time: 148ms
memory: 3848kb

input:

2991

output:

1 998 1995
2 999 1996
3 1000 1997
4 1001 1998
5 1002 1999
6 1003 2000
7 1004 2001
8 1005 2002
9 1006 2003
10 1007 2004
11 1008 2005
12 1009 2006
13 1010 2007
14 1011 2008
15 1012 2009
16 1013 2010
17 1014 2011
18 1015 2012
19 1016 2013
20 1017 2014
21 1018 2015
22 1019 2016
23 1020 2017
24 1021 2018...

result:

ok accepted

Test #57:

score: 0
Accepted
time: 135ms
memory: 3900kb

input:

2967

output:

1 990 1979
2 991 1980
3 992 1981
4 993 1982
5 994 1983
6 995 1984
7 996 1985
8 997 1986
9 998 1987
10 999 1988
11 1000 1989
12 1001 1990
13 1002 1991
14 1003 1992
15 1004 1993
16 1005 1994
17 1006 1995
18 1007 1996
19 1008 1997
20 1009 1998
21 1010 1999
22 1011 2000
23 1012 2001
24 1013 2002
25 1014...

result:

ok accepted

Test #58:

score: 0
Accepted
time: 49ms
memory: 3788kb

input:

1719

output:

1 574 1147
2 575 1148
3 576 1149
4 577 1150
5 578 1151
6 579 1152
7 580 1153
8 581 1154
9 582 1155
10 583 1156
11 584 1157
12 585 1158
13 586 1159
14 587 1160
15 588 1161
16 589 1162
17 590 1163
18 591 1164
19 592 1165
20 593 1166
21 594 1167
22 595 1168
23 596 1169
24 597 1170
25 598 1171
26 599 11...

result:

ok accepted

Subtask #11:

score: 0
Skipped

Dependency #1:

0%