QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#226732 | #5154. ETA | Fyind# | AC ✓ | 9ms | 31028kb | C++23 | 2.6kb | 2023-10-26 14:57:22 | 2023-10-26 14:57:22 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define _ <<" "<<
#define sz(x) ((int) (x).size())
typedef pair<int, int> pii;
typedef long long ll;
const int maxn = 1e6 + 5;
int n, m;
vector<int> G[maxn];
int id[maxn];
void addedge(int a,int b) {
G[a].push_back(b);
G[b].push_back(a);
}
vector<pii> ans;
void dfs(int x,int fa) {
for (auto v : G[x]) if (v != fa) {
dfs(v, x);
ans.push_back({v, x});
}
}
int sum = 0;
void varify(int x,int fa,int dep) {
sum += dep;
for (auto v : G[x]) if (v != fa) {
varify(v, x, dep+1);
}
}
void solve(int a,int b) {
if (a < b-1) {
cout << "impossible\n";
return;
}
int t,n;
int ok = 0;
for (int p = 1;p <= 1000000; ++p) if (p*b <= 1000000) {
ll cur = (ll)(b*p-1)*b*p/2;
if (a*p >= b*p - 1 && a*p <= cur) {
n = b*p;
t = a*p;
ok = 1;
break;
}
}
assert(ok == 1);
for (int i = 1;i <= n; ++i) G[i].clear();
memset(id,0,sizeof(id));
ans.clear();
int tar = t;
int k = n;
int maxdep = 0;
id[0] = n; k--;
int mx = n;
// cout << "Tar" _ t _ k << endl;
while (k <= t-maxdep) {
addedge(k,mx); mx = k;
id[++maxdep] = k;
k--;
t -= maxdep;
}
// cout << "Tar" _ t _ k << endl;
for (int i = 1;i < k; ++i) {
addedge(n, i);
t--;
}
// cout << "Tar" _ t _ k << endl;
addedge(id[t-1], k);
dfs(n,0);
cout << n _ n-1 << '\n';
for (auto [a,b] : ans) {
if (a == n) a = 1;
else if (a == 1) a = n;
if (b == n) b = 1;
else if (b == 1) b = n;
cout << a _ b << '\n';
}
for (int i = 1;i <= n; ++i) G[i].clear();
for (auto [x,y] : ans) {
addedge(x,y);
}
sum = 0;
varify(n,0,0);
// cout << sum _ tar << endl;
assert(sum == tar);
assert(tar*b == a*n);
assert(n <= 1000000 && sz(ans) <= 1000000);
assert(sz(ans) == n-1);
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int a; cin >> a;
char c; cin >> c;
int b; cin >> b;
solve(a,b);
// for (int a = 1000;a >= 1; --a) {
// for (int b = 1000;b >= 1; --b) {
// cout << a _ b << endl;
// solve(a,b);
// }
// }
// for (int a = 1;a <= 1000; ++a) {
// for (int b = 1;b <= 1000; ++b) {
// cout << a _ b << endl;
// solve(a,b);
// }
// }
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 4ms
memory: 30820kb
input:
1/2
output:
2 1 2 1
result:
ok
Test #2:
score: 0
Accepted
time: 0ms
memory: 28260kb
input:
1/3
output:
impossible
result:
ok
Test #3:
score: 0
Accepted
time: 4ms
memory: 30780kb
input:
7/4
output:
8 7 4 5 5 6 6 7 3 7 7 1 8 1 2 1
result:
ok
Test #4:
score: 0
Accepted
time: 0ms
memory: 30988kb
input:
974/975
output:
975 974 974 1 975 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #5:
score: 0
Accepted
time: 4ms
memory: 30804kb
input:
943/346
output:
346 345 311 312 312 313 313 314 314 315 315 316 316 317 317 318 318 319 319 320 320 321 321 322 322 323 323 324 324 325 325 326 326 327 327 328 328 329 329 330 330 331 331 332 332 333 333 334 334 335 335 336 336 337 337 338 338 339 339 340 340 341 341 342 342 343 310 343 343 344 344 345 345 1 346 1 ...
result:
ok
Test #6:
score: 0
Accepted
time: 0ms
memory: 30796kb
input:
912/7
output:
266 265 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 ...
result:
ok
Test #7:
score: 0
Accepted
time: 4ms
memory: 30724kb
input:
1/1
output:
3 2 3 2 2 1
result:
ok
Test #8:
score: 0
Accepted
time: 0ms
memory: 28412kb
input:
1/1000
output:
impossible
result:
ok
Test #9:
score: 0
Accepted
time: 4ms
memory: 30992kb
input:
1000/999
output:
999 998 997 998 996 998 998 1 999 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56...
result:
ok
Test #10:
score: 0
Accepted
time: 0ms
memory: 30836kb
input:
999/1000
output:
1000 999 999 1 1000 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 5...
result:
ok
Test #11:
score: 0
Accepted
time: 6ms
memory: 30888kb
input:
1000/1
output:
2001 2000 2001 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 5...
result:
ok
Test #12:
score: 0
Accepted
time: 4ms
memory: 31028kb
input:
999/2
output:
1000 999 1000 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52...
result:
ok
Test #13:
score: 0
Accepted
time: 6ms
memory: 30824kb
input:
1000/3
output:
669 668 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 5...
result:
ok
Test #14:
score: 0
Accepted
time: 4ms
memory: 30948kb
input:
26/3
output:
21 20 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 2 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 1 21 1
result:
ok
Test #15:
score: 0
Accepted
time: 3ms
memory: 30936kb
input:
79/9
output:
27 26 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 5 26 26 1 27 1 2 1 3 1 4 1
result:
ok
Test #16:
score: 0
Accepted
time: 0ms
memory: 30948kb
input:
80/9
output:
27 26 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 5 23 23 24 24 25 25 26 26 1 27 1 2 1 3 1 4 1
result:
ok
Test #17:
score: 0
Accepted
time: 4ms
memory: 30992kb
input:
998/999
output:
999 998 998 1 999 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #18:
score: 0
Accepted
time: 0ms
memory: 27972kb
input:
997/999
output:
impossible
result:
ok
Test #19:
score: 0
Accepted
time: 0ms
memory: 27984kb
input:
997/1000
output:
impossible
result:
ok
Test #20:
score: 0
Accepted
time: 5ms
memory: 27920kb
input:
99/200
output:
impossible
result:
ok
Test #21:
score: 0
Accepted
time: 0ms
memory: 28304kb
input:
101/200
output:
impossible
result:
ok
Test #22:
score: 0
Accepted
time: 3ms
memory: 27484kb
input:
99/199
output:
impossible
result:
ok
Test #23:
score: 0
Accepted
time: 6ms
memory: 30948kb
input:
2/1
output:
5 4 5 2 2 3 3 4 4 1
result:
ok
Test #24:
score: 0
Accepted
time: 4ms
memory: 30824kb
input:
200/99
output:
99 98 85 86 86 87 87 88 84 88 88 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 1 99 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 ...
result:
ok
Test #25:
score: 0
Accepted
time: 4ms
memory: 30788kb
input:
200/101
output:
101 100 87 88 88 89 89 90 90 91 91 92 86 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 100 100 1 101 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 ...
result:
ok
Test #26:
score: 0
Accepted
time: 4ms
memory: 30904kb
input:
199/100
output:
100 99 86 87 87 88 88 89 89 90 90 91 85 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 1 100 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 4...
result:
ok
Test #27:
score: 0
Accepted
time: 2ms
memory: 30724kb
input:
201/100
output:
100 99 86 87 87 88 88 89 85 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 1 100 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 4...
result:
ok
Test #28:
score: 0
Accepted
time: 0ms
memory: 30744kb
input:
999/500
output:
500 499 468 469 469 470 470 471 471 472 472 473 473 474 474 475 475 476 476 477 477 478 478 479 479 480 480 481 481 482 482 483 483 484 484 485 485 486 486 487 487 488 488 489 489 490 490 491 491 492 492 493 493 494 494 495 495 496 467 496 496 497 497 498 498 499 499 1 500 1 2 1 3 1 4 1 5 1 6 1 7 1 ...
result:
ok
Test #29:
score: 0
Accepted
time: 4ms
memory: 30912kb
input:
333/167
output:
167 166 149 150 150 151 151 152 152 153 148 153 153 154 154 155 155 156 156 157 157 158 158 159 159 160 160 161 161 162 162 163 163 164 164 165 165 166 166 1 167 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1...
result:
ok
Test #30:
score: 0
Accepted
time: 0ms
memory: 30776kb
input:
3/1
output:
7 6 7 2 2 3 3 4 4 5 5 6 6 1
result:
ok
Test #31:
score: 0
Accepted
time: 5ms
memory: 30732kb
input:
301/100
output:
100 99 80 81 81 82 82 83 83 84 84 85 85 86 86 87 87 88 79 88 88 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 1 100 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 ...
result:
ok
Test #32:
score: 0
Accepted
time: 4ms
memory: 30788kb
input:
299/100
output:
100 99 80 81 81 82 82 83 83 84 84 85 85 86 86 87 87 88 88 89 89 90 79 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 1 100 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 ...
result:
ok
Test #33:
score: 0
Accepted
time: 0ms
memory: 30796kb
input:
1000/333
output:
333 332 296 297 297 298 298 299 299 300 300 301 301 302 302 303 303 304 304 305 305 306 306 307 307 308 308 309 309 310 310 311 311 312 312 313 313 314 314 315 315 316 316 317 317 318 318 319 319 320 320 321 321 322 322 323 323 324 324 325 325 326 326 327 327 328 328 329 329 330 330 331 295 331 331 ...
result:
ok
Test #34:
score: 0
Accepted
time: 8ms
memory: 30788kb
input:
500/167
output:
167 166 141 142 142 143 143 144 144 145 145 146 146 147 147 148 148 149 149 150 150 151 151 152 152 153 153 154 154 155 155 156 156 157 157 158 140 158 158 159 159 160 160 161 161 162 162 163 163 164 164 165 165 166 166 1 167 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 ...
result:
ok
Test #35:
score: 0
Accepted
time: 4ms
memory: 30896kb
input:
14/5
output:
10 9 4 5 5 6 3 6 6 7 7 8 8 9 9 1 10 1 2 1
result:
ok
Test #36:
score: 0
Accepted
time: 2ms
memory: 30768kb
input:
16/5
output:
10 9 3 4 4 5 5 6 6 7 7 8 2 8 8 9 9 1 10 1
result:
ok
Test #37:
score: 0
Accepted
time: 3ms
memory: 30768kb
input:
15/4
output:
12 11 4 5 5 6 3 6 6 7 7 8 8 9 9 10 10 11 11 1 12 1 2 1
result:
ok
Test #38:
score: 0
Accepted
time: 4ms
memory: 30896kb
input:
5/2
output:
6 5 6 2 2 3 3 4 4 5 5 1
result:
ok
Test #39:
score: 0
Accepted
time: 0ms
memory: 30760kb
input:
409/19
output:
57 56 9 10 10 11 11 12 12 13 13 14 8 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 1 57 ...
result:
ok
Test #40:
score: 0
Accepted
time: 2ms
memory: 30744kb
input:
818/39
output:
78 77 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 21 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 ...
result:
ok
Test #41:
score: 0
Accepted
time: 4ms
memory: 30720kb
input:
409/20
output:
60 59 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 11 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 1 6...
result:
ok
Test #42:
score: 0
Accepted
time: 0ms
memory: 30780kb
input:
818/41
output:
41 40 2 3 3 4 41 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 1
result:
ok
Test #43:
score: 0
Accepted
time: 2ms
memory: 30684kb
input:
819/38
output:
76 75 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 19 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 ...
result:
ok
Test #44:
score: 0
Accepted
time: 4ms
memory: 30940kb
input:
21/1
output:
43 42 43 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 1
result:
ok
Test #45:
score: 0
Accepted
time: 0ms
memory: 30792kb
input:
819/40
output:
80 79 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 23 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 ...
result:
ok
Test #46:
score: 0
Accepted
time: 4ms
memory: 30900kb
input:
819/41
output:
41 40 2 3 41 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 1
result:
ok
Test #47:
score: 0
Accepted
time: 7ms
memory: 30780kb
input:
410/19
output:
57 56 9 10 10 11 8 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 1 57 ...
result:
ok
Test #48:
score: 0
Accepted
time: 4ms
memory: 30784kb
input:
820/39
output:
78 77 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 21 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 ...
result:
ok
Test #49:
score: 0
Accepted
time: 4ms
memory: 30764kb
input:
41/2
output:
42 41 42 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 1
result:
ok
Test #50:
score: 0
Accepted
time: 8ms
memory: 30728kb
input:
20/1
output:
41 40 41 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 1
result:
ok
Test #51:
score: 0
Accepted
time: 4ms
memory: 30768kb
input:
821/38
output:
76 75 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 19 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 ...
result:
ok
Test #52:
score: 0
Accepted
time: 5ms
memory: 30788kb
input:
821/39
output:
78 77 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 21 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 ...
result:
ok
Test #53:
score: 0
Accepted
time: 0ms
memory: 30724kb
input:
821/40
output:
80 79 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 23 57 57 58 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 ...
result:
ok
Test #54:
score: 0
Accepted
time: 0ms
memory: 30792kb
input:
821/41
output:
82 81 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54 54 55 55 56 56 57 57 58 58 59 59 60 60 61 25 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 73 74 ...
result:
ok
Test #55:
score: 0
Accepted
time: 9ms
memory: 31020kb
input:
512/1
output:
1025 1024 1025 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 5...
result:
ok
Test #56:
score: 0
Accepted
time: 0ms
memory: 31012kb
input:
729/1
output:
1459 1458 1459 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 5...
result:
ok
Test #57:
score: 0
Accepted
time: 0ms
memory: 30840kb
input:
625/1
output:
1251 1250 1251 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 5...
result:
ok
Test #58:
score: 0
Accepted
time: 3ms
memory: 27452kb
input:
127/626
output:
impossible
result:
ok
Test #59:
score: 0
Accepted
time: 3ms
memory: 27712kb
input:
429/838
output:
impossible
result:
ok
Test #60:
score: 0
Accepted
time: 3ms
memory: 28132kb
input:
563/710
output:
impossible
result:
ok
Test #61:
score: 0
Accepted
time: 4ms
memory: 27628kb
input:
40/207
output:
impossible
result:
ok
Test #62:
score: 0
Accepted
time: 0ms
memory: 28612kb
input:
145/298
output:
impossible
result:
ok
Test #63:
score: 0
Accepted
time: 7ms
memory: 28116kb
input:
109/286
output:
impossible
result:
ok
Test #64:
score: 0
Accepted
time: 0ms
memory: 27496kb
input:
219/305
output:
impossible
result:
ok
Test #65:
score: 0
Accepted
time: 3ms
memory: 27960kb
input:
11/258
output:
impossible
result:
ok
Test #66:
score: 0
Accepted
time: 3ms
memory: 27460kb
input:
59/105
output:
impossible
result:
ok
Test #67:
score: 0
Accepted
time: 3ms
memory: 28772kb
input:
59/660
output:
impossible
result:
ok
Test #68:
score: 0
Accepted
time: 0ms
memory: 30784kb
input:
209/210
output:
210 209 209 1 210 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #69:
score: 0
Accepted
time: 4ms
memory: 30800kb
input:
484/485
output:
485 484 484 1 485 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #70:
score: 0
Accepted
time: 4ms
memory: 30912kb
input:
178/179
output:
179 178 178 1 179 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #71:
score: 0
Accepted
time: 4ms
memory: 30780kb
input:
947/948
output:
948 947 947 1 948 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #72:
score: 0
Accepted
time: 3ms
memory: 30768kb
input:
635/636
output:
636 635 635 1 636 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #73:
score: 0
Accepted
time: 0ms
memory: 30780kb
input:
11/12
output:
12 11 11 1 12 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1
result:
ok
Test #74:
score: 0
Accepted
time: 4ms
memory: 30804kb
input:
451/452
output:
452 451 451 1 452 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #75:
score: 0
Accepted
time: 0ms
memory: 30792kb
input:
144/145
output:
145 144 144 1 145 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #76:
score: 0
Accepted
time: 5ms
memory: 30712kb
input:
478/479
output:
479 478 478 1 479 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #77:
score: 0
Accepted
time: 4ms
memory: 30820kb
input:
603/604
output:
604 603 603 1 604 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 34 1 35 1 36 1 37 1 38 1 39 1 40 1 41 1 42 1 43 1 44 1 45 1 46 1 47 1 48 1 49 1 50 1 51 1 52 1 53 1 54 1 55 1 56 1 57 1 58 1 59 ...
result:
ok
Test #78:
score: 0
Accepted
time: 3ms
memory: 27896kb
input:
34/897
output:
impossible
result:
ok
Test #79:
score: 0
Accepted
time: 4ms
memory: 30788kb
input:
794/101
output:
101 100 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 63 73 73 74 74 75 75 76 76 77 77 78 78 79 79 80 80 81 81 82 82 83 83 84 84 85 85 86 86 87 87 88 88 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 100 100 1 101 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 ...
result:
ok
Test #80:
score: 0
Accepted
time: 0ms
memory: 30792kb
input:
303/169
output:
169 168 153 154 152 154 154 155 155 156 156 157 157 158 158 159 159 160 160 161 161 162 162 163 163 164 164 165 165 166 166 167 167 168 168 1 169 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 ...
result:
ok
Test #81:
score: 0
Accepted
time: 0ms
memory: 27980kb
input:
539/734
output:
impossible
result:
ok
Test #82:
score: 0
Accepted
time: 5ms
memory: 30936kb
input:
725/603
output:
603 602 587 588 588 589 589 590 590 591 591 592 592 593 593 594 594 595 595 596 596 597 597 598 598 599 599 600 586 600 600 601 601 602 602 1 603 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30 1 31 1 32 1 33 1 ...
result:
ok
Test #83:
score: 0
Accepted
time: 7ms
memory: 27372kb
input:
83/393
output:
impossible
result:
ok
Test #84:
score: 0
Accepted
time: 3ms
memory: 28524kb
input:
713/855
output:
impossible
result:
ok
Test #85:
score: 0
Accepted
time: 0ms
memory: 27336kb
input:
349/753
output:
impossible
result:
ok
Test #86:
score: 0
Accepted
time: 0ms
memory: 30784kb
input:
505/87
output:
87 86 58 59 59 60 60 61 61 62 62 63 63 64 64 65 65 66 66 67 67 68 68 69 69 70 70 71 71 72 72 73 73 74 57 74 74 75 75 76 76 77 77 78 78 79 79 80 80 81 81 82 82 83 83 84 84 85 85 86 86 1 87 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 ...
result:
ok
Test #87:
score: 0
Accepted
time: 3ms
memory: 28688kb
input:
631/690
output:
impossible
result:
ok
Test #88:
score: 0
Accepted
time: 4ms
memory: 30960kb
input:
357/104
output:
104 103 81 82 82 83 83 84 84 85 85 86 86 87 87 88 88 89 89 90 90 91 91 92 92 93 93 94 94 95 95 96 96 97 97 98 98 99 99 100 100 101 101 102 102 103 80 103 103 1 104 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 10 1 11 1 12 1 13 1 14 1 15 1 16 1 17 1 18 1 19 1 20 1 21 1 22 1 23 1 24 1 25 1 26 1 27 1 28 1 29 1 30...
result:
ok
Test #89:
score: 0
Accepted
time: 3ms
memory: 27144kb
input:
176/849
output:
impossible
result:
ok
Test #90:
score: 0
Accepted
time: 3ms
memory: 26880kb
input:
616/757
output:
impossible
result:
ok
Test #91:
score: 0
Accepted
time: 7ms
memory: 27624kb
input:
138/953
output:
impossible
result:
ok
Test #92:
score: 0
Accepted
time: 0ms
memory: 27272kb
input:
152/389
output:
impossible
result:
ok
Test #93:
score: 0
Accepted
time: 0ms
memory: 28060kb
input:
31/425
output:
impossible
result:
ok
Test #94:
score: 0
Accepted
time: 0ms
memory: 28244kb
input:
91/550
output:
impossible
result:
ok
Test #95:
score: 0
Accepted
time: 3ms
memory: 28112kb
input:
531/956
output:
impossible
result:
ok
Test #96:
score: 0
Accepted
time: 3ms
memory: 27000kb
input:
283/737
output:
impossible
result:
ok
Test #97:
score: 0
Accepted
time: 4ms
memory: 30928kb
input:
490/3
output:
330 329 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54...
result:
ok
Test #98:
score: 0
Accepted
time: 4ms
memory: 30980kb
input:
473/1
output:
947 946 947 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 5...
result:
ok
Test #99:
score: 0
Accepted
time: 6ms
memory: 30936kb
input:
980/1
output:
1961 1960 1961 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 5...
result:
ok
Test #100:
score: 0
Accepted
time: 3ms
memory: 30708kb
input:
926/5
output:
375 374 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 52 53 53 54...
result:
ok
Test #101:
score: 0
Accepted
time: 4ms
memory: 30792kb
input:
457/1
output:
915 914 915 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 5...
result:
ok
Test #102:
score: 0
Accepted
time: 6ms
memory: 30972kb
input:
909/2
output:
910 909 910 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 5...
result:
ok
Test #103:
score: 0
Accepted
time: 0ms
memory: 30788kb
input:
156/1
output:
313 312 313 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 5...
result:
ok
Test #104:
score: 0
Accepted
time: 4ms
memory: 30844kb
input:
486/1
output:
973 972 973 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 5...
result:
ok
Test #105:
score: 0
Accepted
time: 0ms
memory: 30792kb
input:
249/2
output:
250 249 250 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 52 5...
result:
ok
Test #106:
score: 0
Accepted
time: 4ms
memory: 30972kb
input:
948/1
output:
1897 1896 1897 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21 21 22 22 23 23 24 24 25 25 26 26 27 27 28 28 29 29 30 30 31 31 32 32 33 33 34 34 35 35 36 36 37 37 38 38 39 39 40 40 41 41 42 42 43 43 44 44 45 45 46 46 47 47 48 48 49 49 50 50 51 51 5...
result:
ok