QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#365325#7840. Assessment Disruptionkevinyang#AC ✓0ms3872kbC++17582b2024-03-25 03:15:552024-03-25 03:15:57

Judging History

This is the latest submission verdict.

  • [2024-03-25 03:15:57]
  • Judged
  • Verdict: AC
  • Time: 0ms
  • Memory: 3872kb
  • [2024-03-25 03:15:55]
  • Submitted

answer

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
	cin.tie(nullptr)->sync_with_stdio(false);
	int n,w;
	cin >> n >> w;
	vector<int>d(n);
	vector<int>q(n);
	int m = n/2;
	for(int i = 0; i<m; i++){
		d[i] = n-m+i;
		q[i] = i;
	}
	for(int i = m; i<n; i++){
		q[i] = i;
		d[i] = n-i;
	}
	vector<int>ans(n);
	if(w>5000){
		for(int i = 0; i<n; i++){
			ans[i] = w-d[i];
		}
	}
	else{
		for(int i = 0; i<n; i++){
			ans[i] = w+d[i];
		}
	}
	for(int i = 0; i<n; i++){
		cout << ans[i] << ' ' << q[i] << '\n';
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 2500

output:

2502 0
2502 1
2501 2

result:

ok correct

Test #2:

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

input:

2 8124

output:

8123 0
8123 1

result:

ok correct

Test #3:

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

input:

3 3563

output:

3565 0
3565 1
3564 2

result:

ok correct

Test #4:

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

input:

4 6374

output:

6372 0
6371 1
6372 2
6373 3

result:

ok correct

Test #5:

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

input:

5 10000

output:

9997 0
9996 1
9997 2
9998 3
9999 4

result:

ok correct

Test #6:

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

input:

6 1444

output:

1447 0
1448 1
1449 2
1447 3
1446 4
1445 5

result:

ok correct

Test #7:

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

input:

7 342

output:

346 0
347 1
348 2
346 3
345 4
344 5
343 6

result:

ok correct

Test #8:

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

input:

8 0

output:

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

result:

ok correct

Test #9:

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

input:

9 124

output:

129 0
130 1
131 2
132 3
129 4
128 5
127 6
126 7
125 8

result:

ok correct

Test #10:

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

input:

10 11

output:

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

result:

ok correct

Test #11:

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

input:

11 8

output:

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

result:

ok correct

Test #12:

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

input:

12 10000

output:

9994 0
9993 1
9992 2
9991 3
9990 4
9989 5
9994 6
9995 7
9996 8
9997 9
9998 10
9999 11

result:

ok correct

Test #13:

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

input:

13 9999

output:

9992 0
9991 1
9990 2
9989 3
9988 4
9987 5
9992 6
9993 7
9994 8
9995 9
9996 10
9997 11
9998 12

result:

ok correct

Test #14:

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

input:

14 2345

output:

2352 0
2353 1
2354 2
2355 3
2356 4
2357 5
2358 6
2352 7
2351 8
2350 9
2349 10
2348 11
2347 12
2346 13

result:

ok correct

Test #15:

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

input:

15 754

output:

762 0
763 1
764 2
765 3
766 4
767 5
768 6
762 7
761 8
760 9
759 10
758 11
757 12
756 13
755 14

result:

ok correct

Test #16:

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

input:

16 8723

output:

8715 0
8714 1
8713 2
8712 3
8711 4
8710 5
8709 6
8708 7
8715 8
8716 9
8717 10
8718 11
8719 12
8720 13
8721 14
8722 15

result:

ok correct

Test #17:

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

input:

17 9001

output:

8992 0
8991 1
8990 2
8989 3
8988 4
8987 5
8986 6
8985 7
8992 8
8993 9
8994 10
8995 11
8996 12
8997 13
8998 14
8999 15
9000 16

result:

ok correct

Test #18:

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

input:

18 1245

output:

1254 0
1255 1
1256 2
1257 3
1258 4
1259 5
1260 6
1261 7
1262 8
1254 9
1253 10
1252 11
1251 12
1250 13
1249 14
1248 15
1247 16
1246 17

result:

ok correct

Test #19:

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

input:

19 4324

output:

4334 0
4335 1
4336 2
4337 3
4338 4
4339 5
4340 6
4341 7
4342 8
4334 9
4333 10
4332 11
4331 12
4330 13
4329 14
4328 15
4327 16
4326 17
4325 18

result:

ok correct

Test #20:

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

input:

20 3463

output:

3473 0
3474 1
3475 2
3476 3
3477 4
3478 5
3479 6
3480 7
3481 8
3482 9
3473 10
3472 11
3471 12
3470 13
3469 14
3468 15
3467 16
3466 17
3465 18
3464 19

result:

ok correct

Test #21:

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

input:

21 2342

output:

2353 0
2354 1
2355 2
2356 3
2357 4
2358 5
2359 6
2360 7
2361 8
2362 9
2353 10
2352 11
2351 12
2350 13
2349 14
2348 15
2347 16
2346 17
2345 18
2344 19
2343 20

result:

ok correct

Test #22:

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

input:

22 10000

output:

9989 0
9988 1
9987 2
9986 3
9985 4
9984 5
9983 6
9982 7
9981 8
9980 9
9979 10
9989 11
9990 12
9991 13
9992 14
9993 15
9994 16
9995 17
9996 18
9997 19
9998 20
9999 21

result:

ok correct

Test #23:

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

input:

23 3424

output:

3436 0
3437 1
3438 2
3439 3
3440 4
3441 5
3442 6
3443 7
3444 8
3445 9
3446 10
3436 11
3435 12
3434 13
3433 14
3432 15
3431 16
3430 17
3429 18
3428 19
3427 20
3426 21
3425 22

result:

ok correct

Test #24:

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

input:

24 1

output:

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

result:

ok correct

Test #25:

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

input:

25 0

output:

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

result:

ok correct

Test #26:

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

input:

99 0

output:

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

result:

ok correct

Test #27:

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

input:

99 1

output:

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

result:

ok correct

Test #28:

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

input:

99 6346

output:

6296 0
6295 1
6294 2
6293 3
6292 4
6291 5
6290 6
6289 7
6288 8
6287 9
6286 10
6285 11
6284 12
6283 13
6282 14
6281 15
6280 16
6279 17
6278 18
6277 19
6276 20
6275 21
6274 22
6273 23
6272 24
6271 25
6270 26
6269 27
6268 28
6267 29
6266 30
6265 31
6264 32
6263 33
6262 34
6261 35
6260 36
6259 37
6258 3...

result:

ok correct

Test #29:

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

input:

99 9999

output:

9949 0
9948 1
9947 2
9946 3
9945 4
9944 5
9943 6
9942 7
9941 8
9940 9
9939 10
9938 11
9937 12
9936 13
9935 14
9934 15
9933 16
9932 17
9931 18
9930 19
9929 20
9928 21
9927 22
9926 23
9925 24
9924 25
9923 26
9922 27
9921 28
9920 29
9919 30
9918 31
9917 32
9916 33
9915 34
9914 35
9913 36
9912 37
9911 3...

result:

ok correct

Test #30:

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

input:

99 10000

output:

9950 0
9949 1
9948 2
9947 3
9946 4
9945 5
9944 6
9943 7
9942 8
9941 9
9940 10
9939 11
9938 12
9937 13
9936 14
9935 15
9934 16
9933 17
9932 18
9931 19
9930 20
9929 21
9928 22
9927 23
9926 24
9925 25
9924 26
9923 27
9922 28
9921 29
9920 30
9919 31
9918 32
9917 33
9916 34
9915 35
9914 36
9913 37
9912 3...

result:

ok correct

Test #31:

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

input:

100 0

output:

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

result:

ok correct

Test #32:

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

input:

100 1

output:

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

result:

ok correct

Test #33:

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

input:

100 1244

output:

1294 0
1295 1
1296 2
1297 3
1298 4
1299 5
1300 6
1301 7
1302 8
1303 9
1304 10
1305 11
1306 12
1307 13
1308 14
1309 15
1310 16
1311 17
1312 18
1313 19
1314 20
1315 21
1316 22
1317 23
1318 24
1319 25
1320 26
1321 27
1322 28
1323 29
1324 30
1325 31
1326 32
1327 33
1328 34
1329 35
1330 36
1331 37
1332 3...

result:

ok correct

Test #34:

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

input:

100 9999

output:

9949 0
9948 1
9947 2
9946 3
9945 4
9944 5
9943 6
9942 7
9941 8
9940 9
9939 10
9938 11
9937 12
9936 13
9935 14
9934 15
9933 16
9932 17
9931 18
9930 19
9929 20
9928 21
9927 22
9926 23
9925 24
9924 25
9923 26
9922 27
9921 28
9920 29
9919 30
9918 31
9917 32
9916 33
9915 34
9914 35
9913 36
9912 37
9911 3...

result:

ok correct

Test #35:

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

input:

100 10000

output:

9950 0
9949 1
9948 2
9947 3
9946 4
9945 5
9944 6
9943 7
9942 8
9941 9
9940 10
9939 11
9938 12
9937 13
9936 14
9935 15
9934 16
9933 17
9932 18
9931 19
9930 20
9929 21
9928 22
9927 23
9926 24
9925 25
9924 26
9923 27
9922 28
9921 29
9920 30
9919 31
9918 32
9917 33
9916 34
9915 35
9914 36
9913 37
9912 3...

result:

ok correct

Test #36:

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

input:

999 0

output:

500 0
501 1
502 2
503 3
504 4
505 5
506 6
507 7
508 8
509 9
510 10
511 11
512 12
513 13
514 14
515 15
516 16
517 17
518 18
519 19
520 20
521 21
522 22
523 23
524 24
525 25
526 26
527 27
528 28
529 29
530 30
531 31
532 32
533 33
534 34
535 35
536 36
537 37
538 38
539 39
540 40
541 41
542 42
543 43
54...

result:

ok correct

Test #37:

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

input:

999 1

output:

501 0
502 1
503 2
504 3
505 4
506 5
507 6
508 7
509 8
510 9
511 10
512 11
513 12
514 13
515 14
516 15
517 16
518 17
519 18
520 19
521 20
522 21
523 22
524 23
525 24
526 25
527 26
528 27
529 28
530 29
531 30
532 31
533 32
534 33
535 34
536 35
537 36
538 37
539 38
540 39
541 40
542 41
543 42
544 43
54...

result:

ok correct

Test #38:

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

input:

999 4234

output:

4734 0
4735 1
4736 2
4737 3
4738 4
4739 5
4740 6
4741 7
4742 8
4743 9
4744 10
4745 11
4746 12
4747 13
4748 14
4749 15
4750 16
4751 17
4752 18
4753 19
4754 20
4755 21
4756 22
4757 23
4758 24
4759 25
4760 26
4761 27
4762 28
4763 29
4764 30
4765 31
4766 32
4767 33
4768 34
4769 35
4770 36
4771 37
4772 3...

result:

ok correct

Test #39:

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

input:

999 9999

output:

9499 0
9498 1
9497 2
9496 3
9495 4
9494 5
9493 6
9492 7
9491 8
9490 9
9489 10
9488 11
9487 12
9486 13
9485 14
9484 15
9483 16
9482 17
9481 18
9480 19
9479 20
9478 21
9477 22
9476 23
9475 24
9474 25
9473 26
9472 27
9471 28
9470 29
9469 30
9468 31
9467 32
9466 33
9465 34
9464 35
9463 36
9462 37
9461 3...

result:

ok correct

Test #40:

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

input:

999 10000

output:

9500 0
9499 1
9498 2
9497 3
9496 4
9495 5
9494 6
9493 7
9492 8
9491 9
9490 10
9489 11
9488 12
9487 13
9486 14
9485 15
9484 16
9483 17
9482 18
9481 19
9480 20
9479 21
9478 22
9477 23
9476 24
9475 25
9474 26
9473 27
9472 28
9471 29
9470 30
9469 31
9468 32
9467 33
9466 34
9465 35
9464 36
9463 37
9462 3...

result:

ok correct

Test #41:

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

input:

1000 0

output:

500 0
501 1
502 2
503 3
504 4
505 5
506 6
507 7
508 8
509 9
510 10
511 11
512 12
513 13
514 14
515 15
516 16
517 17
518 18
519 19
520 20
521 21
522 22
523 23
524 24
525 25
526 26
527 27
528 28
529 29
530 30
531 31
532 32
533 33
534 34
535 35
536 36
537 37
538 38
539 39
540 40
541 41
542 42
543 43
54...

result:

ok correct

Test #42:

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

input:

1000 1

output:

501 0
502 1
503 2
504 3
505 4
506 5
507 6
508 7
509 8
510 9
511 10
512 11
513 12
514 13
515 14
516 15
517 16
518 17
519 18
520 19
521 20
522 21
523 22
524 23
525 24
526 25
527 26
528 27
529 28
530 29
531 30
532 31
533 32
534 33
535 34
536 35
537 36
538 37
539 38
540 39
541 40
542 41
543 42
544 43
54...

result:

ok correct

Test #43:

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

input:

1000 1321

output:

1821 0
1822 1
1823 2
1824 3
1825 4
1826 5
1827 6
1828 7
1829 8
1830 9
1831 10
1832 11
1833 12
1834 13
1835 14
1836 15
1837 16
1838 17
1839 18
1840 19
1841 20
1842 21
1843 22
1844 23
1845 24
1846 25
1847 26
1848 27
1849 28
1850 29
1851 30
1852 31
1853 32
1854 33
1855 34
1856 35
1857 36
1858 37
1859 3...

result:

ok correct

Test #44:

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

input:

1000 9999

output:

9499 0
9498 1
9497 2
9496 3
9495 4
9494 5
9493 6
9492 7
9491 8
9490 9
9489 10
9488 11
9487 12
9486 13
9485 14
9484 15
9483 16
9482 17
9481 18
9480 19
9479 20
9478 21
9477 22
9476 23
9475 24
9474 25
9473 26
9472 27
9471 28
9470 29
9469 30
9468 31
9467 32
9466 33
9465 34
9464 35
9463 36
9462 37
9461 3...

result:

ok correct

Test #45:

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

input:

1000 10000

output:

9500 0
9499 1
9498 2
9497 3
9496 4
9495 5
9494 6
9493 7
9492 8
9491 9
9490 10
9489 11
9488 12
9487 13
9486 14
9485 15
9484 16
9483 17
9482 18
9481 19
9480 20
9479 21
9478 22
9477 23
9476 24
9475 25
9474 26
9473 27
9472 28
9471 29
9470 30
9469 31
9468 32
9467 33
9466 34
9465 35
9464 36
9463 37
9462 3...

result:

ok correct