QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#89090 | #5255. Greedy Drawers | zhouhuanyi | AC ✓ | 2ms | 3704kb | C++11 | 786b | 2023-03-18 21:10:04 | 2023-03-18 21:10:05 |
Judging History
answer
#include<iostream>
#include<cstdio>
using namespace std;
int read()
{
char c=0;
int sum=0;
while (c<'0'||c>'9') c=getchar();
while ('0'<=c&&c<='9') sum=sum*10+c-'0',c=getchar();
return sum;
}
int n,maxn;
void solve(int l,int r)
{
printf("%d %d\n",n-l+1,r+500);
return;
}
int main()
{
n=read();
if (n&1)
{
maxn=(n-1)>>1;
for (int i=1;i<=n;++i) printf("%d %d\n",n-i+1,i+500);
solve(maxn+1,n-2);
for (int i=1;i<=maxn;++i) solve(1,maxn+1);
for (int i=1;i<=maxn;++i) solve(maxn+2,n);
}
else
{
maxn=(n-2)>>1;
for (int i=1;i<=n;++i) printf("%d %d\n",n-i+1,i+500);
solve(maxn+2,n-2);
for (int i=1;i<=maxn+1;++i) solve(1,maxn+2);
for (int i=1;i<=maxn;++i) solve(maxn+3,n);
}
return 0;
}
详细
Test #1:
score: 100
Accepted
time: 2ms
memory: 3468kb
input:
150
output:
150 501 149 502 148 503 147 504 146 505 145 506 144 507 143 508 142 509 141 510 140 511 139 512 138 513 137 514 136 515 135 516 134 517 133 518 132 519 131 520 130 521 129 522 128 523 127 524 126 525 125 526 124 527 123 528 122 529 121 530 120 531 119 532 118 533 117 534 116 535 115 536 114 537 113 ...
result:
ok you killed Janko's strategy
Test #2:
score: 0
Accepted
time: 2ms
memory: 3408kb
input:
151
output:
151 501 150 502 149 503 148 504 147 505 146 506 145 507 144 508 143 509 142 510 141 511 140 512 139 513 138 514 137 515 136 516 135 517 134 518 133 519 132 520 131 521 130 522 129 523 128 524 127 525 126 526 125 527 124 528 123 529 122 530 121 531 120 532 119 533 118 534 117 535 116 536 115 537 114 ...
result:
ok you killed Janko's strategy
Test #3:
score: 0
Accepted
time: 2ms
memory: 3400kb
input:
152
output:
152 501 151 502 150 503 149 504 148 505 147 506 146 507 145 508 144 509 143 510 142 511 141 512 140 513 139 514 138 515 137 516 136 517 135 518 134 519 133 520 132 521 131 522 130 523 129 524 128 525 127 526 126 527 125 528 124 529 123 530 122 531 121 532 120 533 119 534 118 535 117 536 116 537 115 ...
result:
ok you killed Janko's strategy
Test #4:
score: 0
Accepted
time: 2ms
memory: 3524kb
input:
153
output:
153 501 152 502 151 503 150 504 149 505 148 506 147 507 146 508 145 509 144 510 143 511 142 512 141 513 140 514 139 515 138 516 137 517 136 518 135 519 134 520 133 521 132 522 131 523 130 524 129 525 128 526 127 527 126 528 125 529 124 530 123 531 122 532 121 533 120 534 119 535 118 536 117 537 116 ...
result:
ok you killed Janko's strategy
Test #5:
score: 0
Accepted
time: 1ms
memory: 3516kb
input:
154
output:
154 501 153 502 152 503 151 504 150 505 149 506 148 507 147 508 146 509 145 510 144 511 143 512 142 513 141 514 140 515 139 516 138 517 137 518 136 519 135 520 134 521 133 522 132 523 131 524 130 525 129 526 128 527 127 528 126 529 125 530 124 531 123 532 122 533 121 534 120 535 119 536 118 537 117 ...
result:
ok you killed Janko's strategy
Test #6:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
155
output:
155 501 154 502 153 503 152 504 151 505 150 506 149 507 148 508 147 509 146 510 145 511 144 512 143 513 142 514 141 515 140 516 139 517 138 518 137 519 136 520 135 521 134 522 133 523 132 524 131 525 130 526 129 527 128 528 127 529 126 530 125 531 124 532 123 533 122 534 121 535 120 536 119 537 118 ...
result:
ok you killed Janko's strategy
Test #7:
score: 0
Accepted
time: 0ms
memory: 3516kb
input:
156
output:
156 501 155 502 154 503 153 504 152 505 151 506 150 507 149 508 148 509 147 510 146 511 145 512 144 513 143 514 142 515 141 516 140 517 139 518 138 519 137 520 136 521 135 522 134 523 133 524 132 525 131 526 130 527 129 528 128 529 127 530 126 531 125 532 124 533 123 534 122 535 121 536 120 537 119 ...
result:
ok you killed Janko's strategy
Test #8:
score: 0
Accepted
time: 2ms
memory: 3648kb
input:
157
output:
157 501 156 502 155 503 154 504 153 505 152 506 151 507 150 508 149 509 148 510 147 511 146 512 145 513 144 514 143 515 142 516 141 517 140 518 139 519 138 520 137 521 136 522 135 523 134 524 133 525 132 526 131 527 130 528 129 529 128 530 127 531 126 532 125 533 124 534 123 535 122 536 121 537 120 ...
result:
ok you killed Janko's strategy
Test #9:
score: 0
Accepted
time: 2ms
memory: 3404kb
input:
158
output:
158 501 157 502 156 503 155 504 154 505 153 506 152 507 151 508 150 509 149 510 148 511 147 512 146 513 145 514 144 515 143 516 142 517 141 518 140 519 139 520 138 521 137 522 136 523 135 524 134 525 133 526 132 527 131 528 130 529 129 530 128 531 127 532 126 533 125 534 124 535 123 536 122 537 121 ...
result:
ok you killed Janko's strategy
Test #10:
score: 0
Accepted
time: 2ms
memory: 3532kb
input:
159
output:
159 501 158 502 157 503 156 504 155 505 154 506 153 507 152 508 151 509 150 510 149 511 148 512 147 513 146 514 145 515 144 516 143 517 142 518 141 519 140 520 139 521 138 522 137 523 136 524 135 525 134 526 133 527 132 528 131 529 130 530 129 531 128 532 127 533 126 534 125 535 124 536 123 537 122 ...
result:
ok you killed Janko's strategy
Test #11:
score: 0
Accepted
time: 2ms
memory: 3468kb
input:
160
output:
160 501 159 502 158 503 157 504 156 505 155 506 154 507 153 508 152 509 151 510 150 511 149 512 148 513 147 514 146 515 145 516 144 517 143 518 142 519 141 520 140 521 139 522 138 523 137 524 136 525 135 526 134 527 133 528 132 529 131 530 130 531 129 532 128 533 127 534 126 535 125 536 124 537 123 ...
result:
ok you killed Janko's strategy
Test #12:
score: 0
Accepted
time: 2ms
memory: 3704kb
input:
161
output:
161 501 160 502 159 503 158 504 157 505 156 506 155 507 154 508 153 509 152 510 151 511 150 512 149 513 148 514 147 515 146 516 145 517 144 518 143 519 142 520 141 521 140 522 139 523 138 524 137 525 136 526 135 527 134 528 133 529 132 530 131 531 130 532 129 533 128 534 127 535 126 536 125 537 124 ...
result:
ok you killed Janko's strategy
Test #13:
score: 0
Accepted
time: 2ms
memory: 3436kb
input:
162
output:
162 501 161 502 160 503 159 504 158 505 157 506 156 507 155 508 154 509 153 510 152 511 151 512 150 513 149 514 148 515 147 516 146 517 145 518 144 519 143 520 142 521 141 522 140 523 139 524 138 525 137 526 136 527 135 528 134 529 133 530 132 531 131 532 130 533 129 534 128 535 127 536 126 537 125 ...
result:
ok you killed Janko's strategy
Test #14:
score: 0
Accepted
time: 2ms
memory: 3504kb
input:
163
output:
163 501 162 502 161 503 160 504 159 505 158 506 157 507 156 508 155 509 154 510 153 511 152 512 151 513 150 514 149 515 148 516 147 517 146 518 145 519 144 520 143 521 142 522 141 523 140 524 139 525 138 526 137 527 136 528 135 529 134 530 133 531 132 532 131 533 130 534 129 535 128 536 127 537 126 ...
result:
ok you killed Janko's strategy
Test #15:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
164
output:
164 501 163 502 162 503 161 504 160 505 159 506 158 507 157 508 156 509 155 510 154 511 153 512 152 513 151 514 150 515 149 516 148 517 147 518 146 519 145 520 144 521 143 522 142 523 141 524 140 525 139 526 138 527 137 528 136 529 135 530 134 531 133 532 132 533 131 534 130 535 129 536 128 537 127 ...
result:
ok you killed Janko's strategy
Test #16:
score: 0
Accepted
time: 2ms
memory: 3440kb
input:
165
output:
165 501 164 502 163 503 162 504 161 505 160 506 159 507 158 508 157 509 156 510 155 511 154 512 153 513 152 514 151 515 150 516 149 517 148 518 147 519 146 520 145 521 144 522 143 523 142 524 141 525 140 526 139 527 138 528 137 529 136 530 135 531 134 532 133 533 132 534 131 535 130 536 129 537 128 ...
result:
ok you killed Janko's strategy
Test #17:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
166
output:
166 501 165 502 164 503 163 504 162 505 161 506 160 507 159 508 158 509 157 510 156 511 155 512 154 513 153 514 152 515 151 516 150 517 149 518 148 519 147 520 146 521 145 522 144 523 143 524 142 525 141 526 140 527 139 528 138 529 137 530 136 531 135 532 134 533 133 534 132 535 131 536 130 537 129 ...
result:
ok you killed Janko's strategy
Test #18:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
167
output:
167 501 166 502 165 503 164 504 163 505 162 506 161 507 160 508 159 509 158 510 157 511 156 512 155 513 154 514 153 515 152 516 151 517 150 518 149 519 148 520 147 521 146 522 145 523 144 524 143 525 142 526 141 527 140 528 139 529 138 530 137 531 136 532 135 533 134 534 133 535 132 536 131 537 130 ...
result:
ok you killed Janko's strategy
Test #19:
score: 0
Accepted
time: 2ms
memory: 3484kb
input:
168
output:
168 501 167 502 166 503 165 504 164 505 163 506 162 507 161 508 160 509 159 510 158 511 157 512 156 513 155 514 154 515 153 516 152 517 151 518 150 519 149 520 148 521 147 522 146 523 145 524 144 525 143 526 142 527 141 528 140 529 139 530 138 531 137 532 136 533 135 534 134 535 133 536 132 537 131 ...
result:
ok you killed Janko's strategy
Test #20:
score: 0
Accepted
time: 2ms
memory: 3424kb
input:
250
output:
250 501 249 502 248 503 247 504 246 505 245 506 244 507 243 508 242 509 241 510 240 511 239 512 238 513 237 514 236 515 235 516 234 517 233 518 232 519 231 520 230 521 229 522 228 523 227 524 226 525 225 526 224 527 223 528 222 529 221 530 220 531 219 532 218 533 217 534 216 535 215 536 214 537 213 ...
result:
ok you killed Janko's strategy