QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#285126 | #7939. High Towers | ucup_team_qiuly# | AC ✓ | 102ms | 130608kb | C++14 | 3.0kb | 2023-12-16 16:38:10 | 2023-12-16 16:38:11 |
Judging History
answer
//
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define debug(...) fprintf (stderr, __VA_ARGS__)
#define lep(i, l, r) for (int i = (l), i##_end = (r); i <= i##_end; ++ i)
#define rep(i, r, l) for (int i = (r), i##_end = (l); i >= i##_end; -- i)
char _c; bool _f; template <class T> inline void IN (T & x) {
_f = 0, x = 0; while (_c = getchar (), ! isdigit (_c)) if (_c == '-') _f = 1;
while (isdigit (_c)) x = x * 10 + _c - '0', _c = getchar (); if (_f == 1) x = -x;
}
const int N = 5e5 + 5;
const int inf = 1e9;
int n, a[N], ans[N];
// rmq
int mi[20][N], mx[20][N];
inline void rmq_prework () {
lep (i, 1, n) mi[0][i] = mx[0][i] = a[i];
lep (j, 1, 19) lep (i, 1, n - (1 << j) + 1) {
mi[j][i] = min (mi[j - 1][i], mi[j - 1][i + (1 << j - 1)]);
mx[j][i] = max (mx[j - 1][i], mx[j - 1][i + (1 << j - 1)]);
}
}
inline int qmin (int l, int r) {
if (l > r) return inf;
int ret = __lg (r - l + 1);
return min (mi[ret][l], mi[ret][r - (1 << ret) + 1]);
}
inline int qmax (int l, int r) {
if (l > r) return - inf;
int ret = __lg (r - l + 1);
return max (mx[ret][l], mx[ret][r - (1 << ret) + 1]);
}
//
inline bool test (int l, int r, int d) {
if (l > r) return true;
int a = qmin (l, r) - d;
int b = qmax (l, r) - d;
return a >= 0 && b <= r - l;
}
bool construct (int l, int r, int d) {
if (l > r) return true;
if (! test (l, r, d)) return false;
rep (i, r, l) {
vector <int> pt;
bool ok = true;
for (int j = i, p = r; ; ) {
if (j == l) {
if (a[j] - d == p - j) pt.emplace_back ( j );
break ;
} else {
pt.emplace_back ( j );
int nj = j - ((a[j] - d) - (p - j));
if (nj >= j || nj < l) { ok = false; break ; }
p = j, j = nj;
}
}
if (! ok || ! pt.size ()) continue ;
int x = pt.size ();
for (int & j : pt) ans[j] = inf - d;
lep (j, 0, x) {
if (j == 0) {
ok &= construct (pt[j] + 1, r, d + 1);
} else if (j == x) {
ok &= construct (l, pt[j - 1] - 1, d + 1);
} else {
ok &= construct (pt[j] + 1, pt[j - 1] - 1, d + 2);
}
if (! ok) break ;
}
if (ok) return true;
}
return false;
}
inline void simu () {
stack <int> stk; stk.emplace ( 0 );
vector <int> tot (n + 1, 0);
lep (i, 1, n) {
while (stk.size () > 1 && ans[stk.top ()] < ans[i]) stk.pop ();
tot[i] += i - stk.top () - 1;
tot[i] += stk.size () - 1;
while (stk.size () > 1 && ans[stk.top ()] == ans[i]) stk.pop ();
stk.emplace ( i );
}
while (! stk.empty ()) stk.pop ();
stk.emplace ( n + 1 );
rep (i, n, 1) {
while (stk.size () > 1 && ans[stk.top ()] < ans[i]) stk.pop ();
tot[i] += stk.top () - i - 1;
tot[i] += stk.size () - 1;
while (stk.size () > 1 && ans[stk.top ()] == ans[i]) stk.pop ();
stk.emplace ( i );
}
lep (i, 1, n) assert (a[i] == tot[i]);
}
signed main () {
IN (n);
lep (i, 1, n) IN (a[i]);
rmq_prework ();
debug ("ok = %d\n", construct (1, n, 0));
lep (i, 1, n) printf ("%d%c", ans[i], " \n"[i == n]);
return simu (), 0;
}
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 2ms
memory: 18068kb
input:
6 3 3 4 2 5 1
output:
999999999 999999997 999999999 999999999 1000000000 1000000000
result:
ok
Test #2:
score: 0
Accepted
time: 2ms
memory: 18132kb
input:
4 3 3 3 3
output:
1000000000 999999998 999999998 1000000000
result:
ok
Test #3:
score: 0
Accepted
time: 32ms
memory: 81588kb
input:
264668 5 5 5 5 9 5 5 5 7 3 5 3 11 9 9 9 8 9 8 9 12 4 4 9 5 5 6 4 12 4 7 5 6 5 18 12 6 12 11 11 11 11 11 11 12 19 5 5 8 6 6 6 26 7 7 7 8 6 7 6 6 12 10 6 9 8 8 8 10 4 22 4 4 6 3 6 4 4 8 5 5 5 7 3 8 6 6 6 6 8 3 5 3 6 4 4 8 5 5 5 10 6 6 6 6 17 4 12 5 11 6 10 7 9 8 8 16 5 5 5 8 4 4 12 8 7 7 8 6 9 4 14 5 ...
output:
999999999 999999997 999999995 999999997 999999999 999999997 999999995 999999997 999999999 999999997 999999999 999999997 999999999 999999997 999999995 999999994 999999993 999999993 999999993 999999997 999999999 999999997 999999997 999999999 999999997 999999995 999999997 999999997 999999999 999999997 ...
result:
ok
Test #4:
score: 0
Accepted
time: 41ms
memory: 84756kb
input:
409115 2 4 3 7 4 5 4 7 3 6 4 4 7 4 4 6 3 11 6 6 6 9 6 6 6 11 3 10 8 5 8 7 7 7 10 3 5 3 8 6 6 6 6 8 3 8 6 6 6 6 10 5 5 5 8 4 4 8 4 5 4 7 3 5 3 6 4 4 8 5 5 5 9 4 5 4 8 4 4 7 4 4 8 5 5 5 8 4 4 7 4 4 6 3 9 4 7 6 6 6 9 3 6 4 4 28 7 7 7 12 8 8 9 7 12 7 7 12 8 8 9 7 9 24 7 7 7 8 4 34 8 8 8 8 8 10 5 5 13 4 ...
output:
999999999 999999999 999999997 999999999 999999997 999999997 999999997 999999999 999999997 999999999 999999997 999999997 999999999 999999997 999999997 999999999 999999997 999999999 999999997 999999995 999999995 999999997 999999995 999999995 999999997 999999999 999999997 999999999 999999997 999999996 ...
result:
ok
Test #5:
score: 0
Accepted
time: 55ms
memory: 84768kb
input:
430320 2 5 4 4 8 5 5 5 18 7 7 7 9 6 7 5 14 5 7 6 6 18 4 5 4 14 6 6 6 10 7 7 7 7 31 4 12 7 7 10 8 8 9 6 13 5 7 5 7 5 7 5 7 5 5 28 5 6 5 7 4 12 6 6 6 6 13 4 8 6 6 7 5 11 4 4 7 4 4 6 3 7 5 5 5 10 4 6 5 5 9 4 4 8 5 5 5 7 3 6 4 4 8 5 5 5 15 7 7 8 6 8 11 6 6 6 18 5 5 8 6 6 6 11 4 4 6 3 27 12 8 8 8 9 8 7 8...
output:
999999999 999999999 999999997 999999997 999999999 999999997 999999995 999999997 999999999 999999996 999999994 999999994 999999996 999999994 999999996 999999996 999999997 999999996 999999996 999999994 999999996 999999999 999999997 999999997 999999997 999999999 999999997 999999995 999999995 999999997 ...
result:
ok
Test #6:
score: 0
Accepted
time: 60ms
memory: 82836kb
input:
445524 4 4 6 4 4 32 6 6 6 10 7 7 7 21 7 10 9 9 9 11 10 9 9 9 11 7 7 20 5 6 5 45 8 11 10 10 10 11 13 7 7 14 7 6 6 19 5 6 5 35 6 6 6 11 8 7 8 7 9 9 7 7 7 8 5 19 3 5 3 17 5 7 6 6 15 6 6 11 6 9 8 8 8 64 6 6 7 5 12 8 8 8 8 12 7 7 7 11 6 7 6 10 6 6 10 7 7 7 17 13 13 13 13 11 13 12 12 13 19 6 9 7 8 7 15 9 ...
output:
999999998 999999996 999999998 999999996 999999998 999999999 999999997 999999995 999999995 999999997 999999995 999999993 999999995 999999997 999999994 999999994 999999992 999999992 999999994 999999995 999999995 999999993 999999991 999999993 999999995 999999993 999999995 999999997 999999996 999999996 ...
result:
ok
Test #7:
score: 0
Accepted
time: 87ms
memory: 83176kb
input:
481648 4 4 13 8 10 9 9 11 7 11 11 11 74 4 13 8 8 8 12 9 9 9 9 13 48 28 18 11 11 18 13 14 13 14 16 12 12 28 16 14 14 14 16 13 13 16 17 9 30 7 24 16 11 11 16 14 14 14 14 14 18 9 10 11 10 10 10 22 49 5 7 5 5 69 4 8 6 7 6 7 21 8 8 8 9 9 8 8 8 12 14 5 5 17 4 4 19 5 6 5 10 7 7 7 13 9 8 8 8 9 6 131 10 10 1...
output:
999999998 999999996 999999998 999999993 999999993 999999991 999999993 999999994 999999994 999999995 999999996 999999998 999999999 999999997 999999997 999999995 999999993 999999993 999999995 999999993 999999991 999999993 999999995 999999997 999999997 999999995 999999993 999999991 999999989 999999991 ...
result:
ok
Test #8:
score: 0
Accepted
time: 71ms
memory: 82872kb
input:
421202 5 5 7 5 5 10 4 5 4 43 5 16 13 10 10 13 11 11 11 13 15 7 7 34 11 9 9 11 9 9 12 6 14 6 13 6 11 7 10 9 9 9 71 8 8 8 8 13 8 8 9 7 12 7 7 13 8 9 8 10 7 16 10 9 10 9 10 10 31 6 6 12 9 9 9 9 9 10 4 68 7 7 7 8 13 6 12 7 11 8 10 9 9 31 6 9 8 8 8 12 7 7 10 7 7 10 7 7 7 36 4 6 5 5 34 5 6 5 29 9 9 9 9 9 ...
output:
999999997 999999995 999999997 999999995 999999997 999999998 999999997 999999997 999999997 999999999 999999996 999999996 999999995 999999992 999999990 999999992 999999990 999999990 999999992 999999993 999999995 999999993 999999995 999999997 999999995 999999993 999999991 999999993 999999991 999999993 ...
result:
ok
Test #9:
score: 0
Accepted
time: 85ms
memory: 87288kb
input:
480658 15 8 8 8 10 7 7 15 8 8 9 7 9 16 3 40 5 5 9 7 7 7 15 11 9 11 10 10 11 11 14 6 6 11 7 7 7 8 5 27 3 11 6 7 6 7 9 5 5 13 4 5 4 8 4 4 6 3 10 5 8 7 7 7 8 18 9 7 7 9 7 7 11 5 5 27 7 7 7 7 12 8 8 8 8 13 7 7 7 8 5 43 5 5 8 6 6 24 9 10 9 11 8 12 7 17 8 10 9 9 14 9 9 9 9 22 4 42 5 5 16 11 8 10 9 10 8 12...
output:
999999998 999999995 999999993 999999993 999999995 999999993 999999995 999999996 999999994 999999992 999999994 999999994 999999996 999999998 999999998 999999999 999999997 999999995 999999997 999999995 999999993 999999995 999999997 999999995 999999992 999999992 999999990 999999992 999999993 999999995 ...
result:
ok
Test #10:
score: 0
Accepted
time: 91ms
memory: 86756kb
input:
430417 5 5 5 27 7 7 7 11 8 7 8 7 24 8 8 12 8 10 9 9 16 8 9 8 9 16 34 4 5 4 8 5 5 5 430416 5 5 8 5 6 5 17 6 6 6 11 5 8 6 7 6 18 73 6 8 7 7 33 9 9 11 9 9 15 8 10 9 9 29 10 10 13 10 11 10 17 11 11 11 11 19 8 8 72 8 12 11 10 11 10 12 24 10 11 10 16 12 12 12 13 10 17 8 17 42 8 9 8 11 8 8 22 9 9 12 10 10 ...
output:
999999998 999999996 999999996 999999998 999999996 999999994 999999994 999999996 999999995 999999994 999999994 999999994 999999997 999999994 999999992 999999994 999999993 999999993 999999991 999999993 999999995 999999993 999999993 999999993 999999995 999999997 999999999 999999997 999999997 999999997 ...
result:
ok
Test #11:
score: 0
Accepted
time: 102ms
memory: 83156kb
input:
480452 5 9 8 8 8 8 9 13 5 6 5 6 22 9 7 9 8 8 9 9 10 3 480451 5 5 8 6 6 6 10 4 4 31 6 7 6 7 22 7 9 8 8 15 10 9 10 9 11 7 18 7 7 7 231 10 10 10 10 11 7 30 9 14 13 11 13 12 12 15 8 24 11 11 11 12 9 15 10 10 10 40 13 10 10 13 11 11 11 13 14 6 41 9 7 7 8 6 113 12 15 14 14 14 15 16 10 37 23 15 15 15 21 15...
output:
999999996 999999996 999999994 999999992 999999994 999999996 999999997 999999998 999999996 999999996 999999996 999999998 999999999 999999998 999999994 999999994 999999992 999999994 999999995 999999996 999999998 999999998 1000000000 999999997 999999995 999999997 999999995 999999995 999999997 999999998...
result:
ok
Test #12:
score: 0
Accepted
time: 92ms
memory: 82948kb
input:
448826 6 6 6 10 7 7 7 7 26 8 8 8 15 8 10 9 9 12 8 8 16 5 18 5 5 28 3 3 52 5 6 5 17 6 8 7 7 14 6 10 8 8 9 7 24 5 5 9 5 7 6 6 448797 3 18 17 6 9 7 8 7 17 7 12 9 10 9 11 8 12 125 12 10 10 11 9 12 8 16 9 9 9 9 18 6 6 68 9 12 11 11 11 13 8 36 11 18 15 15 15 15 17 13 13 19 10 20 9 29 16 13 13 13 13 16 12 ...
output:
999999997 999999995 999999995 999999997 999999995 999999993 999999995 999999997 999999998 999999995 999999993 999999993 999999995 999999993 999999993 999999991 999999993 999999994 999999992 999999994 999999996 999999996 999999997 999999995 999999997 999999999 999999997 999999999 1000000000 999999996...
result:
ok
Test #13:
score: 0
Accepted
time: 65ms
memory: 83176kb
input:
466137 1 466136 5 5 5 5 6 6 4 5 4 10 6 6 6 6 12 7 7 7 7 7 10 4 4 8 5 5 5 9 5 5 5 12 6 6 6 8 5 5 16 5 5 9 7 7 7 7 13 5 5 5 11 7 6 6 7 5 11 5 5 5 10 4 6 5 5 14 9 9 9 9 8 9 8 12 4 4 9 5 5 6 4 18 4 5 6 5 11 9 9 9 9 9 9 16 4 4 12 9 6 6 9 7 7 7 11 3 7 4 5 4 7 3 20 6 6 6 18 6 7 6 9 6 12 8 8 8 10 7 7 22 5 5...
output:
1000000000 1000000000 999999999 999999997 999999995 999999997 999999999 999999999 999999997 999999997 999999997 999999999 999999997 999999995 999999995 999999997 999999999 999999997 999999995 999999993 999999995 999999997 999999999 999999997 999999997 999999999 999999997 999999995 999999997 99999999...
result:
ok
Test #14:
score: 0
Accepted
time: 63ms
memory: 83104kb
input:
447669 3 3 29 3 6 5 5 13 10 9 9 9 10 7 10 12 4 6 4 8 5 6 5 11 7 5 7 6 6 447668 3 6 4 5 4 11 6 6 6 6 7 5 4 4 9 4 6 5 5 11 5 5 6 4 21 4 5 9 7 7 8 6 13 7 8 7 8 9 4 46 4 9 6 7 7 6 11 6 6 9 6 6 14 6 11 8 10 9 9 10 18 6 9 8 8 9 6 11 4 40 5 5 6 5 6 5 6 4 21 4 12 7 7 7 11 8 8 8 8 19 4 8 7 7 7 7 19 4 12 5 11...
output:
999999999 999999997 999999999 999999998 999999998 999999996 999999996 999999998 999999996 999999994 999999992 999999992 999999994 999999994 999999996 999999998 999999996 999999998 999999996 999999998 999999996 999999996 999999996 999999998 999999997 999999996 999999996 999999994 999999996 1000000000...
result:
ok
Test #15:
score: 0
Accepted
time: 48ms
memory: 82472kb
input:
408826 1 408825 3 4 3 7 4 4 26 18 12 9 9 12 9 10 9 17 10 10 10 10 11 6 23 6 6 8 6 6 25 3 9 5 6 5 7 4 10 4 4 13 4 9 8 8 8 8 9 4 20 6 6 6 9 6 6 8 5 5 21 5 5 11 9 9 9 9 9 9 26 4 9 8 8 8 8 15 7 7 7 10 7 7 7 28 11 11 8 8 11 8 9 8 13 5 5 19 5 5 7 5 5 10 4 4 22 5 8 7 7 7 12 7 7 7 13 9 9 9 9 9 10 4 21 3 11 ...
output:
1000000000 1000000000 999999998 999999998 999999998 999999999 999999997 999999997 999999999 999999997 999999995 999999993 999999991 999999993 999999992 999999992 999999992 999999995 999999993 999999991 999999991 999999993 999999995 999999995 999999997 999999996 999999994 999999996 999999994 99999999...
result:
ok
Test #16:
score: 0
Accepted
time: 76ms
memory: 85268kb
input:
486362 2 8 5 5 5 7 4 4 10 2 3 486351 5 5 5 6 14 9 7 7 9 7 7 13 5 6 6 5 27 11 6 7 6 9 6 8 6 6 15 4 5 4 6 5 4 4 15 5 5 6 6 5 9 6 7 6 7 25 6 6 8 6 6 13 8 8 8 8 9 4 49 27 9 27 10 14 12 13 12 16 12 12 14 11 18 11 12 12 13 12 13 11 27 27 28 8 7 7 7 36 7 7 7 8 5 54 4 19 7 7 7 8 11 10 8 9 9 8 14 6 7 7 6 23 ...
output:
999999999 999999999 999999998 999999996 999999996 999999998 999999996 999999998 1000000000 999999998 1000000000 1000000000 999999998 999999996 999999996 999999998 999999998 999999997 999999995 999999993 999999995 999999993 999999995 999999997 999999996 999999996 999999996 999999996 999999999 9999999...
result:
ok
Test #17:
score: 0
Accepted
time: 52ms
memory: 87052kb
input:
444506 1 444505 2 3 22 4 10 9 7 8 8 7 15 7 7 9 7 7 14 6 7 7 6 8 23 3 6 4 4 13 10 10 10 10 10 10 10 10 16 7 5 7 6 6 10 4 4 10 7 7 7 7 7 9 3 8 6 6 6 6 10 4 5 4 7 3 7 5 5 5 9 5 5 5 7 3 6 4 4 6 3 5 3 8 6 6 6 6 8 3 5 3 5 3 8 6 6 6 6 8 3 5 3 6 4 4 8 5 5 5 13 9 9 9 9 9 9 9 12 4 4 10 7 5 7 6 6 9 3 6 4 4 9 6...
output:
1000000000 1000000000 999999999 999999999 999999999 999999997 999999997 999999995 999999994 999999994 999999994 999999994 999999997 999999995 999999993 999999995 999999993 999999995 999999997 999999995 999999995 999999995 999999995 999999997 999999999 999999997 999999999 999999997 999999997 99999999...
result:
ok
Test #18:
score: 0
Accepted
time: 56ms
memory: 86868kb
input:
416777 1 416776 4 4 4 8 4 5 4 7 3 7 5 5 5 11 7 7 7 7 7 10 4 4 8 5 5 5 9 4 5 4 9 5 5 5 11 6 6 6 7 4 10 4 4 10 7 7 7 7 7 11 5 5 5 8 4 4 8 5 5 5 11 5 5 7 5 5 11 5 5 5 8 4 4 7 4 4 7 4 4 8 5 5 5 8 4 4 7 4 4 8 5 5 5 10 6 6 6 6 13 8 8 8 7 8 7 11 4 4 6 3 6 4 4 7 4 4 9 6 6 6 6 12 7 5 7 6 6 10 4 4 6 3 5 3 6 4...
output:
1000000000 1000000000 999999999 999999997 999999997 999999999 999999997 999999997 999999997 999999999 999999997 999999999 999999997 999999995 999999997 999999999 999999997 999999995 999999993 999999995 999999997 999999999 999999997 999999997 999999999 999999997 999999995 999999997 999999999 99999999...
result:
ok
Test #19:
score: 0
Accepted
time: 3ms
memory: 22192kb
input:
15 7 7 7 7 9 5 5 11 4 4 13 3 4 2 14
output:
999999997 999999995 999999993 999999995 999999997 999999995 999999997 999999998 999999996 999999998 999999999 999999997 999999999 999999999 1000000000
result:
ok
Test #20:
score: 0
Accepted
time: 4ms
memory: 26532kb
input:
17 7 7 7 7 9 5 5 11 4 4 13 3 5 3 4 2 16
output:
999999997 999999995 999999993 999999995 999999997 999999995 999999997 999999998 999999996 999999998 999999999 999999997 999999999 999999997 999999999 999999999 1000000000
result:
ok
Test #21:
score: 0
Accepted
time: 0ms
memory: 22452kb
input:
15 9 8 8 9 7 10 5 12 5 5 13 3 13 14 1
output:
999999996 999999994 999999992 999999994 999999994 999999996 999999996 999999997 999999995 999999997 999999998 999999998 999999999 1000000000 1000000000
result:
ok
Test #22:
score: 0
Accepted
time: 0ms
memory: 22236kb
input:
15 2 6 5 5 5 8 4 4 4 11 2 5 3 3 3
output:
999999999 999999999 999999997 999999995 999999997 999999999 999999997 999999997 999999999 1000000000 999999998 1000000000 999999998 999999998 1000000000
result:
ok
Test #23:
score: 0
Accepted
time: 68ms
memory: 113000kb
input:
500000 499996 499995 499994 499993 499992 499991 499990 499989 499988 499987 499986 499985 499984 499983 499982 499981 499980 499979 499978 499977 499976 499975 499974 499973 499972 499971 499970 499969 499968 499967 499966 499965 499964 499963 499962 499961 499960 499959 499958 499957 499956 499955...
output:
1000000000 999999998 999999996 999999994 999999992 999999990 999999988 999999986 999999984 999999982 999999980 999999978 999999976 999999974 999999972 999999970 999999968 999999966 999999964 999999962 999999960 999999958 999999956 999999954 999999952 999999950 999999948 999999946 999999944 999999942...
result:
ok
Test #24:
score: 0
Accepted
time: 59ms
memory: 117024kb
input:
500000 2 3 2 499999 3 499996 5 499995 7 499994 9 499993 11 499992 13 499991 15 499990 17 499989 19 499988 21 499987 23 499986 25 499985 27 499984 29 499983 31 499982 33 499981 35 499980 37 499979 39 499978 41 499977 43 499976 45 499975 47 499974 49 499973 51 499972 53 499971 55 499970 57 499969 59 4...
output:
999999999 999999999 999999999 1000000000 999999998 999999998 999999996 999999996 999999994 999999994 999999992 999999992 999999990 999999990 999999988 999999988 999999986 999999986 999999984 999999984 999999982 999999982 999999980 999999980 999999978 999999978 999999976 999999976 999999974 999999974...
result:
ok
Test #25:
score: 0
Accepted
time: 68ms
memory: 130608kb
input:
500000 250000 250000 250001 249999 250002 249998 250003 249997 250004 249996 250005 249995 250006 249994 250007 249993 250008 249992 250009 249991 250010 249990 250011 249989 250012 249988 250013 249987 250014 249986 250015 249985 250016 249984 250017 249983 250018 249982 250019 249981 250020 249980...
output:
999750002 999750000 999750002 999750002 999750003 999750003 999750004 999750004 999750005 999750005 999750006 999750006 999750007 999750007 999750008 999750008 999750009 999750009 999750010 999750010 999750011 999750011 999750012 999750012 999750013 999750013 999750014 999750014 999750015 999750015 ...
result:
ok
Test #26:
score: 0
Accepted
time: 71ms
memory: 128504kb
input:
500000 249759 249759 249760 249758 249761 249757 249762 249756 249763 249755 249764 249754 249765 249753 249766 249752 249767 249751 249768 249750 249769 249749 249770 249748 249771 249747 249772 249746 249773 249745 249774 249744 249775 249743 249776 249742 249777 249741 249778 249740 249779 249739...
output:
999750243 999750241 999750243 999750243 999750244 999750244 999750245 999750245 999750246 999750246 999750247 999750247 999750248 999750248 999750249 999750249 999750250 999750250 999750251 999750251 999750252 999750252 999750253 999750253 999750254 999750254 999750255 999750255 999750256 999750256 ...
result:
ok
Extra Test:
score: 0
Extra Test Passed