QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#807034#7840. Assessment DisruptionSGColinAC ✓0ms3960kbC++20650b2024-12-09 18:27:552024-12-09 18:27:56

Judging History

This is the latest submission verdict.

  • [2024-12-09 18:27:56]
  • Judged
  • Verdict: AC
  • Time: 0ms
  • Memory: 3960kb
  • [2024-12-09 18:27:55]
  • Submitted

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

inline int rd() {
    int x = 0; bool f = 0; char c = getchar();
    for (; !isdigit(c); c = getchar()) f |= (c == '-');
    for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48);
    return f ? -x : x;
}

#define eb emplace_back
#define all(s) (s).begin(), (s).end()
#define rep(i, a, b) for (int i = (a); i <= (b); ++i)
#define per(i, a, b) for (int i = (a); i >= (b); --i)

int main() {
    int n = rd(), W = rd();
    rep(i, 1, n / 2) printf("%d %d\n", W + i >= 10000 ? W - i : W + i, i);
    rep(i, n / 2 + 1, n) printf("%d %d\n", W, i);
    return 0;
}

详细

Test #1:

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

input:

3 2500

output:

2501 1
2500 2
2500 3

result:

ok correct

Test #2:

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

input:

2 8124

output:

8125 1
8124 2

result:

ok correct

Test #3:

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

input:

3 3563

output:

3564 1
3563 2
3563 3

result:

ok correct

Test #4:

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

input:

4 6374

output:

6375 1
6376 2
6374 3
6374 4

result:

ok correct

Test #5:

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

input:

5 10000

output:

9999 1
9998 2
10000 3
10000 4
10000 5

result:

ok correct

Test #6:

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

input:

6 1444

output:

1445 1
1446 2
1447 3
1444 4
1444 5
1444 6

result:

ok correct

Test #7:

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

input:

7 342

output:

343 1
344 2
345 3
342 4
342 5
342 6
342 7

result:

ok correct

Test #8:

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

input:

8 0

output:

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

result:

ok correct

Test #9:

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

input:

9 124

output:

125 1
126 2
127 3
128 4
124 5
124 6
124 7
124 8
124 9

result:

ok correct

Test #10:

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

input:

10 11

output:

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

result:

ok correct

Test #11:

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

input:

11 8

output:

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

result:

ok correct

Test #12:

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

input:

12 10000

output:

9999 1
9998 2
9997 3
9996 4
9995 5
9994 6
10000 7
10000 8
10000 9
10000 10
10000 11
10000 12

result:

ok correct

Test #13:

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

input:

13 9999

output:

9998 1
9997 2
9996 3
9995 4
9994 5
9993 6
9999 7
9999 8
9999 9
9999 10
9999 11
9999 12
9999 13

result:

ok correct

Test #14:

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

input:

14 2345

output:

2346 1
2347 2
2348 3
2349 4
2350 5
2351 6
2352 7
2345 8
2345 9
2345 10
2345 11
2345 12
2345 13
2345 14

result:

ok correct

Test #15:

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

input:

15 754

output:

755 1
756 2
757 3
758 4
759 5
760 6
761 7
754 8
754 9
754 10
754 11
754 12
754 13
754 14
754 15

result:

ok correct

Test #16:

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

input:

16 8723

output:

8724 1
8725 2
8726 3
8727 4
8728 5
8729 6
8730 7
8731 8
8723 9
8723 10
8723 11
8723 12
8723 13
8723 14
8723 15
8723 16

result:

ok correct

Test #17:

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

input:

17 9001

output:

9002 1
9003 2
9004 3
9005 4
9006 5
9007 6
9008 7
9009 8
9001 9
9001 10
9001 11
9001 12
9001 13
9001 14
9001 15
9001 16
9001 17

result:

ok correct

Test #18:

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

input:

18 1245

output:

1246 1
1247 2
1248 3
1249 4
1250 5
1251 6
1252 7
1253 8
1254 9
1245 10
1245 11
1245 12
1245 13
1245 14
1245 15
1245 16
1245 17
1245 18

result:

ok correct

Test #19:

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

input:

19 4324

output:

4325 1
4326 2
4327 3
4328 4
4329 5
4330 6
4331 7
4332 8
4333 9
4324 10
4324 11
4324 12
4324 13
4324 14
4324 15
4324 16
4324 17
4324 18
4324 19

result:

ok correct

Test #20:

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

input:

20 3463

output:

3464 1
3465 2
3466 3
3467 4
3468 5
3469 6
3470 7
3471 8
3472 9
3473 10
3463 11
3463 12
3463 13
3463 14
3463 15
3463 16
3463 17
3463 18
3463 19
3463 20

result:

ok correct

Test #21:

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

input:

21 2342

output:

