QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#190996 | #5255. Greedy Drawers | ucup-team902# | AC ✓ | 1ms | 3716kb | C++17 | 1.1kb | 2023-09-29 16:35:49 | 2023-09-29 16:35:49 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> pos, ans;
int n;
pair<int, int> getans(int x, int y)
{
y--;
return { pos[x].second, pos[y].first };
}
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
for (int i = 0; i < n; ++i) {
pos.push_back({ i+1,500-i });
}
for (int i = 128; i < n; ++i) {
ans.push_back(getans(i, i + 1));
}
for (int i=15; i >=0; --i) {
ans.push_back(getans(8 * i, 8 * i + 4));
ans.push_back(getans(8 * i, 8 * i + 4));
ans.push_back(getans(8 * i, 8 * i + 4));
ans.push_back(getans(8 * i + 3, 8 * i + 5));
ans.push_back(getans(8 * i + 4, 8 * i + 8));
ans.push_back(getans(8 * i + 4, 8 * i + 8));
ans.push_back(getans(8 * i + 4, 8 * i + 8));
ans.push_back(getans(8 * i + 4, 8 * i + 8));
}
for (auto [x, y] : pos)
cout << x << " " << y << endl;
cout << endl;
for (auto [x, y] : ans)
cout << x << " " << y << endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3556kb
input:
150
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #2:
score: 0
Accepted
time: 1ms
memory: 3636kb
input:
151
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #3:
score: 0
Accepted
time: 1ms
memory: 3688kb
input:
152
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #4:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
153
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #5:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
154
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #6:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
155
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #7:
score: 0
Accepted
time: 1ms
memory: 3636kb
input:
156
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #8:
score: 0
Accepted
time: 1ms
memory: 3708kb
input:
157
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #9:
score: 0
Accepted
time: 1ms
memory: 3716kb
input:
158
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #10:
score: 0
Accepted
time: 1ms
memory: 3628kb
input:
159
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #11:
score: 0
Accepted
time: 1ms
memory: 3648kb
input:
160
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #12:
score: 0
Accepted
time: 1ms
memory: 3632kb
input:
161
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #13:
score: 0
Accepted
time: 1ms
memory: 3688kb
input:
162
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #14:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
163
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #15:
score: 0
Accepted
time: 1ms
memory: 3560kb
input:
164
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #16:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
165
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #17:
score: 0
Accepted
time: 1ms
memory: 3580kb
input:
166
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #18:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
167
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #19:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
168
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy
Test #20:
score: 0
Accepted
time: 1ms
memory: 3552kb
input:
250
output:
1 500 2 499 3 498 4 497 5 496 6 495 7 494 8 493 9 492 10 491 11 490 12 489 13 488 14 487 15 486 16 485 17 484 18 483 19 482 20 481 21 480 22 479 23 478 24 477 25 476 26 475 27 474 28 473 29 472 30 471 31 470 32 469 33 468 34 467 35 466 36 465 37 464 38 463 39 462 40 461 41 460 42 459 43 458 44 457 4...
result:
ok you killed Janko's strategy