QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#202960 | #5255. Greedy Drawers | ucup-team288# | AC ✓ | 0ms | 3700kb | C++20 | 1.3kb | 2023-10-06 14:21:30 | 2023-10-06 14:21:31 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using ll = long long;
#define pb emplace_back
#define X first
#define Y second
#define AI(i) begin(i), end(i)
template<class T> bool chmax(T &a, T b) { return a < b && (a = b, true);}
template<class T> bool chmin(T &a, T b) { return b < a && (a = b, true);}
#ifdef KEV
#define DE(args...) kout("[ " + string(#args) + " ] = ", args)
void kout() { cerr << endl; }
template<class T, class ...U> void kout(T a, U ...b) { cerr << a << ' ', kout(b...); }
template<class T> void debug(T l, T r) { while (l != r) cerr << *l++ << " \n"[l==r]; }
#else
#define DE(...) 0
#define debug(...) 0
#endif
const int MAX_N = 300010;
int main() {
ios_base::sync_with_stdio(0), cin.tie(0);
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cout << i << ' ' << n + n - i << '\n';
}
cout << '\n';
auto cover = [&](int l, int r) {
cout << r << ' ' << n + n - l << '\n';
};
int i = 0;
while (i < n) {
if (i + 8 <= n) {
for (int rep = 0; rep < 3; rep++) {
cover(i + 1, i + 3);
cover(i + 5, i + 8);
}
cover(i + 3, i + 4);
cover(i + 4, i + 6);
} else {
for (int rep = 0; rep < n - i; rep++) {
cover(i + 1 + rep, i + 1 + rep);
}
}
i += 8;
}
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3568kb
input:
150
output:
1 299 2 298 3 297 4 296 5 295 6 294 7 293 8 292 9 291 10 290 11 289 12 288 13 287 14 286 15 285 16 284 17 283 18 282 19 281 20 280 21 279 22 278 23 277 24 276 25 275 26 274 27 273 28 272 29 271 30 270 31 269 32 268 33 267 34 266 35 265 36 264 37 263 38 262 39 261 40 260 41 259 42 258 43 257 44 256 4...
result:
ok you killed Janko's strategy
Test #2:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
151
output:
1 301 2 300 3 299 4 298 5 297 6 296 7 295 8 294 9 293 10 292 11 291 12 290 13 289 14 288 15 287 16 286 17 285 18 284 19 283 20 282 21 281 22 280 23 279 24 278 25 277 26 276 27 275 28 274 29 273 30 272 31 271 32 270 33 269 34 268 35 267 36 266 37 265 38 264 39 263 40 262 41 261 42 260 43 259 44 258 4...
result:
ok you killed Janko's strategy
Test #3:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
152
output:
1 303 2 302 3 301 4 300 5 299 6 298 7 297 8 296 9 295 10 294 11 293 12 292 13 291 14 290 15 289 16 288 17 287 18 286 19 285 20 284 21 283 22 282 23 281 24 280 25 279 26 278 27 277 28 276 29 275 30 274 31 273 32 272 33 271 34 270 35 269 36 268 37 267 38 266 39 265 40 264 41 263 42 262 43 261 44 260 4...
result:
ok you killed Janko's strategy
Test #4:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
153
output:
1 305 2 304 3 303 4 302 5 301 6 300 7 299 8 298 9 297 10 296 11 295 12 294 13 293 14 292 15 291 16 290 17 289 18 288 19 287 20 286 21 285 22 284 23 283 24 282 25 281 26 280 27 279 28 278 29 277 30 276 31 275 32 274 33 273 34 272 35 271 36 270 37 269 38 268 39 267 40 266 41 265 42 264 43 263 44 262 4...
result:
ok you killed Janko's strategy
Test #5:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
154
output:
1 307 2 306 3 305 4 304 5 303 6 302 7 301 8 300 9 299 10 298 11 297 12 296 13 295 14 294 15 293 16 292 17 291 18 290 19 289 20 288 21 287 22 286 23 285 24 284 25 283 26 282 27 281 28 280 29 279 30 278 31 277 32 276 33 275 34 274 35 273 36 272 37 271 38 270 39 269 40 268 41 267 42 266 43 265 44 264 4...
result:
ok you killed Janko's strategy
Test #6:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
155
output:
1 309 2 308 3 307 4 306 5 305 6 304 7 303 8 302 9 301 10 300 11 299 12 298 13 297 14 296 15 295 16 294 17 293 18 292 19 291 20 290 21 289 22 288 23 287 24 286 25 285 26 284 27 283 28 282 29 281 30 280 31 279 32 278 33 277 34 276 35 275 36 274 37 273 38 272 39 271 40 270 41 269 42 268 43 267 44 266 4...
result:
ok you killed Janko's strategy
Test #7:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
156
output:
1 311 2 310 3 309 4 308 5 307 6 306 7 305 8 304 9 303 10 302 11 301 12 300 13 299 14 298 15 297 16 296 17 295 18 294 19 293 20 292 21 291 22 290 23 289 24 288 25 287 26 286 27 285 28 284 29 283 30 282 31 281 32 280 33 279 34 278 35 277 36 276 37 275 38 274 39 273 40 272 41 271 42 270 43 269 44 268 4...
result:
ok you killed Janko's strategy
Test #8:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
157
output:
1 313 2 312 3 311 4 310 5 309 6 308 7 307 8 306 9 305 10 304 11 303 12 302 13 301 14 300 15 299 16 298 17 297 18 296 19 295 20 294 21 293 22 292 23 291 24 290 25 289 26 288 27 287 28 286 29 285 30 284 31 283 32 282 33 281 34 280 35 279 36 278 37 277 38 276 39 275 40 274 41 273 42 272 43 271 44 270 4...
result:
ok you killed Janko's strategy
Test #9:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
158
output:
1 315 2 314 3 313 4 312 5 311 6 310 7 309 8 308 9 307 10 306 11 305 12 304 13 303 14 302 15 301 16 300 17 299 18 298 19 297 20 296 21 295 22 294 23 293 24 292 25 291 26 290 27 289 28 288 29 287 30 286 31 285 32 284 33 283 34 282 35 281 36 280 37 279 38 278 39 277 40 276 41 275 42 274 43 273 44 272 4...
result:
ok you killed Janko's strategy
Test #10:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
159
output:
1 317 2 316 3 315 4 314 5 313 6 312 7 311 8 310 9 309 10 308 11 307 12 306 13 305 14 304 15 303 16 302 17 301 18 300 19 299 20 298 21 297 22 296 23 295 24 294 25 293 26 292 27 291 28 290 29 289 30 288 31 287 32 286 33 285 34 284 35 283 36 282 37 281 38 280 39 279 40 278 41 277 42 276 43 275 44 274 4...
result:
ok you killed Janko's strategy
Test #11:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
160
output:
1 319 2 318 3 317 4 316 5 315 6 314 7 313 8 312 9 311 10 310 11 309 12 308 13 307 14 306 15 305 16 304 17 303 18 302 19 301 20 300 21 299 22 298 23 297 24 296 25 295 26 294 27 293 28 292 29 291 30 290 31 289 32 288 33 287 34 286 35 285 36 284 37 283 38 282 39 281 40 280 41 279 42 278 43 277 44 276 4...
result:
ok you killed Janko's strategy
Test #12:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
161
output:
1 321 2 320 3 319 4 318 5 317 6 316 7 315 8 314 9 313 10 312 11 311 12 310 13 309 14 308 15 307 16 306 17 305 18 304 19 303 20 302 21 301 22 300 23 299 24 298 25 297 26 296 27 295 28 294 29 293 30 292 31 291 32 290 33 289 34 288 35 287 36 286 37 285 38 284 39 283 40 282 41 281 42 280 43 279 44 278 4...
result:
ok you killed Janko's strategy
Test #13:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
162
output:
1 323 2 322 3 321 4 320 5 319 6 318 7 317 8 316 9 315 10 314 11 313 12 312 13 311 14 310 15 309 16 308 17 307 18 306 19 305 20 304 21 303 22 302 23 301 24 300 25 299 26 298 27 297 28 296 29 295 30 294 31 293 32 292 33 291 34 290 35 289 36 288 37 287 38 286 39 285 40 284 41 283 42 282 43 281 44 280 4...
result:
ok you killed Janko's strategy
Test #14:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
163
output:
1 325 2 324 3 323 4 322 5 321 6 320 7 319 8 318 9 317 10 316 11 315 12 314 13 313 14 312 15 311 16 310 17 309 18 308 19 307 20 306 21 305 22 304 23 303 24 302 25 301 26 300 27 299 28 298 29 297 30 296 31 295 32 294 33 293 34 292 35 291 36 290 37 289 38 288 39 287 40 286 41 285 42 284 43 283 44 282 4...
result:
ok you killed Janko's strategy
Test #15:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
164
output:
1 327 2 326 3 325 4 324 5 323 6 322 7 321 8 320 9 319 10 318 11 317 12 316 13 315 14 314 15 313 16 312 17 311 18 310 19 309 20 308 21 307 22 306 23 305 24 304 25 303 26 302 27 301 28 300 29 299 30 298 31 297 32 296 33 295 34 294 35 293 36 292 37 291 38 290 39 289 40 288 41 287 42 286 43 285 44 284 4...
result:
ok you killed Janko's strategy
Test #16:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
165
output:
1 329 2 328 3 327 4 326 5 325 6 324 7 323 8 322 9 321 10 320 11 319 12 318 13 317 14 316 15 315 16 314 17 313 18 312 19 311 20 310 21 309 22 308 23 307 24 306 25 305 26 304 27 303 28 302 29 301 30 300 31 299 32 298 33 297 34 296 35 295 36 294 37 293 38 292 39 291 40 290 41 289 42 288 43 287 44 286 4...
result:
ok you killed Janko's strategy
Test #17:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
166
output:
1 331 2 330 3 329 4 328 5 327 6 326 7 325 8 324 9 323 10 322 11 321 12 320 13 319 14 318 15 317 16 316 17 315 18 314 19 313 20 312 21 311 22 310 23 309 24 308 25 307 26 306 27 305 28 304 29 303 30 302 31 301 32 300 33 299 34 298 35 297 36 296 37 295 38 294 39 293 40 292 41 291 42 290 43 289 44 288 4...
result:
ok you killed Janko's strategy
Test #18:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
167
output:
1 333 2 332 3 331 4 330 5 329 6 328 7 327 8 326 9 325 10 324 11 323 12 322 13 321 14 320 15 319 16 318 17 317 18 316 19 315 20 314 21 313 22 312 23 311 24 310 25 309 26 308 27 307 28 306 29 305 30 304 31 303 32 302 33 301 34 300 35 299 36 298 37 297 38 296 39 295 40 294 41 293 42 292 43 291 44 290 4...
result:
ok you killed Janko's strategy
Test #19:
score: 0
Accepted
time: 0ms
memory: 3620kb
input:
168
output:
1 335 2 334 3 333 4 332 5 331 6 330 7 329 8 328 9 327 10 326 11 325 12 324 13 323 14 322 15 321 16 320 17 319 18 318 19 317 20 316 21 315 22 314 23 313 24 312 25 311 26 310 27 309 28 308 29 307 30 306 31 305 32 304 33 303 34 302 35 301 36 300 37 299 38 298 39 297 40 296 41 295 42 294 43 293 44 292 4...
result:
ok you killed Janko's strategy
Test #20:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
250
output:
1 499 2 498 3 497 4 496 5 495 6 494 7 493 8 492 9 491 10 490 11 489 12 488 13 487 14 486 15 485 16 484 17 483 18 482 19 481 20 480 21 479 22 478 23 477 24 476 25 475 26 474 27 473 28 472 29 471 30 470 31 469 32 468 33 467 34 466 35 465 36 464 37 463 38 462 39 461 40 460 41 459 42 458 43 457 44 456 4...
result:
ok you killed Janko's strategy