2343 1
2344 2
2345 3
2346 4
2347 5
2348 6
2349 7
2350 8
2351 9
2352 10
2342 11
2342 12
2342 13
2342 14
2342 15
2342 16
2342 17
2342 18
2342 19
2342 20
2342 21

result:

ok correct

Test #22:

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

input:

22 10000

output:

9999 1
9998 2
9997 3
9996 4
9995 5
9994 6
9993 7
9992 8
9991 9
9990 10
9989 11
10000 12
10000 13
10000 14
10000 15
10000 16
10000 17
10000 18
10000 19
10000 20
10000 21
10000 22

result:

ok correct

Test #23:

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

input:

23 3424

output:

3425 1
3426 2
3427 3
3428 4
3429 5
3430 6
3431 7
3432 8
3433 9
3434 10
3435 11
3424 12
3424 13
3424 14
3424 15
3424 16
3424 17
3424 18
3424 19
3424 20
3424 21
3424 22
3424 23

result:

ok correct

Test #24:

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

input:

24 1

output:

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

result:

ok correct

Test #25:

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

input:

25 0

output:

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

result:

ok correct

Test #26:

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

input:

99 0

output:

1 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
21 21
22 22
23 23
24 24
25 25
26 26
27 27
28 28
29 29
30 30
31 31
32 32
33 33
34 34
35 35
36 36
37 37
38 38
39 39
40 40
41 41
42 42
43 43
44 44
45 45
46 46
47 47
48 48
49 49
0 50
0 51
0 52
0 53
0 54...

result:

ok correct

Test #27:

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

input:

99 1

output:

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

result:

ok correct

Test #28:

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

input:

99 6346

output:

6347 1
6348 2
6349 3
6350 4
6351 5
6352 6
6353 7
6354 8
6355 9
6356 10
6357 11
6358 12
6359 13
6360 14
6361 15
6362 16
6363 17
6364 18
6365 19
6366 20
6367 21
6368 22
6369 23
6370 24
6371 25
6372 26
6373 27
6374 28
6375 29
6376 30
6377 31
6378 32
6379 33
6380 34
6381 35
6382 36
6383 37
6384 38
6385 ...

result:

ok correct

Test #29:

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

input:

99 9999

output:

9998 1
9997 2
9996 3
9995 4
9994 5
9993 6
9992 7
9991 8
9990 9
9989 10
9988 11
9987 12
9986 13
9985 14
9984 15
9983 16
9982 17
9981 18
9980 19
9979 20
9978 21
9977 22
9976 23
9975 24
9974 25
9973 26
9972 27
9971 28
9970 29
9969 30
9968 31
9967 32
9966 33
9965 34
9964 35
9963 36
9962 37
9961 38
9960 ...

result:

ok correct

Test #30:

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

input:

99 10000

output:

9999 1
9998 2
9997 3
9996 4
9995 5
9994 6
9993 7
9992 8
9991 9
9990 10
9989 11
9988 12
9987 13
9986 14
9985 15
9984 16
9983 17
9982 18
9981 19
9980 20
9979 21
9978 22
9977 23
9976 24
9975 25
9974 26
9973 27
9972 28
9971 29
9970 30
9969 31
9968 32
9967 33
9966 34
9965 35
9964 36
9963 37
9962 38
9961 ...

result:

ok correct

Test #31:

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

input:

100 0

output:

1 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
21 21
22 22
23 23
24 24
25 25
26 26
27 27
28 28
29 29
30 30
31 31
32 32
33 33
34 34
35 35
36 36
37 37
38 38
39 39
40 40
41 41
42 42
43 43
44 44
45 45
46 46
47 47
48 48
49 49
50 50
0 51
0 52
0 53
0 5...

result:

ok correct

Test #32:

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

input:

100 1

output:

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

result:

ok correct

Test #33:

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

input:

100 1244

output:

1245 1
1246 2
1247 3
1248 4
1249 5
1250 6
1251 7
1252 8
1253 9
1254 10
1255 11
1256 12
1257 13
1258 14
1259 15
1260 16
1261 17
1262 18
1263 19
1264 20
1265 21
1266 22
1267 23
1268 24
1269 25
1270 26
1271 27
1272 28
1273 29
1274 30
1275 31
1276 32
1277 33
1278 34
1279 35
1280 36
1281 37
1282 38
1283 ...

result:

ok correct

Test #34:

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

input:

100 9999

output:

9998 1
9997 2
9996 3
9995 4
9994 5
9993 6
9992 7
9991 8
9990 9
9989 10
9988 11
9987 12
9986 13
9985 14
9984 15
9983 16
9982 17
9981 18
9980 19
9979 20
9978 21
9977 22
9976 23
9975 24
9974 25
9973 26
9972 27
9971 28
9970 29
9969 30
9968 31
9967 32
9966 33
9965 34
9964 35
9963 36
9962 37
9961 38
9960 ...

result:

ok correct

Test #35:

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

input:

100 10000

output:

