QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#374563 | #7868. 天空度假山庄 | NATURAL6 | 25 | 44ms | 3856kb | C++17 | 639b | 2024-04-02 15:11:39 | 2024-04-02 15:11:40 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
inline int qread()
{
int a=0,f=1;char ch=getchar();
while(!isdigit(ch)){if(ch=='-')f=-1;ch=getchar();}
while(isdigit(ch)){(a*=10)+=(ch^48);ch=getchar();}
return a*f;
}
int n,k,p=0;
inline void mov(int x)
{
p=(p+x+n)%n;
printf("%d ",p+1);
return ;
}
inline void solve(int k)
{
++k;
while(k>5)k-=4,mov(k+1),mov(k+4),mov(-k-2),mov(-k-3);
if(k==2)mov(1);
if(k==3)mov(2),mov(-1);
if(k==4)mov(4),mov(-1),mov(-2);
if(k==5)mov(1),mov(4),mov(-2),mov(-3);
return ;
}
int main()
{
n=qread(),k=qread();
for(int i=1;i<n;++i)solve(k);
puts("");
return 0;
}
详细
Subtask #1:
score: 5
Accepted
Test #1:
score: 5
Accepted
time: 1ms
memory: 3824kb
input:
8216 1
output:
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 10...
result:
ok correct
Test #2:
score: 0
Accepted
time: 1ms
memory: 3840kb
input:
5166 2
output:
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 55 ...
result:
ok correct
Test #3:
score: 0
Accepted
time: 1ms
memory: 3792kb
input:
7445 2
output:
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 55 ...
result:
ok correct
Test #4:
score: 0
Accepted
time: 1ms
memory: 3744kb
input:
1295 2
output:
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 55 ...
result:
ok correct
Subtask #2:
score: 0
Wrong Answer
Test #5:
score: 20
Accepted
time: 44ms
memory: 3856kb
input:
86132 9
output:
8 18 10 1 4 10 6 1 2 9 19 11 2 5 11 7 2 3 10 20 12 3 6 12 8 3 4 11 21 13 4 7 13 9 4 5 12 22 14 5 8 14 10 5 6 13 23 15 6 9 15 11 6 7 14 24 16 7 10 16 12 7 8 15 25 17 8 11 17 13 8 9 16 26 18 9 12 18 14 9 10 17 27 19 10 13 19 15 10 11 18 28 20 11 14 20 16 11 12 19 29 21 12 15 21 17 12 13 20 30 22 13 16...
result:
ok correct
Test #6:
score: 0
Accepted
time: 35ms
memory: 3720kb
input:
73452 11
output:
10 22 12 1 6 14 8 1 5 4 2 11 23 13 2 7 15 9 2 6 5 3 12 24 14 3 8 16 10 3 7 6 4 13 25 15 4 9 17 11 4 8 7 5 14 26 16 5 10 18 12 5 9 8 6 15 27 17 6 11 19 13 6 10 9 7 16 28 18 7 12 20 14 7 11 10 8 17 29 19 8 13 21 15 8 12 11 9 18 30 20 9 14 22 16 9 13 12 10 19 31 21 10 15 23 17 10 14 13 11 20 32 22 11 1...
result:
ok correct
Test #7:
score: -20
Wrong Answer
time: 16ms
memory: 3784kb
input:
23283 20
output:
19 40 21 1 15 32 17 1 11 24 13 1 7 16 9 1 2 6 4 1 19 40 21 1 15 32 17 1 11 24 13 1 7 16 9 1 2 6 4 1 19 40 21 1 15 32 17 1 11 24 13 1 7 16 9 1 2 6 4 1 19 40 21 1 15 32 17 1 11 24 13 1 7 16 9 1 2 6 4 1 19 40 21 1 15 32 17 1 11 24 13 1 7 16 9 1 2 6 4 1 19 40 21 1 15 32 17 1 11 24 13 1 7 16 9 1 2 6 4 1 ...
result:
wrong answer visit same point several times.
Subtask #3:
score: 0
Skipped
Dependency #2:
0%
Subtask #4:
score: 20
Accepted
Test #16:
score: 20
Accepted
time: 18ms
memory: 3744kb
input:
1777 229
output:
228 458 230 1 224 450 226 1 220 442 222 1 216 434 218 1 212 426 214 1 208 418 210 1 204 410 206 1 200 402 202 1 196 394 198 1 192 386 194 1 188 378 190 1 184 370 186 1 180 362 182 1 176 354 178 1 172 346 174 1 168 338 170 1 164 330 166 1 160 322 162 1 156 314 158 1 152 306 154 1 148 298 150 1 144 29...
result:
ok correct
Test #17:
score: 0
Accepted
time: 11ms
memory: 3720kb
input:
1129 229
output:
228 458 230 1 224 450 226 1 220 442 222 1 216 434 218 1 212 426 214 1 208 418 210 1 204 410 206 1 200 402 202 1 196 394 198 1 192 386 194 1 188 378 190 1 184 370 186 1 180 362 182 1 176 354 178 1 172 346 174 1 168 338 170 1 164 330 166 1 160 322 162 1 156 314 158 1 152 306 154 1 148 298 150 1 144 29...
result:
ok correct
Test #18:
score: 0
Accepted
time: 36ms
memory: 3724kb
input:
4253 233
output:
232 466 234 1 228 458 230 1 224 450 226 1 220 442 222 1 216 434 218 1 212 426 214 1 208 418 210 1 204 410 206 1 200 402 202 1 196 394 198 1 192 386 194 1 188 378 190 1 184 370 186 1 180 362 182 1 176 354 178 1 172 346 174 1 168 338 170 1 164 330 166 1 160 322 162 1 156 314 158 1 152 306 154 1 148 29...
result:
ok correct
Test #19:
score: 0
Accepted
time: 19ms
memory: 3824kb
input:
2311 233
output:
232 466 234 1 228 458 230 1 224 450 226 1 220 442 222 1 216 434 218 1 212 426 214 1 208 418 210 1 204 410 206 1 200 402 202 1 196 394 198 1 192 386 194 1 188 378 190 1 184 370 186 1 180 362 182 1 176 354 178 1 172 346 174 1 168 338 170 1 164 330 166 1 160 322 162 1 156 314 158 1 152 306 154 1 148 29...
result:
ok correct
Test #20:
score: 0
Accepted
time: 30ms
memory: 3832kb
input:
6712 114
output:
113 228 115 1 109 220 111 1 105 212 107 1 101 204 103 1 97 196 99 1 93 188 95 1 89 180 91 1 85 172 87 1 81 164 83 1 77 156 79 1 73 148 75 1 69 140 71 1 65 132 67 1 61 124 63 1 57 116 59 1 53 108 55 1 49 100 51 1 45 92 47 1 41 84 43 1 37 76 39 1 33 68 35 1 29 60 31 1 25 52 27 1 21 44 23 1 17 36 19 1 ...
result:
ok correct
Test #21:
score: 0
Accepted
time: 6ms
memory: 3824kb
input:
1050 114
output:
113 228 115 1 109 220 111 1 105 212 107 1 101 204 103 1 97 196 99 1 93 188 95 1 89 180 91 1 85 172 87 1 81 164 83 1 77 156 79 1 73 148 75 1 69 140 71 1 65 132 67 1 61 124 63 1 57 116 59 1 53 108 55 1 49 100 51 1 45 92 47 1 41 84 43 1 37 76 39 1 33 68 35 1 29 60 31 1 25 52 27 1 21 44 23 1 17 36 19 1 ...
result:
ok correct
Test #22:
score: 0
Accepted
time: 26ms
memory: 3820kb
input:
1132 514
output:
513 1028 515 1 509 1020 511 1 505 1012 507 1 501 1004 503 1 497 996 499 1 493 988 495 1 489 980 491 1 485 972 487 1 481 964 483 1 477 956 479 1 473 948 475 1 469 940 471 1 465 932 467 1 461 924 463 1 457 916 459 1 453 908 455 1 449 900 451 1 445 892 447 1 441 884 443 1 437 876 439 1 433 868 435 1 42...
result:
ok correct
Test #23:
score: 0
Accepted
time: 25ms
memory: 3724kb
input:
1130 514
output:
513 1028 515 1 509 1020 511 1 505 1012 507 1 501 1004 503 1 497 996 499 1 493 988 495 1 489 980 491 1 485 972 487 1 481 964 483 1 477 956 479 1 473 948 475 1 469 940 471 1 465 932 467 1 461 924 463 1 457 916 459 1 453 908 455 1 449 900 451 1 445 892 447 1 441 884 443 1 437 876 439 1 433 868 435 1 42...
result:
ok correct
Subtask #5:
score: 0
Skipped
Dependency #1:
100%
Accepted
Dependency #3:
0%