QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#694623 | #7619. Make SYSU Great Again I | diguo | AC ✓ | 483ms | 66104kb | C++23 | 1.1kb | 2024-10-31 18:20:31 | 2024-10-31 18:20:44 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define rep(i, x, y) for (int i = x; i <= y; ++i)
#define per(i, x, y) for (int i = x; i >= y; --i)
#define ll long long
#define pii pair<int, int>
inline ll read()
{
ll x = 0, f = 1; char ch = getchar();
while (!isdigit(ch)) {if (ch == '-') f = -f; ch = getchar();}
while (isdigit(ch)) {x = x * 10 + ch - 48; ch = getchar();}
return x * f;
}
void solve()
{
int n = read(), k = read();
map<pii, bool> mp;
auto go = [&](int x, int y)
{
mp[{x, y}] = 1;
cout << x << ' ' << y << '\n';
};
go(1, 1), go(1, n);
per(i, n, 2)
{
go(i, i);
go(i, i - 1);
}
int x = 1, y = 1;
auto find = [&]()
{
while (mp[{x, y}])
{
if (y == n)
{
y = 1;
x += 1;
}
else ++y;
}
go(x, y);
};
rep(i, 2 * n + 1, k) find();
}
int main()
{
int t = 1;
while (t--)
{
solve();
putchar('\n');
}
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3836kb
input:
3 6
output:
1 1 1 3 3 3 3 2 2 2 2 1
result:
ok The answer is correct.
Test #2:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
3 7
output:
1 1 1 3 3 3 3 2 2 2 2 1 1 2
result:
ok The answer is correct.
Test #3:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
2 4
output:
1 1 1 2 2 2 2 1
result:
ok The answer is correct.
Test #4:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
3 9
output:
1 1 1 3 3 3 3 2 2 2 2 1 1 2 2 3 3 1
result:
ok The answer is correct.
Test #5:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
10 20
output:
1 1 1 10 10 10 10 9 9 9 9 8 8 8 8 7 7 7 7 6 6 6 6 5 5 5 5 4 4 4 4 3 3 3 3 2 2 2 2 1
result:
ok The answer is correct.
Test #6:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
10 100
output:
1 1 1 10 10 10 10 9 9 9 9 8 8 8 8 7 7 7 7 6 6 6 6 5 5 5 5 4 4 4 4 3 3 3 3 2 2 2 2 1 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 2 3 2 4 2 5 2 6 2 7 2 8 2 9 2 10 3 1 3 4 3 5 3 6 3 7 3 8 3 9 3 10 4 1 4 2 4 5 4 6 4 7 4 8 4 9 4 10 5 1 5 2 5 3 5 6 5 7 5 8 5 9 5 10 6 1 6 2 6 3 6 4 6 7 6 8 6 9 6 10 7 1 7 2 7 3 7 4 7 5...
result:
ok The answer is correct.
Test #7:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
32 64
output:
1 1 1 32 32 32 32 31 31 31 31 30 30 30 30 29 29 29 29 28 28 28 28 27 27 27 27 26 26 26 26 25 25 25 25 24 24 24 24 23 23 23 23 22 22 22 22 21 21 21 21 20 20 20 20 19 19 19 19 18 18 18 18 17 17 17 17 16 16 16 16 15 15 15 15 14 14 14 14 13 13 13 13 12 12 12 12 11 11 11 11 10 10 10 10 9 9 9 9 8 8 8 8 7 ...
result:
ok The answer is correct.
Test #8:
score: 0
Accepted
time: 128ms
memory: 28600kb
input:
200000 400000
output:
1 1 1 200000 200000 200000 200000 199999 199999 199999 199999 199998 199998 199998 199998 199997 199997 199997 199997 199996 199996 199996 199996 199995 199995 199995 199995 199994 199994 199994 199994 199993 199993 199993 199993 199992 199992 199992 199992 199991 199991 199991 199991 199990 199990 ...
result:
ok The answer is correct.
Test #9:
score: 0
Accepted
time: 323ms
memory: 50084kb
input:
200000 745589
output:
1 1 1 200000 200000 200000 200000 199999 199999 199999 199999 199998 199998 199998 199998 199997 199997 199997 199997 199996 199996 199996 199996 199995 199995 199995 199995 199994 199994 199994 199994 199993 199993 199993 199993 199992 199992 199992 199992 199991 199991 199991 199991 199990 199990 ...
result:
ok The answer is correct.
Test #10:
score: 0
Accepted
time: 450ms
memory: 64740kb
input:
199999 978736
output:
1 1 1 199999 199999 199999 199999 199998 199998 199998 199998 199997 199997 199997 199997 199996 199996 199996 199996 199995 199995 199995 199995 199994 199994 199994 199994 199993 199993 199993 199993 199992 199992 199992 199992 199991 199991 199991 199991 199990 199990 199990 199990 199989 199989 ...
result:
ok The answer is correct.
Test #11:
score: 0
Accepted
time: 253ms
memory: 42316kb
input:
198054 619549
output:
1 1 1 198054 198054 198054 198054 198053 198053 198053 198053 198052 198052 198052 198052 198051 198051 198051 198051 198050 198050 198050 198050 198049 198049 198049 198049 198048 198048 198048 198048 198047 198047 198047 198047 198046 198046 198046 198046 198045 198045 198045 198045 198044 198044 ...
result:
ok The answer is correct.
Test #12:
score: 0
Accepted
time: 237ms
memory: 39084kb
input:
123124 567865
output:
1 1 1 123124 123124 123124 123124 123123 123123 123123 123123 123122 123122 123122 123122 123121 123121 123121 123121 123120 123120 123120 123120 123119 123119 123119 123119 123118 123118 123118 123118 123117 123117 123117 123117 123116 123116 123116 123116 123115 123115 123115 123115 123114 123114 ...
result:
ok The answer is correct.
Test #13:
score: 0
Accepted
time: 164ms
memory: 29580kb
input:
124252 416756
output:
1 1 1 124252 124252 124252 124252 124251 124251 124251 124251 124250 124250 124250 124250 124249 124249 124249 124249 124248 124248 124248 124248 124247 124247 124247 124247 124246 124246 124246 124246 124245 124245 124245 124245 124244 124244 124244 124244 124243 124243 124243 124243 124242 124242 ...
result:
ok The answer is correct.
Test #14:
score: 0
Accepted
time: 332ms
memory: 50344kb
input:
103503 748077
output:
1 1 1 103503 103503 103503 103503 103502 103502 103502 103502 103501 103501 103501 103501 103500 103500 103500 103500 103499 103499 103499 103499 103498 103498 103498 103498 103497 103497 103497 103497 103496 103496 103496 103496 103495 103495 103495 103495 103494 103494 103494 103494 103493 103493 ...
result:
ok The answer is correct.
Test #15:
score: 0
Accepted
time: 472ms
memory: 65304kb
input:
120394 987331
output:
1 1 1 120394 120394 120394 120394 120393 120393 120393 120393 120392 120392 120392 120392 120391 120391 120391 120391 120390 120390 120390 120390 120389 120389 120389 120389 120388 120388 120388 120388 120387 120387 120387 120387 120386 120386 120386 120386 120385 120385 120385 120385 120384 120384 ...
result:
ok The answer is correct.
Test #16:
score: 0
Accepted
time: 284ms
memory: 42488kb
input:
123942 619710
output:
1 1 1 123942 123942 123942 123942 123941 123941 123941 123941 123940 123940 123940 123940 123939 123939 123939 123939 123938 123938 123938 123938 123937 123937 123937 123937 123936 123936 123936 123936 123935 123935 123935 123935 123934 123934 123934 123934 123933 123933 123933 123933 123932 123932 ...
result:
ok The answer is correct.
Test #17:
score: 0
Accepted
time: 483ms
memory: 66072kb
input:
51251 1000000
output:
1 1 1 51251 51251 51251 51251 51250 51250 51250 51250 51249 51249 51249 51249 51248 51248 51248 51248 51247 51247 51247 51247 51246 51246 51246 51246 51245 51245 51245 51245 51244 51244 51244 51244 51243 51243 51243 51243 51242 51242 51242 51242 51241 51241 51241 51241 51240 51240 51240 51240 51239 ...
result:
ok The answer is correct.
Test #18:
score: 0
Accepted
time: 119ms
memory: 28792kb
input:
200000 400001
output:
1 1 1 200000 200000 200000 200000 199999 199999 199999 199999 199998 199998 199998 199998 199997 199997 199997 199997 199996 199996 199996 199996 199995 199995 199995 199995 199994 199994 199994 199994 199993 199993 199993 199993 199992 199992 199992 199992 199991 199991 199991 199991 199990 199990 ...
result:
ok The answer is correct.
Test #19:
score: 0
Accepted
time: 122ms
memory: 28532kb
input:
199999 400001
output:
1 1 1 199999 199999 199999 199999 199998 199998 199998 199998 199997 199997 199997 199997 199996 199996 199996 199996 199995 199995 199995 199995 199994 199994 199994 199994 199993 199993 199993 199993 199992 199992 199992 199992 199991 199991 199991 199991 199990 199990 199990 199990 199989 199989 ...
result:
ok The answer is correct.
Test #20:
score: 0
Accepted
time: 56ms
memory: 16036kb
input:
100000 200000
output:
1 1 1 100000 100000 100000 100000 99999 99999 99999 99999 99998 99998 99998 99998 99997 99997 99997 99997 99996 99996 99996 99996 99995 99995 99995 99995 99994 99994 99994 99994 99993 99993 99993 99993 99992 99992 99992 99992 99991 99991 99991 99991 99990 99990 99990 99990 99989 99989 99989 99989 99...
result:
ok The answer is correct.
Test #21:
score: 0
Accepted
time: 7ms
memory: 5360kb
input:
14125 28290
output:
1 1 1 14125 14125 14125 14125 14124 14124 14124 14124 14123 14123 14123 14123 14122 14122 14122 14122 14121 14121 14121 14121 14120 14120 14120 14120 14119 14119 14119 14119 14118 14118 14118 14118 14117 14117 14117 14117 14116 14116 14116 14116 14115 14115 14115 14115 14114 14114 14114 14114 14113 ...
result:
ok The answer is correct.
Test #22:
score: 0
Accepted
time: 472ms
memory: 66092kb
input:
200000 1000000
output:
1 1 1 200000 200000 200000 200000 199999 199999 199999 199999 199998 199998 199998 199998 199997 199997 199997 199997 199996 199996 199996 199996 199995 199995 199995 199995 199994 199994 199994 199994 199993 199993 199993 199993 199992 199992 199992 199992 199991 199991 199991 199991 199990 199990 ...
result:
ok The answer is correct.
Test #23:
score: 0
Accepted
time: 476ms
memory: 66072kb
input:
100000 1000000
output:
1 1 1 100000 100000 100000 100000 99999 99999 99999 99999 99998 99998 99998 99998 99997 99997 99997 99997 99996 99996 99996 99996 99995 99995 99995 99995 99994 99994 99994 99994 99993 99993 99993 99993 99992 99992 99992 99992 99991 99991 99991 99991 99990 99990 99990 99990 99989 99989 99989 99989 99...
result:
ok The answer is correct.
Test #24:
score: 0
Accepted
time: 358ms
memory: 66104kb
input:
1000 1000000
output:
1 1 1 1000 1000 1000 1000 999 999 999 999 998 998 998 998 997 997 997 997 996 996 996 996 995 995 995 995 994 994 994 994 993 993 993 993 992 992 992 992 991 991 991 991 990 990 990 990 989 989 989 989 988 988 988 988 987 987 987 987 986 986 986 986 985 985 985 985 984 984 984 984 983 983 983 983 98...
result:
ok The answer is correct.
Test #25:
score: 0
Accepted
time: 93ms
memory: 21224kb
input:
532 283024
output:
1 1 1 532 532 532 532 531 531 531 531 530 530 530 530 529 529 529 529 528 528 528 528 527 527 527 527 526 526 526 526 525 525 525 525 524 524 524 524 523 523 523 523 522 522 522 522 521 521 521 521 520 520 520 520 519 519 519 519 518 518 518 518 517 517 517 517 516 516 516 516 515 515 515 515 514 51...
result:
ok The answer is correct.
Test #26:
score: 0
Accepted
time: 245ms
memory: 39060kb
input:
121434 568983
output:
1 1 1 121434 121434 121434 121434 121433 121433 121433 121433 121432 121432 121432 121432 121431 121431 121431 121431 121430 121430 121430 121430 121429 121429 121429 121429 121428 121428 121428 121428 121427 121427 121427 121427 121426 121426 121426 121426 121425 121425 121425 121425 121424 121424 ...
result:
ok The answer is correct.
Test #27:
score: 0
Accepted
time: 9ms
memory: 5640kb
input:
11111 32222
output:
1 1 1 11111 11111 11111 11111 11110 11110 11110 11110 11109 11109 11109 11109 11108 11108 11108 11108 11107 11107 11107 11107 11106 11106 11106 11106 11105 11105 11105 11105 11104 11104 11104 11104 11103 11103 11103 11103 11102 11102 11102 11102 11101 11101 11101 11101 11100 11100 11100 11100 11099 ...
result:
ok The answer is correct.
Test #28:
score: 0
Accepted
time: 237ms
memory: 41096kb
input:
200000 600000
output:
1 1 1 200000 200000 200000 200000 199999 199999 199999 199999 199998 199998 199998 199998 199997 199997 199997 199997 199996 199996 199996 199996 199995 199995 199995 199995 199994 199994 199994 199994 199993 199993 199993 199993 199992 199992 199992 199992 199991 199991 199991 199991 199990 199990 ...
result:
ok The answer is correct.
Test #29:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
64 128
output:
1 1 1 64 64 64 64 63 63 63 63 62 62 62 62 61 61 61 61 60 60 60 60 59 59 59 59 58 58 58 58 57 57 57 57 56 56 56 56 55 55 55 55 54 54 54 54 53 53 53 53 52 52 52 52 51 51 51 51 50 50 50 50 49 49 49 49 48 48 48 48 47 47 47 47 46 46 46 46 45 45 45 45 44 44 44 44 43 43 43 43 42 42 42 42 41 41 41 41 40 40 ...
result:
ok The answer is correct.
Test #30:
score: 0
Accepted
time: 3ms
memory: 4184kb
input:
128 8920
output:
1 1 1 128 128 128 128 127 127 127 127 126 126 126 126 125 125 125 125 124 124 124 124 123 123 123 123 122 122 122 122 121 121 121 121 120 120 120 120 119 119 119 119 118 118 118 118 117 117 117 117 116 116 116 116 115 115 115 115 114 114 114 114 113 113 113 113 112 112 112 112 111 111 111 111 110 11...
result:
ok The answer is correct.
Extra Test:
score: 0
Extra Test Passed