QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#604292#7619. Make SYSU Great Again Iucup-team3160#AC ✓73ms11760kbC++14614b2024-10-02 09:10:562024-10-02 09:10:57

Judging History

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

  • [2024-10-02 09:10:57]
  • 评测
  • 测评结果:AC
  • 用时:73ms
  • 内存:11760kb
  • [2024-10-02 09:10:56]
  • 提交

answer

# include <bits/stdc++.h>

using namespace std ;

int n , k ;
int posx[1000005] , posy[1000005] ;

int main()
{
	scanf("%d%d" , &n , &k) ;
	int cc = 2 * n ;
	for ( int i = 1 ; i <= n ; i++ )
	{
		posx[2 * i - 1] = i , posy[2 * i - 1] = i ;
		posx[2 * i] = i , posy[2 * i] = i + 1 ;
		if ( i == n ) posy[2 * i] = 1 ; 
		for ( int j = 1 ; j <= n ; j++ )
		{
			if ( j == posy[2 * i - 1] || j == posy[2 * i] ) continue ;
			if ( cc == k ) break ;
			posx[++ cc] = i ;
			posy[cc] = j ;
		}
	}
	for ( int i = 1 ; i <= k ; i++ )
	{
		printf("%d %d\n" , posx[i] , posy[i]) ;
	}
	return 0 ;
}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 6

output:

1 1
1 2
2 2
2 3
3 3
3 1

result:

ok The answer is correct.

Test #2:

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

input:

3 7

output:

1 1
1 2
2 2
2 3
3 3
3 1
1 3

result:

ok The answer is correct.

Test #3:

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

input:

2 4

output:

1 1
1 2
2 2
2 1

result:

ok The answer is correct.

Test #4:

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

input:

3 9

output:

1 1
1 2
2 2
2 3
3 3
3 1
1 3
2 1
3 2

result:

ok The answer is correct.

Test #5:

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

input:

10 20

output:

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

result:

ok The answer is correct.

Test #6:

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

input:

10 100

output:

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

result:

ok The answer is correct.

Test #7:

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

input:

32 64

output:

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

result:

ok The answer is correct.

Test #8:

score: 0
Accepted
time: 32ms
memory: 10900kb

input:

200000 400000

output:

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

result:

ok The answer is correct.

Test #9:

score: 0
Accepted
time: 52ms
memory: 11660kb

input:

200000 745589

output:

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

result:

ok The answer is correct.

Test #10:

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

input:

199999 978736

output:

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

result:

ok The answer is correct.

Test #11:

score: 0
Accepted
time: 35ms
memory: 11156kb

input:

198054 619549

output:

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

result:

ok The answer is correct.

Test #12:

score: 0
Accepted
time: 42ms
memory: 10120kb

input:

123124 567865

output:

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

result:

ok The answer is correct.

Test #13:

score: 0
Accepted
time: 25ms
memory: 9488kb

input:

124252 416756

output:

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

result:

ok The answer is correct.

Test #14:

score: 0
Accepted
time: 43ms
memory: 10724kb

input:

103503 748077

output:

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

result:

ok The answer is correct.

Test #15:

score: 0
Accepted
time: 68ms
memory: 11708kb

input:

120394 987331

output:

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

result:

ok The answer is correct.

Test #16:

score: 0
Accepted
time: 42ms
memory: 10516kb

input:

123942 619710

output:

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

result:

ok The answer is correct.

Test #17:

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

input:

51251 1000000

output:

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

result:

ok The answer is correct.

Test #18:

score: 0
Accepted
time: 29ms
memory: 9428kb

input:

200000 400001

output:

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

result:

ok The answer is correct.

Test #19:

score: 0
Accepted
time: 28ms
memory: 9568kb

input:

199999 400001

output:

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

result:

ok The answer is correct.

Test #20:

score: 0
Accepted
time: 13ms
memory: 10268kb

input:

100000 200000

output:

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

result:

ok The answer is correct.

Test #21:

score: 0
Accepted
time: 3ms
memory: 6060kb

input:

14125 28290

output:

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

result:

ok The answer is correct.

Test #22:

score: 0
Accepted
time: 67ms
memory: 11720kb

input:

200000 1000000

output:

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

result:

ok The answer is correct.

Test #23:

score: 0
Accepted
time: 73ms
memory: 11760kb

input:

100000 1000000

output:

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

result:

ok The answer is correct.

Test #24:

score: 0
Accepted
time: 72ms
memory: 11616kb

input:

1000 1000000

output:

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

result:

ok The answer is correct.

Test #25:

score: 0
Accepted
time: 21ms
memory: 7064kb

input:

532 283024

output:

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

result:

ok The answer is correct.

Test #26:

score: 0
Accepted
time: 44ms
memory: 10448kb

input:

121434 568983

output:

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

result:

ok The answer is correct.

Test #27:

score: 0
Accepted
time: 3ms
memory: 6020kb

input:

11111 32222

output:

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

result:

ok The answer is correct.

Test #28:

score: 0
Accepted
time: 38ms
memory: 10876kb

input:

200000 600000

output:

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

result:

ok The answer is correct.

Test #29:

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

input:

64 128

output:

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

result:

ok The answer is correct.

Test #30:

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

input:

128 8920

output:

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

result:

ok The answer is correct.

Extra Test:

score: 0
Extra Test Passed