9999 1
9998 2
9997 3
9996 4
9995 5
9994 6
9993 7
9992 8
9991 9
9990 10
9989 11
9988 12
9987 13
9986 14
9985 15
9984 16
9983 17
9982 18
9981 19
9980 20
9979 21
9978 22
9977 23
9976 24
9975 25
9974 26
9973 27
9972 28
9971 29
9970 30
9969 31
9968 32
9967 33
9966 34
9965 35
9964 36
9963 37
9962 38
9961 ...

result:

ok correct

Test #36:

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

input:

999 0

output:

1 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
21 21
22 22
23 23
24 24
25 25
26 26
27 27
28 28
29 29
30 30
31 31
32 32
33 33
34 34
35 35
36 36
37 37
38 38
39 39
40 40
41 41
42 42
43 43
44 44
45 45
46 46
47 47
48 48
49 49
50 50
51 51
52 52
53 53
...

result:

ok correct

Test #37:

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

input:

999 1

output:

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

result:

ok correct

Test #38:

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

input:

999 4234

output:

4235 1
4236 2
4237 3
4238 4
4239 5
4240 6
4241 7
4242 8
4243 9
4244 10
4245 11
4246 12
4247 13
4248 14
4249 15
4250 16
4251 17
4252 18
4253 19
4254 20
4255 21
4256 22
4257 23
4258 24
4259 25
4260 26
4261 27
4262 28
4263 29
4264 30
4265 31
4266 32
4267 33
4268 34
4269 35
4270 36
4271 37
4272 38
4273 ...

result:

ok correct

Test #39:

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

input:

999 9999

output:

9998 1
9997 2
9996 3
9995 4
9994 5
9993 6
9992 7
9991 8
9990 9
9989 10
9988 11
9987 12
9986 13
9985 14
9984 15
9983 16
9982 17
9981 18
9980 19
9979 20
9978 21
9977 22
9976 23
9975 24
9974 25
9973 26
9972 27
9971 28
9970 29
9969 30
9968 31
9967 32
9966 33
9965 34
9964 35
9963 36
9962 37
9961 38
9960 ...

result:

ok correct

Test #40:

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

input:

999 10000

output:

9999 1
9998 2
9997 3
9996 4
9995 5
9994 6
9993 7
9992 8
9991 9
9990 10
9989 11
9988 12
9987 13
9986 14
9985 15
9984 16
9983 17
9982 18
9981 19
9980 20
9979 21
9978 22
9977 23
9976 24
9975 25
9974 26
9973 27
9972 28
9971 29
9970 30
9969 31
9968 32
9967 33
9966 34
9965 35
9964 36
9963 37
9962 38
9961 ...

result:

ok correct

Test #41:

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

input:

1000 0

output:

1 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
21 21
22 22
23 23
24 24
25 25
26 26
27 27
28 28
29 29
30 30
31 31
32 32
33 33
34 34
35 35
36 36
37 37
38 38
39 39
40 40
41 41
42 42
43 43
44 44
45 45
46 46
47 47
48 48
49 49
50 50
51 51
52 52
53 53
...

result:

ok correct

Test #42:

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

input:

1000 1

output:

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

result:

ok correct

Test #43:

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

input:

1000 1321

output:

1322 1
1323 2
1324 3
1325 4
1326 5
1327 6
1328 7
1329 8
1330 9
1331 10
1332 11
1333 12
1334 13
1335 14
1336 15
1337 16
1338 17
1339 18
1340 19
1341 20
1342 21
1343 22
1344 23
1345 24
1346 25
1347 26
1348 27
1349 28
1350 29
1351 30
1352 31
1353 32
1354 33
1355 34
1356 35
1357 36
1358 37
1359 38
1360 ...

result:

ok correct

Test #44:

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

input:

1000 9999

output:

9998 1
9997 2
9996 3
9995 4
9994 5
9993 6
9992 7
9991 8
9990 9
9989 10
9988 11
9987 12
9986 13
9985 14
9984 15
9983 16
9982 17
9981 18
9980 19
9979 20
9978 21
9977 22
9976 23
9975 24
9974 25
9973 26
9972 27
9971 28
9970 29
9969 30
9968 31
9967 32
9966 33
9965 34
9964 35
9963 36
9962 37
9961 38
9960 ...

result:

ok correct

Test #45:

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

input:

1000 10000

output:

9999 1
9998 2
9997 3
9996 4
9995 5
9994 6
9993 7
9992 8
9991 9
9990 10
9989 11
9988 12
9987 13
9986 14
9985 15
9984 16
9983 17
9982 18
9981 19
9980 20
9979 21
9978 22
9977 23
9976 24
9975 25
9974 26
9973 27
9972 28
9971 29
9970 30
9969 31
9968 32
9967 33
9966 34
9965 35
9964 36
9963 37
9962 38
9961 ...

result:

ok correct