QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#675659 | #7569. Lines | maspy | AC ✓ | 47ms | 19040kb | C++23 | 24.7kb | 2024-10-25 19:04:53 | 2024-10-25 19:04:54 |
Judging History
answer
#line 1 "/home/maspy/compro/library/my_template.hpp"
#if defined(LOCAL)
#include <my_template_compiled.hpp>
#else
// https://codeforces.com/blog/entry/96344
#pragma GCC optimize("Ofast,unroll-loops")
// いまの CF だとこれ入れると動かない?
// #pragma GCC target("avx2,popcnt")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using u8 = uint8_t;
using u16 = uint16_t;
using u32 = uint32_t;
using u64 = uint64_t;
using i128 = __int128;
using u128 = unsigned __int128;
using f128 = __float128;
template <class T>
constexpr T infty = 0;
template <>
constexpr int infty<int> = 1'010'000'000;
template <>
constexpr ll infty<ll> = 2'020'000'000'000'000'000;
template <>
constexpr u32 infty<u32> = infty<int>;
template <>
constexpr u64 infty<u64> = infty<ll>;
template <>
constexpr i128 infty<i128> = i128(infty<ll>) * 2'000'000'000'000'000'000;
template <>
constexpr double infty<double> = infty<ll>;
template <>
constexpr long double infty<long double> = infty<ll>;
using pi = pair<ll, ll>;
using vi = vector<ll>;
template <class T>
using vc = vector<T>;
template <class T>
using vvc = vector<vc<T>>;
template <class T>
using vvvc = vector<vvc<T>>;
template <class T>
using vvvvc = vector<vvvc<T>>;
template <class T>
using vvvvvc = vector<vvvvc<T>>;
template <class T>
using pq = priority_queue<T>;
template <class T>
using pqg = priority_queue<T, vector<T>, greater<T>>;
#define vv(type, name, h, ...) vector<vector<type>> name(h, vector<type>(__VA_ARGS__))
#define vvv(type, name, h, w, ...) vector<vector<vector<type>>> name(h, vector<vector<type>>(w, vector<type>(__VA_ARGS__)))
#define vvvv(type, name, a, b, c, ...) \
vector<vector<vector<vector<type>>>> name(a, vector<vector<vector<type>>>(b, vector<vector<type>>(c, vector<type>(__VA_ARGS__))))
// https://trap.jp/post/1224/
#define FOR1(a) for (ll _ = 0; _ < ll(a); ++_)
#define FOR2(i, a) for (ll i = 0; i < ll(a); ++i)
#define FOR3(i, a, b) for (ll i = a; i < ll(b); ++i)
#define FOR4(i, a, b, c) for (ll i = a; i < ll(b); i += (c))
#define FOR1_R(a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR2_R(i, a) for (ll i = (a)-1; i >= ll(0); --i)
#define FOR3_R(i, a, b) for (ll i = (b)-1; i >= ll(a); --i)
#define overload4(a, b, c, d, e, ...) e
#define overload3(a, b, c, d, ...) d
#define FOR(...) overload4(__VA_ARGS__, FOR4, FOR3, FOR2, FOR1)(__VA_ARGS__)
#define FOR_R(...) overload3(__VA_ARGS__, FOR3_R, FOR2_R, FOR1_R)(__VA_ARGS__)
#define FOR_subset(t, s) for (ll t = (s); t >= 0; t = (t == 0 ? -1 : (t - 1) & (s)))
#define all(x) x.begin(), x.end()
#define len(x) ll(x.size())
#define elif else if
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define stoi stoll
int popcnt(int x) { return __builtin_popcount(x); }
int popcnt(u32 x) { return __builtin_popcount(x); }
int popcnt(ll x) { return __builtin_popcountll(x); }
int popcnt(u64 x) { return __builtin_popcountll(x); }
int popcnt_mod_2(int x) { return __builtin_parity(x); }
int popcnt_mod_2(u32 x) { return __builtin_parity(x); }
int popcnt_mod_2(ll x) { return __builtin_parityll(x); }
int popcnt_mod_2(u64 x) { return __builtin_parityll(x); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 1, 2)
int topbit(int x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(u32 x) { return (x == 0 ? -1 : 31 - __builtin_clz(x)); }
int topbit(ll x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
int topbit(u64 x) { return (x == 0 ? -1 : 63 - __builtin_clzll(x)); }
// (0, 1, 2, 3, 4) -> (-1, 0, 1, 0, 2)
int lowbit(int x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(u32 x) { return (x == 0 ? -1 : __builtin_ctz(x)); }
int lowbit(ll x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }
int lowbit(u64 x) { return (x == 0 ? -1 : __builtin_ctzll(x)); }
template <typename T>
T floor(T a, T b) {
return a / b - (a % b && (a ^ b) < 0);
}
template <typename T>
T ceil(T x, T y) {
return floor(x + y - 1, y);
}
template <typename T>
T bmod(T x, T y) {
return x - y * floor(x, y);
}
template <typename T>
pair<T, T> divmod(T x, T y) {
T q = floor(x, y);
return {q, x - q * y};
}
template <typename T, typename U>
T SUM(const vector<U> &A) {
T sm = 0;
for (auto &&a: A) sm += a;
return sm;
}
#define MIN(v) *min_element(all(v))
#define MAX(v) *max_element(all(v))
#define LB(c, x) distance((c).begin(), lower_bound(all(c), (x)))
#define UB(c, x) distance((c).begin(), upper_bound(all(c), (x)))
#define UNIQUE(x) sort(all(x)), x.erase(unique(all(x)), x.end()), x.shrink_to_fit()
template <typename T>
T POP(deque<T> &que) {
T a = que.front();
que.pop_front();
return a;
}
template <typename T>
T POP(pq<T> &que) {
T a = que.top();
que.pop();
return a;
}
template <typename T>
T POP(pqg<T> &que) {
T a = que.top();
que.pop();
return a;
}
template <typename T>
T POP(vc<T> &que) {
T a = que.back();
que.pop_back();
return a;
}
template <typename F>
ll binary_search(F check, ll ok, ll ng, bool check_ok = true) {
if (check_ok) assert(check(ok));
while (abs(ok - ng) > 1) {
auto x = (ng + ok) / 2;
(check(x) ? ok : ng) = x;
}
return ok;
}
template <typename F>
double binary_search_real(F check, double ok, double ng, int iter = 100) {
FOR(iter) {
double x = (ok + ng) / 2;
(check(x) ? ok : ng) = x;
}
return (ok + ng) / 2;
}
template <class T, class S>
inline bool chmax(T &a, const S &b) {
return (a < b ? a = b, 1 : 0);
}
template <class T, class S>
inline bool chmin(T &a, const S &b) {
return (a > b ? a = b, 1 : 0);
}
// ? は -1
vc<int> s_to_vi(const string &S, char first_char) {
vc<int> A(S.size());
FOR(i, S.size()) { A[i] = (S[i] != '?' ? S[i] - first_char : -1); }
return A;
}
template <typename T, typename U>
vector<T> cumsum(vector<U> &A, int off = 1) {
int N = A.size();
vector<T> B(N + 1);
FOR(i, N) { B[i + 1] = B[i] + A[i]; }
if (off == 0) B.erase(B.begin());
return B;
}
// stable sort
template <typename T>
vector<int> argsort(const vector<T> &A) {
vector<int> ids(len(A));
iota(all(ids), 0);
sort(all(ids), [&](int i, int j) { return (A[i] == A[j] ? i < j : A[i] < A[j]); });
return ids;
}
// A[I[0]], A[I[1]], ...
template <typename T>
vc<T> rearrange(const vc<T> &A, const vc<int> &I) {
vc<T> B(len(I));
FOR(i, len(I)) B[i] = A[I[i]];
return B;
}
template <typename T, typename... Vectors>
void concat(vc<T> &first, const Vectors &... others) {
vc<T> &res = first;
(res.insert(res.end(), others.begin(), others.end()), ...);
}
#endif
#line 1 "/home/maspy/compro/library/other/io.hpp"
#define FASTIO
#include <unistd.h>
// https://judge.yosupo.jp/submission/21623
namespace fastio {
static constexpr uint32_t SZ = 1 << 17;
char ibuf[SZ];
char obuf[SZ];
char out[100];
// pointer of ibuf, obuf
uint32_t pil = 0, pir = 0, por = 0;
struct Pre {
char num[10000][4];
constexpr Pre() : num() {
for (int i = 0; i < 10000; i++) {
int n = i;
for (int j = 3; j >= 0; j--) {
num[i][j] = n % 10 | '0';
n /= 10;
}
}
}
} constexpr pre;
inline void load() {
memcpy(ibuf, ibuf + pil, pir - pil);
pir = pir - pil + fread(ibuf + pir - pil, 1, SZ - pir + pil, stdin);
pil = 0;
if (pir < SZ) ibuf[pir++] = '\n';
}
inline void flush() {
fwrite(obuf, 1, por, stdout);
por = 0;
}
void rd(char &c) {
do {
if (pil + 1 > pir) load();
c = ibuf[pil++];
} while (isspace(c));
}
void rd(string &x) {
x.clear();
char c;
do {
if (pil + 1 > pir) load();
c = ibuf[pil++];
} while (isspace(c));
do {
x += c;
if (pil == pir) load();
c = ibuf[pil++];
} while (!isspace(c));
}
template <typename T>
void rd_real(T &x) {
string s;
rd(s);
x = stod(s);
}
template <typename T>
void rd_integer(T &x) {
if (pil + 100 > pir) load();
char c;
do
c = ibuf[pil++];
while (c < '-');
bool minus = 0;
if constexpr (is_signed<T>::value || is_same_v<T, i128>) {
if (c == '-') { minus = 1, c = ibuf[pil++]; }
}
x = 0;
while ('0' <= c) { x = x * 10 + (c & 15), c = ibuf[pil++]; }
if constexpr (is_signed<T>::value || is_same_v<T, i128>) {
if (minus) x = -x;
}
}
void rd(int &x) { rd_integer(x); }
void rd(ll &x) { rd_integer(x); }
void rd(i128 &x) { rd_integer(x); }
void rd(u32 &x) { rd_integer(x); }
void rd(u64 &x) { rd_integer(x); }
void rd(u128 &x) { rd_integer(x); }
void rd(double &x) { rd_real(x); }
void rd(long double &x) { rd_real(x); }
void rd(f128 &x) { rd_real(x); }
template <class T, class U>
void rd(pair<T, U> &p) {
return rd(p.first), rd(p.second);
}
template <size_t N = 0, typename T>
void rd_tuple(T &t) {
if constexpr (N < std::tuple_size<T>::value) {
auto &x = std::get<N>(t);
rd(x);
rd_tuple<N + 1>(t);
}
}
template <class... T>
void rd(tuple<T...> &tpl) {
rd_tuple(tpl);
}
template <size_t N = 0, typename T>
void rd(array<T, N> &x) {
for (auto &d: x) rd(d);
}
template <class T>
void rd(vc<T> &x) {
for (auto &d: x) rd(d);
}
void read() {}
template <class H, class... T>
void read(H &h, T &... t) {
rd(h), read(t...);
}
void wt(const char c) {
if (por == SZ) flush();
obuf[por++] = c;
}
void wt(const string s) {
for (char c: s) wt(c);
}
void wt(const char *s) {
size_t len = strlen(s);
for (size_t i = 0; i < len; i++) wt(s[i]);
}
template <typename T>
void wt_integer(T x) {
if (por > SZ - 100) flush();
if (x < 0) { obuf[por++] = '-', x = -x; }
int outi;
for (outi = 96; x >= 10000; outi -= 4) {
memcpy(out + outi, pre.num[x % 10000], 4);
x /= 10000;
}
if (x >= 1000) {
memcpy(obuf + por, pre.num[x], 4);
por += 4;
} else if (x >= 100) {
memcpy(obuf + por, pre.num[x] + 1, 3);
por += 3;
} else if (x >= 10) {
int q = (x * 103) >> 10;
obuf[por] = q | '0';
obuf[por + 1] = (x - q * 10) | '0';
por += 2;
} else
obuf[por++] = x | '0';
memcpy(obuf + por, out + outi + 4, 96 - outi);
por += 96 - outi;
}
template <typename T>
void wt_real(T x) {
ostringstream oss;
oss << fixed << setprecision(15) << double(x);
string s = oss.str();
wt(s);
}
void wt(int x) { wt_integer(x); }
void wt(ll x) { wt_integer(x); }
void wt(i128 x) { wt_integer(x); }
void wt(u32 x) { wt_integer(x); }
void wt(u64 x) { wt_integer(x); }
void wt(u128 x) { wt_integer(x); }
void wt(double x) { wt_real(x); }
void wt(long double x) { wt_real(x); }
void wt(f128 x) { wt_real(x); }
template <class T, class U>
void wt(const pair<T, U> val) {
wt(val.first);
wt(' ');
wt(val.second);
}
template <size_t N = 0, typename T>
void wt_tuple(const T t) {
if constexpr (N < std::tuple_size<T>::value) {
if constexpr (N > 0) { wt(' '); }
const auto x = std::get<N>(t);
wt(x);
wt_tuple<N + 1>(t);
}
}
template <class... T>
void wt(tuple<T...> tpl) {
wt_tuple(tpl);
}
template <class T, size_t S>
void wt(const array<T, S> val) {
auto n = val.size();
for (size_t i = 0; i < n; i++) {
if (i) wt(' ');
wt(val[i]);
}
}
template <class T>
void wt(const vector<T> val) {
auto n = val.size();
for (size_t i = 0; i < n; i++) {
if (i) wt(' ');
wt(val[i]);
}
}
void print() { wt('\n'); }
template <class Head, class... Tail>
void print(Head &&head, Tail &&... tail) {
wt(head);
if (sizeof...(Tail)) wt(' ');
print(forward<Tail>(tail)...);
}
// gcc expansion. called automaticall after main.
void __attribute__((destructor)) _d() { flush(); }
} // namespace fastio
using fastio::read;
using fastio::print;
using fastio::flush;
#if defined(LOCAL)
#define SHOW(...) SHOW_IMPL(__VA_ARGS__, SHOW6, SHOW5, SHOW4, SHOW3, SHOW2, SHOW1)(__VA_ARGS__)
#define SHOW_IMPL(_1, _2, _3, _4, _5, _6, NAME, ...) NAME
#define SHOW1(x) print(#x, "=", (x)), flush()
#define SHOW2(x, y) print(#x, "=", (x), #y, "=", (y)), flush()
#define SHOW3(x, y, z) print(#x, "=", (x), #y, "=", (y), #z, "=", (z)), flush()
#define SHOW4(x, y, z, w) print(#x, "=", (x), #y, "=", (y), #z, "=", (z), #w, "=", (w)), flush()
#define SHOW5(x, y, z, w, v) print(#x, "=", (x), #y, "=", (y), #z, "=", (z), #w, "=", (w), #v, "=", (v)), flush()
#define SHOW6(x, y, z, w, v, u) print(#x, "=", (x), #y, "=", (y), #z, "=", (z), #w, "=", (w), #v, "=", (v), #u, "=", (u)), flush()
#else
#define SHOW(...)
#endif
#define INT(...) \
int __VA_ARGS__; \
read(__VA_ARGS__)
#define LL(...) \
ll __VA_ARGS__; \
read(__VA_ARGS__)
#define U32(...) \
u32 __VA_ARGS__; \
read(__VA_ARGS__)
#define U64(...) \
u64 __VA_ARGS__; \
read(__VA_ARGS__)
#define STR(...) \
string __VA_ARGS__; \
read(__VA_ARGS__)
#define CHAR(...) \
char __VA_ARGS__; \
read(__VA_ARGS__)
#define DBL(...) \
double __VA_ARGS__; \
read(__VA_ARGS__)
#define VEC(type, name, size) \
vector<type> name(size); \
read(name)
#define VV(type, name, h, w) \
vector<vector<type>> name(h, vector<type>(w)); \
read(name)
void YES(bool t = 1) { print(t ? "YES" : "NO"); }
void NO(bool t = 1) { YES(!t); }
void Yes(bool t = 1) { print(t ? "Yes" : "No"); }
void No(bool t = 1) { Yes(!t); }
void yes(bool t = 1) { print(t ? "yes" : "no"); }
void no(bool t = 1) { yes(!t); }
#line 3 "main.cpp"
#line 2 "/home/maspy/compro/library/geo/convex_polygon.hpp"
#line 2 "/home/maspy/compro/library/geo/base.hpp"
template <typename T>
struct Point {
T x, y;
Point() : x(0), y(0) {}
template <typename A, typename B>
Point(A x, B y) : x(x), y(y) {}
template <typename A, typename B>
Point(pair<A, B> p) : x(p.fi), y(p.se) {}
Point operator+=(const Point p) {
x += p.x, y += p.y;
return *this;
}
Point operator-=(const Point p) {
x -= p.x, y -= p.y;
return *this;
}
Point operator+(Point p) const { return {x + p.x, y + p.y}; }
Point operator-(Point p) const { return {x - p.x, y - p.y}; }
bool operator==(Point p) const { return x == p.x && y == p.y; }
bool operator!=(Point p) const { return x != p.x || y != p.y; }
Point operator-() const { return {-x, -y}; }
Point operator*(T t) const { return {x * t, y * t}; }
Point operator/(T t) const { return {x / t, y / t}; }
bool operator<(Point p) const {
if (x != p.x) return x < p.x;
return y < p.y;
}
T dot(const Point& other) const { return x * other.x + y * other.y; }
T det(const Point& other) const { return x * other.y - y * other.x; }
double norm() { return sqrtl(x * x + y * y); }
double angle() { return atan2(y, x); }
Point rotate(double theta) {
static_assert(!is_integral<T>::value);
double c = cos(theta), s = sin(theta);
return Point{c * x - s * y, s * x + c * y};
}
Point rot90(bool ccw) { return (ccw ? Point{-y, x} : Point{y, -x}); }
};
#ifdef FASTIO
template <typename T>
void rd(Point<T>& p) {
fastio::rd(p.x), fastio::rd(p.y);
}
template <typename T>
void wt(Point<T>& p) {
fastio::wt(p.x);
fastio::wt(' ');
fastio::wt(p.y);
}
#endif
// A -> B -> C と進むときに、左に曲がるならば +1、右に曲がるならば -1
template <typename T>
int ccw(Point<T> A, Point<T> B, Point<T> C) {
T x = (B - A).det(C - A);
if (x > 0) return 1;
if (x < 0) return -1;
return 0;
}
template <typename REAL, typename T, typename U>
REAL dist(Point<T> A, Point<U> B) {
REAL dx = REAL(A.x) - REAL(B.x);
REAL dy = REAL(A.y) - REAL(B.y);
return sqrt(dx * dx + dy * dy);
}
// ax+by+c
template <typename T>
struct Line {
T a, b, c;
Line(T a, T b, T c) : a(a), b(b), c(c) {}
Line(Point<T> A, Point<T> B) { a = A.y - B.y, b = B.x - A.x, c = A.x * B.y - A.y * B.x; }
Line(T x1, T y1, T x2, T y2) : Line(Point<T>(x1, y1), Point<T>(x2, y2)) {}
template <typename U>
U eval(Point<U> P) {
return a * P.x + b * P.y + c;
}
template <typename U>
T eval(U x, U y) {
return a * x + b * y + c;
}
// 同じ直線が同じ a,b,c で表現されるようにする
void normalize() {
static_assert(is_same_v<T, int> || is_same_v<T, long long>);
T g = gcd(gcd(abs(a), abs(b)), abs(c));
a /= g, b /= g, c /= g;
if (b < 0) { a = -a, b = -b, c = -c; }
if (b == 0 && a < 0) { a = -a, b = -b, c = -c; }
}
bool is_parallel(Line other) { return a * other.b - b * other.a == 0; }
bool is_orthogonal(Line other) { return a * other.a + b * other.b == 0; }
};
template <typename T>
struct Segment {
Point<T> A, B;
Segment(Point<T> A, Point<T> B) : A(A), B(B) {}
Segment(T x1, T y1, T x2, T y2) : Segment(Point<T>(x1, y1), Point<T>(x2, y2)) {}
bool contain(Point<T> C) {
T det = (C - A).det(B - A);
if (det != 0) return 0;
return (C - A).dot(B - A) >= 0 && (C - B).dot(A - B) >= 0;
}
Line<T> to_Line() { return Line(A, B); }
};
template <typename REAL>
struct Circle {
Point<REAL> O;
REAL r;
Circle(Point<REAL> O, REAL r) : O(O), r(r) {}
Circle(REAL x, REAL y, REAL r) : O(x, y), r(r) {}
template <typename T>
bool contain(Point<T> p) {
REAL dx = p.x - O.x, dy = p.y - O.y;
return dx * dx + dy * dy <= r * r;
}
};
#line 2 "/home/maspy/compro/library/geo/convex_hull.hpp"
#line 4 "/home/maspy/compro/library/geo/convex_hull.hpp"
// allow_180=true で同一座標点があるとこわれる
// full なら I[0] が sorted で min になる
template <typename T, bool allow_180 = false>
vector<int> ConvexHull(vector<Point<T>>& XY, string mode = "full", bool sorted = false) {
assert(mode == "full" || mode == "lower" || mode == "upper");
ll N = XY.size();
if (N == 1) return {0};
if (N == 2) {
if (XY[0] < XY[1]) return {0, 1};
if (XY[1] < XY[0]) return {1, 0};
return {0};
}
vc<int> I(N);
if (sorted) {
FOR(i, N) I[i] = i;
} else {
I = argsort(XY);
}
if constexpr (allow_180) { FOR(i, N - 1) assert(XY[i] != XY[i + 1]); }
auto check = [&](ll i, ll j, ll k) -> bool {
T det = (XY[j] - XY[i]).det(XY[k] - XY[i]);
if constexpr (allow_180) return det >= 0;
return det > T(0);
};
auto calc = [&]() {
vector<int> P;
for (auto&& k: I) {
while (P.size() > 1) {
auto i = P[P.size() - 2];
auto j = P[P.size() - 1];
if (check(i, j, k)) break;
P.pop_back();
}
P.eb(k);
}
return P;
};
vc<int> P;
if (mode == "full" || mode == "lower") {
vc<int> Q = calc();
P.insert(P.end(), all(Q));
}
if (mode == "full" || mode == "upper") {
if (!P.empty()) P.pop_back();
reverse(all(I));
vc<int> Q = calc();
P.insert(P.end(), all(Q));
}
if (mode == "upper") reverse(all(P));
while (len(P) >= 2 && XY[P[0]] == XY[P.back()]) P.pop_back();
return P;
}
#line 5 "/home/maspy/compro/library/geo/convex_polygon.hpp"
// n=2 は現状サポートしていない
template <typename T>
struct ConvexPolygon {
using P = Point<T>;
int n;
vc<P> point;
T area2;
ConvexPolygon(vc<P> point_) : n(len(point_)), point(point_) {
assert(n >= 3);
area2 = 0;
FOR(i, n) {
int j = nxt_idx(i), k = nxt_idx(j);
assert((point[j] - point[i]).det(point[k] - point[i]) >= 0);
area2 += point[i].det(point[j]);
}
}
// 比較関数 comp(i,j)
template <typename F>
int periodic_min_comp(F comp) {
int L = 0, M = n, R = n + n;
while (1) {
if (R - L == 2) break;
int L1 = (L + M) / 2, R1 = (M + R + 1) / 2;
if (comp(L1 % n, M % n)) { R = M, M = L1; }
elif (comp(R1 % n, M % n)) { L = M, M = R1; }
else {
L = L1, R = R1;
}
}
return M % n;
}
int nxt_idx(int i) { return (i + 1 == n ? 0 : i + 1); }
int prev_idx(int i) { return (i == 0 ? n - 1 : i - 1); }
// 中:1, 境界:0, 外:-1. test した.
int side(P p) {
int L = 1, R = n - 1;
T a = (point[L] - point[0]).det(p - point[0]);
T b = (point[R] - point[0]).det(p - point[0]);
if (a < 0 || b > 0) return -1;
// p は 0 から見て [L,R] 方向
while (R - L >= 2) {
int M = (L + R) / 2;
T c = (point[M] - point[0]).det(p - point[0]);
if (c < 0)
R = M, b = c;
else
L = M, a = c;
}
T c = (point[R] - point[L]).det(p - point[L]);
T x = min({a, -b, c});
if (x < 0) return -1;
if (x > 0) return 1;
// on triangle p[0]p[L]p[R]
if (p == point[0]) return 0;
if (c != 0 && a == 0 && L != 1) return 1;
if (c != 0 && b == 0 && R != n - 1) return 1;
return 0;
}
// return {min, idx}. test した.
pair<T, int> min_dot(P p) {
int idx = periodic_min_comp([&](int i, int j) -> bool { return point[i].dot(p) < point[j].dot(p); });
return {point[idx].dot(p), idx};
}
// return {max, idx}. test した.
pair<T, int> max_dot(P p) {
int idx = periodic_min_comp([&](int i, int j) -> bool { return point[i].dot(p) > point[j].dot(p); });
return {point[idx].dot(p), idx};
}
// p から見える範囲. p 辺に沿って見えるところも見えるとする. test した.
// 多角形からの反時計順は [l,r] だが p から見た偏角順は [r,l] なので注意
pair<int, int> visible_range(P p) {
int a = periodic_min_comp([&](int i, int j) -> bool { return ((point[i] - p).det(point[j] - p) < 0); });
int b = periodic_min_comp([&](int i, int j) -> bool { return ((point[i] - p).det(point[j] - p) > 0); });
if ((p - point[a]).det(p - point[prev_idx(a)]) == T(0)) a = prev_idx(a);
if ((p - point[b]).det(p - point[nxt_idx(b)]) == T(0)) b = nxt_idx(b);
return {a, b};
}
// 線分が「内部と」交わるか
// https://codeforces.com/contest/1906/problem/D
bool check_cross(P A, P B) {
FOR(2) {
swap(A, B);
auto [a, b] = visible_range(A);
if ((point[a] - A).det(B - A) >= 0) return 0;
if ((point[b] - A).det(B - A) <= 0) return 0;
}
return 1;
}
vc<T> AREA;
// point[i,...,j] (inclusive) の面積
T area_between(int i, int j) {
assert(i <= j && j <= i + n);
if (j == i + n) return area2;
i %= n, j %= n;
if (i > j) j += n;
if (AREA.empty()) build_AREA();
return AREA[j] - AREA[i] + (point[j % n].det(point[i]));
}
void build_AREA() {
AREA.resize(2 * n);
FOR(i, n) AREA[n + i] = AREA[i] = point[i].det(point[nxt_idx(i)]);
AREA = cumsum<T>(AREA);
}
};
#line 2 "/home/maspy/compro/library/geo/angle_sort.hpp"
#line 4 "/home/maspy/compro/library/geo/angle_sort.hpp"
// lower: -1, origin: 0, upper: 1
template <typename T>
int lower_or_upper(const Point<T>& p) {
if (p.y != 0) return (p.y > 0 ? 1 : -1);
if (p.x > 0) return -1;
if (p.x < 0) return 1;
return 0;
}
// L<R:-1, L==R:0, L>R:1
template <typename T>
int angle_comp_3(const Point<T>& L, const Point<T>& R) {
int a = lower_or_upper(L), b = lower_or_upper(R);
if (a != b) return (a < b ? -1 : +1);
T det = L.det(R);
if (det > 0) return -1;
if (det < 0) return 1;
return 0;
}
// 偏角ソートに対する argsort
template <typename T>
vector<int> angle_sort(vector<Point<T>>& P) {
vc<int> I(len(P));
FOR(i, len(P)) I[i] = i;
sort(all(I), [&](auto& L, auto& R) -> bool { return angle_comp_3(P[L], P[R]) == -1; });
return I;
}
// 偏角ソートに対する argsort
template <typename T>
vector<int> angle_sort(vector<pair<T, T>>& P) {
vc<Point<T>> tmp(len(P));
FOR(i, len(P)) tmp[i] = Point<T>(P[i]);
return angle_sort<T>(tmp);
}
#line 4 "/home/maspy/compro/library/geo/minkowski_sum.hpp"
// https://codeforces.com/contest/87/problem/E
template <typename T>
vc<Point<T>> minkowski_sum(vc<Point<T>> A, vc<Point<T>> B) {
using P = Point<T>;
vc<P> F;
P p(0, 0);
FOR(2) {
swap(A, B);
vc<P> point = A;
int n = len(point);
FOR(i, n) {
int j = (i + 1) % n;
F.eb(point[j] - point[i]);
}
p = p + MIN(point);
}
auto I = angle_sort(F);
int n = len(I);
F = rearrange(F, I);
vc<P> point(n);
FOR(i, n - 1) point[i + 1] = point[i] + F[i];
P add = p - MIN(point);
for (auto& x: point) x = x + add;
I = ConvexHull(point);
point = rearrange(point, I);
return point;
}
#line 5 "main.cpp"
using P = Point<ll>;
void solve() {
LL(N);
auto get = [&]() -> vc<P> {
vc<P> dat(N + 1);
FOR(x, N + 1) {
LL(y);
dat[x] = {x, y};
}
auto I = ConvexHull<ll>(dat, "full", true);
dat = rearrange(dat, I);
return dat;
};
auto A = get(), B = get(), C = get();
A = minkowski_sum(A, B);
A = minkowski_sum(A, C);
auto I = ConvexHull<ll>(A, "upper");
A = rearrange(A, I);
vc<int> ANS(3 * N + 1);
for (auto& p: A) ANS[p.x] = 1;
vc<int> out;
FOR(x, 3 * N + 1) if (ANS[x] == 0) out.eb(x);
print(len(out));
print(out);
}
signed main() { solve(); }
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 1ms
memory: 3672kb
input:
3 3 1 8 7 9 1 3 1 5 1 1 6
output:
5 1 3 4 7 8
result:
ok 6 numbers
Test #2:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
1 1 2 1 2 1 2
output:
2 1 2
result:
ok 3 number(s): "2 1 2"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
252 336470888 634074578 642802746 740396295 773386884 579721198 396628655 503722503 971207868 202647942 2087506 268792718 46761498 443917727 16843338 125908043 691952768 717268783 787375312 150414369 693319712 519096230 45277106 856168102 762263554 674936674 407246545 274667941 279198849 527268921 1...
output:
733 4 5 7 9 10 11 12 14 16 17 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 10...
result:
ok 734 numbers
Test #4:
score: 0
Accepted
time: 1ms
memory: 3940kb
input:
96 75475634 804928248 476927808 284875072 503158867 627937890 322595515 786026685 645468307 669240390 939887597 588586447 973764525 521365644 710156469 985188306 860350786 11308832 784695957 770562147 208427221 35937909 67590963 726478310 475357775 255361535 135993561 166967811 46718075 851555000 70...
output:
272 2 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 39 40 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106...
result:
ok 273 numbers
Test #5:
score: 0
Accepted
time: 1ms
memory: 3776kb
input:
237 374288891 535590429 751244358 124321145 232930851 266089174 543529670 773363571 319728747 580543238 582720391 468188689 490702144 598813561 138628383 284660056 733781508 155605777 931759705 245485733 723534730 257812292 794937524 596788519 188451996 981010588 14483682 59267682 959461493 32106527...
output:
685 2 5 6 7 8 9 10 11 12 13 14 15 17 18 19 20 21 22 23 24 26 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 45 46 47 48 49 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 106 107 108 ...
result:
ok 686 numbers
Test #6:
score: 0
Accepted
time: 25ms
memory: 13920kb
input:
213081 673102149 561219907 730593611 814024114 812959730 314305867 469496529 350635050 699021890 342102981 815487777 787982418 857896659 526518374 421876106 438907614 902179526 449645826 783856158 865633510 238642240 774653971 962475573 467098727 196513513 561435449 333165290 951567552 726980720 645...
output:
639188 3 6 7 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 10...
result:
ok 639189 numbers
Test #7:
score: 0
Accepted
time: 1ms
memory: 3692kb
input:
221 412106895 291882089 564718673 358502890 837699009 657489855 690430685 632939232 373282330 398630021 753287868 667584659 79866982 603966291 850348020 738379364 480642952 593942770 930919906 485781288 903492853 141752547 984789430 897217447 909607734 846893014 211655411 843867422 789467242 4098289...
output:
644 1 3 5 6 7 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105...
result:
ok 645 numbers
Test #8:
score: 0
Accepted
time: 0ms
memory: 3944kb
input:
270 5887448 757703054 544067926 902981667 712695184 295641139 911364840 620276118 902318577 865222469 250896470 987378388 742028793 681414208 133595743 597659626 649040970 33207011 223207847 960704874 418600362 658594226 417168695 767527655 622701955 867509363 235369723 31134588 702210660 439147697 ...
output:
785 3 5 7 9 10 11 12 14 15 17 18 19 20 21 22 23 25 26 27 28 29 30 31 33 34 35 36 37 38 39 40 41 42 43 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ...
result:
ok 786 numbers
Test #9:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
422 449924898 783332532 378192988 592684636 147499872 343857831 837331700 197547597 576579017 776525316 188696560 12204822 669031820 758862125 826908873 897131377 817438988 737312468 370271596 580852652 638740575 585501313 439482552 637837864 335796176 447934224 259084035 778210267 469729886 9086579...
output:
1238 3 4 5 7 8 9 10 11 12 13 15 16 17 18 20 21 22 23 24 25 26 27 29 30 31 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 100 101 102 103 104 105 106 107 10...
result:
ok 1239 numbers
Test #10:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
63 43705451 513994713 652509537 432130709 317463343 687041819 58265855 479851779 250839457 538085060 126496650 186774359 331193631 836310042 255380788 756411639 690869710 176576709 222368048 906033133 8623893 807375696 461796409 362923880 194114590 733391789 137574156 670510137 237249112 673135534 5...
output:
170 2 3 4 8 9 10 11 12 13 14 15 16 17 19 20 21 22 23 25 26 27 28 29 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 59 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 102 103 104 105 106 107 108...
result:
ok 171 numbers
Test #11:
score: 0
Accepted
time: 1ms
memory: 3700kb
input:
407 782710197 539624191 631858791 976609486 752268030 30225807 279200011 467188665 630132600 594612100 769329445 916633496 258196658 913757959 538628510 55883389 859267729 615840950 514655989 526180911 523731402 324217375 189142970 643299496 907208811 754008138 161288468 562810007 149992530 99742161...
output:
1194 2 3 5 6 7 8 9 10 11 12 13 14 15 16 18 19 20 21 22 23 24 25 27 28 29 30 31 32 33 34 35 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 10...
result:
ok 1195 numbers
Test #12:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
18 640274071 983359971 71550121 96204862 799843967 446173607 796619138 402690754 223219513 668171337 312183499 905549873 673542337 566661387 879397647 434495917 631413076 150918417 579868000 224422012 126195703 525305826 535526356 404334728 653535984 998133227 879226371 59632864 356493387 62611196 8...
output:
36 2 4 5 6 8 10 11 13 15 16 17 18 20 21 22 23 24 25 26 27 28 30 31 33 34 35 37 38 39 40 41 42 43 46 47 48
result:
ok 37 numbers
Test #13:
score: 0
Accepted
time: 0ms
memory: 3708kb
input:
171 379278816 8989449 50899375 935650934 529615950 494390299 427618702 979962232 602512657 429731081 544950885 930376306 895512660 644109304 162645369 439000371 504843798 590182657 726931749 139537086 346335916 42147505 262872917 129420744 661597501 578558088 462749196 951932734 269236805 532121466 ...
output:
492 2 3 5 7 8 9 10 12 13 14 15 16 17 19 20 21 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 1...
result:
ok 493 numbers
Test #14:
score: 0
Accepted
time: 1ms
memory: 3704kb
input:
311 678092074 34618927 179991732 480129711 404612126 132541583 648552857 967299118 276773097 341033928 482750975 104945843 262707175 721557221 591117284 593247929 673241816 734479602 19219689 759684863 156410721 264021888 990219478 999730953 374691722 304207141 781430804 139199900 741788735 85640754...
output:
912 1 3 4 5 6 7 8 10 11 12 13 14 15 16 17 19 20 21 22 23 24 25 26 27 28 29 30 31 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 92 93 94 95 96 97 98 99 100 101 102 103 104 105 ...
result:
ok 913 numbers
Test #15:
score: 0
Accepted
time: 0ms
memory: 3912kb
input:
155 417096820 205472596 159340986 464799976 839416813 475725571 869487013 249603301 246000832 807626376 125583769 129772276 484677498 799005138 284430414 892719679 841639834 28519651 871316142 234608449 526294039 926087759 157757527 575073865 87785943 884632001 659920924 326467067 804275257 32591781...
output:
438 3 5 6 7 10 11 12 13 14 15 17 18 20 22 23 24 25 26 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 81 82 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 104 105 106 107 108 109 110...
result:
ok 439 numbers
Test #16:
score: 0
Accepted
time: 0ms
memory: 4004kb
input:
204 715910077 936134778 138690239 714311457 9380284 523942263 795453872 826874779 625293976 864153416 63383860 9374518 851872013 171420351 567678137 46967238 715070557 172816596 18379890 854756227 41401548 147962143 180071384 5192585 800880165 610281054 978602533 73542745 717018675 650203893 4693378...
output:
590 4 5 6 7 8 9 10 12 13 14 15 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 10...
result:
ok 591 numbers
Test #17:
score: 0
Accepted
time: 0ms
memory: 3792kb
input:
344 454914823 961764255 972815301 258790234 444184972 162093547 16388028 814211665 299554415 625713159 1183950 34200951 73842336 394092460 996150051 906247500 588501279 612080836 165443639 179936708 556509057 664803822 907417945 875502793 513974386 190705915 562125357 965842615 484537901 119714164 8...
output:
1012 2 4 5 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 33 34 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106...
result:
ok 1013 numbers
Test #18:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
188 48695377 692426437 952164554 243460498 173956955 210310239 237322183 96515847 678847559 682240199 498792552 208770488 736004147 176573082 279397774 910751954 756899297 611153589 457731579 654860294 71616567 886678205 929731802 745813002 227068607 476163480 585839669 153109781 252057127 738967538...
output:
537 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 26 27 28 29 30 31 33 34 35 36 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 95 96 97 98 99 100 101 102 103 104 105 106 107...
result:
ok 538 numbers
Test #19:
score: 0
Accepted
time: 0ms
memory: 3972kb
input:
137 347508634 863280107 226481104 787939275 48953130 553494227 458256339 673787326 353107999 298575751 436592642 233596921 957974470 254020999 707869688 64999512 630330019 755450534 309828032 275008072 736467180 403519884 952045659 321155914 235130124 201812533 759297086 45409652 164800546 913510512...
output:
391 2 4 5 6 7 8 9 10 11 12 13 15 16 17 18 19 20 21 22 23 24 26 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 50 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 103 104 105 106 107 10...
result:
ok 392 numbers
Test #20:
score: 0
Accepted
time: 34ms
memory: 17296kb
input:
273481 86513380 593942288 60606166 627385348 778725113 896678215 384223198 661124212 882144246 60135494 374392733 408166459 179944793 331468916 401182818 69503967 798728037 899747479 456891780 895155850 251574689 770618459 679392220 46241930 948224345 77204690 488044102 937709522 227287068 237796591...
output:
820389 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 43 44 45 46 47 48 49 50 51 52 53 54 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 77 78 79 80 81 82 83 84 85 86 87 88 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 10...
result:
ok 820390 numbers
Test #21:
score: 0
Accepted
time: 0ms
memory: 3932kb
input:
30 680293934 914539062 744988123 317088317 653721289 239862203 605157354 943428394 261437390 821695238 312192823 432992892 547139308 408916833 829654733 223751525 672158759 193787527 749179721 665046731 471714903 992492843 406738781 916552138 661318566 362662255 806725710 830009392 140030486 2274157...
output:
74 1 4 7 8 9 10 11 12 13 14 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 39 40 41 42 43 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 63 64 65 66 67 68 69 70 71 72 74 75 77 78 79 80 81 83 85 86 89
result:
ok 75 numbers
Test #22:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
204 509061481 552472140 16115810 148658854 66743034 628305150 677780684 519361360 208050516 401554301 954478790 346543678 387546138 832279893 641889899 80960260 717802881 588066499 661699500 83254572 759454419 427833657 255743179 199661234 694729965 875591136 862937826 103626886 473906880 203664913 ...
output:
595 2 4 5 6 7 8 9 10 11 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 1...
result:
ok 596 numbers
Test #23:
score: 0
Accepted
time: 0ms
memory: 3904kb
input:
48 807874739 723325809 995465063 693137631 646771913 971489138 603747543 801665542 882310956 163114045 892278880 371370111 459773357 909727810 630170326 940240523 886200899 882106547 953987440 703402350 274561928 794932233 278057036 924747250 407824186 456015997 886652138 290894052 386650298 5279509...
output:
131 1 3 5 6 8 9 10 11 12 13 14 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105...
result:
ok 132 numbers
Test #24:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
393 546879484 748955287 974814317 532583704 671511192 314673126 824681699 789002429 261604100 219641085 389887482 250972352 976710976 987175727 58642240 534679569 759631621 26403492 101051189 178325936 789669437 16806616 5403597 795057458 415885703 36440858 765142258 183193923 154169524 292428558 63...
output:
1157 2 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 92 93 94 95 96 97 98 99 100 101 102 103 104 10...
result:
ok 1158 numbers
Test #25:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
45 845692742 774584765 103906675 222286673 251540072 657857114 45615854 71306611 790640347 835976636 327687572 570766082 48938195 769656348 341889962 393959831 928029640 320443541 248114937 798473713 159552755 533648295 27717454 75433075 128979924 762089911 788856571 930269601 361880239 616714636 33...
output:
122 2 4 5 6 7 8 9 10 11 12 13 15 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 33 34 35 36 37 38 39 40 41 42 43 44 45 46 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 95 96 97 98 99 100 101 102 103 104 105 106 10...
result:
ok 123 numbers
Test #26:
score: 0
Accepted
time: 31ms
memory: 14180kb
input:
227185 439473295 505246946 83255928 766765450 981312055 706073806 971582714 648578089 464900787 597536380 265487663 450368323 565875814 847104265 475394581 693431581 241651850 464740486 100211390 418621491 969627560 755522678 50031311 945743283 842074145 342514772 962313987 822569471 129399465 79125...
output:
681503 3 5 6 7 9 10 11 12 13 14 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 10...
result:
ok 681504 numbers
Test #27:
score: 0
Accepted
time: 1ms
memory: 3740kb
input:
30 178478041 676100616 622413694 606211522 711084038 344225090 192516869 635914975 139161226 359096124 908320457 770162052 933070329 69776374 758642303 552711844 820115276 609037430 392499330 598577781 484735069 272364358 72345168 670829299 850135662 627972337 691061003 9836638 601951395 115543689 4...
output:
74 3 4 5 6 7 8 9 10 12 13 14 15 16 17 19 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 48 49 50 52 53 54 55 56 57 58 59 60 61 62 64 65 66 67 68 69 70 71 72 73 74 76 77 78 79 81 82 83 85 87
result:
ok 75 numbers
Test #28:
score: 0
Accepted
time: 31ms
memory: 13632kb
input:
224874 477291299 701730093 601762947 295914491 586080214 392441782 413451025 918219158 813421666 415623163 846120547 649764293 155040653 147224291 892146922 411992106 988513294 903077479 539563079 218725559 999842579 639462933 504724433 541139507 708454075 648588686 864518420 902136508 514694813 880...
output:
674571 4 5 6 7 8 10 11 12 13 14 15 17 18 19 20 21 22 24 25 26 27 28 29 30 31 32 33 35 36 37 38 39 40 41 42 44 45 46 48 49 50 51 52 53 54 55 56 57 58 59 61 62 63 64 65 66 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 1...
result:
ok 674572 numbers
Test #29:
score: 0
Accepted
time: 1ms
memory: 3776kb
input:
219 216296044 432392275 581112201 135360564 20884901 735625770 339417884 495490636 192714810 177182907 783920637 969558023 377010976 224672208 175394644 711463856 156911312 47374424 686626828 133840632 74758600 861337316 527038290 116482420 421548297 934046251 888232732 89403674 282214039 204307334 ...
output:
633 1 2 6 7 9 10 11 12 13 15 17 18 19 20 21 22 23 24 25 27 28 29 30 31 32 33 34 35 36 37 38 39 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 101 102 103 104 105 106 107 ...
result:
ok 634 numbers
Test #30:
score: 0
Accepted
time: 0ms
memory: 3936kb
input:
63 810076598 458021753 710204558 679839341 190848372 373777054 560352039 482827522 866975249 793518459 576496536 849160264 744205491 302120125 458642367 570744118 30342034 486638665 683947472 753988410 589866109 378178995 549352147 841568436 429609814 514471112 911947045 981703545 344700561 37885030...
output:
171 1 3 4 6 7 8 9 11 12 13 14 15 17 18 19 20 21 22 23 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 52 53 54 55 56 58 59 60 61 62 63 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 10...
result:
ok 172 numbers
Test #31:
score: 0
Accepted
time: 0ms
memory: 3932kb
input:
11 254114048 188683934 689553812 74575014 920620356 567217938 781286195 765131704 246268393 555078202 514296626 873986697 966175814 84600746 592146985 870215868 198740052 485711417 831011221 933944700 399940915 600053378 276698708 711878644 142704035 240120164 790437165 874003415 257443979 143327875...
output:
23 1 3 5 8 9 10 11 12 13 15 16 17 18 19 20 22 23 24 26 27 28 30 32
result:
ok 24 numbers
Test #32:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
94 937657403 561775796 665714203 201112847 478866292 955660885 853909525 195840478 47657327 839969970 861615297 787537483 656839540 802931102 109414855 582200412 244384174 174957684 333465591 647119837 687680431 180618385 125703107 994987740 176115433 607824854 991873472 442588205 31511862 199494439...
output:
266 2 4 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 26 27 28 29 30 31 32 33 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 10...
result:
ok 267 numbers
Test #33:
score: 0
Accepted
time: 35ms
memory: 18112kb
input:
299252 336470888 634074578 642802746 740396295 773386884 579721198 396628655 503722503 971207868 202647942 2087506 268792718 46761498 443917727 16843338 125908043 691952768 717268783 787375312 150414369 693319712 519096230 45277106 856168102 762263554 674936674 407246545 274667941 279198849 52726892...
output:
897726 1 2 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok 897727 numbers
Test #34:
score: 0
Accepted
time: 23ms
memory: 15168kb
input:
248096 75475634 804928248 476927808 284875072 503158867 627937890 322595515 786026685 645468307 669240390 939887597 588586447 973764525 521365644 710156469 985188306 860350786 11308832 784695957 770562147 208427221 35937909 67590963 726478310 475357775 255361535 135993561 166967811 46718075 85155500...
output:
744251 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 40 41 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 1...
result:
ok 744252 numbers
Test #35:
score: 0
Accepted
time: 7ms
memory: 6464kb
input:
64237 374288891 535590429 751244358 124321145 232930851 266089174 543529670 773363571 319728747 580543238 582720391 468188689 490702144 598813561 138628383 284660056 733781508 155605777 931759705 245485733 723534730 257812292 794937524 596788519 188451996 981010588 14483682 59267682 959461493 321065...
output:
192679 1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 1...
result:
ok 192680 numbers
Test #36:
score: 0
Accepted
time: 2ms
memory: 4412kb
input:
13081 673102149 561219907 730593611 814024114 812959730 314305867 469496529 350635050 699021890 342102981 815487777 787982418 857896659 526518374 421876106 438907614 902179526 449645826 783856158 865633510 238642240 774653971 962475573 467098727 196513513 561435449 333165290 951567552 726980720 6453...
output:
39229 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102...
result:
ok 39230 numbers
Test #37:
score: 0
Accepted
time: 16ms
memory: 9032kb
input:
129221 412106895 291882089 564718673 358502890 837699009 657489855 690430685 632939232 373282330 398630021 753287868 667584659 79866982 603966291 850348020 738379364 480642952 593942770 930919906 485781288 903492853 141752547 984789430 897217447 909607734 846893014 211655411 843867422 789467242 4098...
output:
387638 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102...
result:
ok 387639 numbers
Test #38:
score: 0
Accepted
time: 29ms
memory: 14100kb
input:
210770 5887448 757703054 544067926 902981667 712695184 295641139 911364840 620276118 902318577 865222469 250896470 987378388 742028793 681414208 133595743 597659626 649040970 33207011 223207847 960704874 418600362 658594226 417168695 767527655 622701955 867509363 235369723 31134588 702210660 4391476...
output:
632271 1 2 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 ...
result:
ok 632272 numbers
Test #39:
score: 0
Accepted
time: 6ms
memory: 5176kb
input:
35422 449924898 783332532 378192988 592684636 147499872 343857831 837331700 197547597 576579017 776525316 188696560 12204822 669031820 758862125 826908873 897131377 817438988 737312468 370271596 580852652 638740575 585501313 439482552 637837864 335796176 447934224 259084035 778210267 469729886 90865...
output:
106234 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 103 1...
result:
ok 106235 numbers
Test #40:
score: 0
Accepted
time: 16ms
memory: 10732kb
input:
151563 43705451 513994713 652509537 432130709 317463343 687041819 58265855 479851779 250839457 538085060 126496650 186774359 331193631 836310042 255380788 756411639 690869710 176576709 222368048 906033133 8623893 807375696 461796409 362923880 194114590 733391789 137574156 670510137 237249112 6731355...
output:
454666 1 2 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103...
result:
ok 454667 numbers
Test #41:
score: 0
Accepted
time: 16ms
memory: 8240kb
input:
100407 782710197 539624191 631858791 976609486 752268030 30225807 279200011 467188665 630132600 594612100 769329445 916633496 258196658 913757959 538628510 55883389 859267729 615840950 514655989 526180911 523731402 324217375 189142970 643299496 907208811 754008138 161288468 562810007 149992530 99742...
output:
301194 1 2 3 4 5 6 7 8 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 10...
result:
ok 301195 numbers
Test #42:
score: 0
Accepted
time: 23ms
memory: 13168kb
input:
196518 640274071 983359971 71550121 96204862 799843967 446173607 796619138 402690754 223219513 668171337 312183499 905549873 673542337 566661387 879397647 434495917 631413076 150918417 579868000 224422012 126195703 525305826 535526356 404334728 653535984 998133227 879226371 59632864 356493387 626111...
output:
589523 1 2 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 10...
result:
ok 589524 numbers
Test #43:
score: 0
Accepted
time: 39ms
memory: 18984kb
input:
300000 481199252 336470888 634074578 642802746 740396295 773386884 579721198 396628655 503722503 971207868 202647942 2087506 268792718 46761498 443917727 16843338 125908043 691952768 717268783 787375312 150414369 693319712 519096230 45277106 856168102 762263554 674936674 407246545 274667941 27919884...
output:
899964 1 2 3 4 5 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 26 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 1...
result:
ok 899965 numbers
Test #44:
score: 0
Accepted
time: 27ms
memory: 18996kb
input:
300000 54748096 75475634 804928248 476927808 284875072 503158867 627937890 322595515 786026685 645468307 669240390 939887597 588586447 973764525 521365644 710156469 985188306 860350786 11308832 784695957 770562147 208427221 35937909 67590963 726478310 475357775 255361535 135993561 166967811 46718075...
output:
899959 1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 47 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 1...
result:
ok 899960 numbers
Test #45:
score: 0
Accepted
time: 38ms
memory: 18932kb
input:
300000 923264237 374288891 535590429 751244358 124321145 232930851 266089174 543529670 773363571 319728747 580543238 582720391 468188689 490702144 598813561 138628383 284660056 733781508 155605777 931759705 245485733 723534730 257812292 794937524 596788519 188451996 981010588 14483682 59267682 95946...
output:
899967 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 ...
result:
ok 899968 numbers
Test #46:
score: 0
Accepted
time: 38ms
memory: 18712kb
input:
300000 496813081 673102149 561219907 730593611 814024114 812959730 314305867 469496529 350635050 699021890 342102981 815487777 787982418 857896659 526518374 421876106 438907614 902179526 449645826 783856158 865633510 238642240 774653971 962475573 467098727 196513513 561435449 333165290 951567552 726...
output:
899980 1 2 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 1...
result:
ok 899981 numbers
Test #47:
score: 0
Accepted
time: 42ms
memory: 18612kb
input:
300000 365329221 412106895 291882089 564718673 358502890 837699009 657489855 690430685 632939232 373282330 398630021 753287868 667584659 79866982 603966291 850348020 738379364 480642952 593942770 930919906 485781288 903492853 141752547 984789430 897217447 909607734 846893014 211655411 843867422 7894...
output:
899965 1 2 3 4 5 6 7 8 9 10 11 12 13 14 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102...
result:
ok 899966 numbers
Test #48:
score: 0
Accepted
time: 33ms
memory: 18184kb
input:
300000 643910770 5887448 757703054 544067926 902981667 712695184 295641139 911364840 620276118 902318577 865222469 250896470 987378388 742028793 681414208 133595743 597659626 649040970 33207011 223207847 960704874 418600362 658594226 417168695 767527655 622701955 867509363 235369723 31134588 7022106...
output:
899965 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102...
result:
ok 899966 numbers
Test #49:
score: 0
Accepted
time: 34ms
memory: 18600kb
input:
300000 72235422 449924898 783332532 378192988 592684636 147499872 343857831 837331700 197547597 576579017 776525316 188696560 12204822 669031820 758862125 826908873 897131377 817438988 737312468 370271596 580852652 638740575 585501313 439482552 637837864 335796176 447934224 259084035 778210267 46972...
output:
899964 1 2 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103...
result:
ok 899965 numbers
Test #50:
score: 0
Accepted
time: 23ms
memory: 18728kb
input:
300000 940751563 43705451 513994713 652509537 432130709 317463343 687041819 58265855 479851779 250839457 538085060 126496650 186774359 331193631 836310042 255380788 756411639 690869710 176576709 222368048 906033133 8623893 807375696 461796409 362923880 194114590 733391789 137574156 670510137 2372491...
output:
899982 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 1...
result:
ok 899983 numbers
Test #51:
score: 0
Accepted
time: 41ms
memory: 18272kb
input:
300000 514300407 782710197 539624191 631858791 976609486 752268030 30225807 279200011 467188665 630132600 594612100 769329445 916633496 258196658 913757959 538628510 55883389 859267729 615840950 514655989 526180911 523731402 324217375 189142970 643299496 907208811 754008138 161288468 562810007 14999...
output:
899966 1 2 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96 97 98 99 100 101 102 1...
result:
ok 899967 numbers
Test #52:
score: 0
Accepted
time: 23ms
memory: 18344kb
input:
300000 598196518 640274071 983359971 71550121 96204862 799843967 446173607 796619138 402690754 223219513 668171337 312183499 905549873 673542337 566661387 879397647 434495917 631413076 150918417 579868000 224422012 126195703 525305826 535526356 404334728 653535984 998133227 879226371 59632864 356493...
output:
899967 1 2 3 4 5 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 10...
result:
ok 899968 numbers
Test #53:
score: 0
Accepted
time: 34ms
memory: 18252kb
input:
300000 912149237 363466377 620626948 150922063 379388246 337989371 546524476 213744663 834088687 132205703 49627076 877197788 762125725 134100202 407490723 873245847 138825265 367231477 388114707 736045459 317603055 504530447 601398019 308750832 655108624 961452210 958860181 79799073 290948672 58895...
output:
899954 1 2 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 92 93 94 95 96 97 98 99 100 101 102 103 105...
result:
ok 899955 numbers
Test #54:
score: 0
Accepted
time: 34ms
memory: 18268kb
input:
300000 90232661 642047925 214407502 176551541 358737500 882468148 126553355 851895947 760055547 414509885 723887515 638757532 404958520 158926635 774685238 950693764 422072988 371735931 261545429 175309700 464666804 124678225 116505528 530625215 677422481 686538226 376987106 510480830 169438792 7119...
output:
899952 3 5 7 8 9 11 12 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29 30 31 32 33 34 36 37 38 39 40 41 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 ...
result:
ok 899953 numbers
Test #55:
score: 0
Accepted
time: 39ms
memory: 18796kb
input:
300000 973348789 215596769 953412248 907213722 192862561 867138412 856325339 340304127 686022406 696814067 103180659 400317275 342758610 333496172 996655561 733174385 555577606 525983490 429943447 174382452 461987448 599601811 631613037 752499598 844960530 261881138 90081327 90905691 193153105 96349...
output:
899958 3 6 7 8 10 11 12 13 14 15 16 17 19 20 21 22 23 24 25 26 27 28 29 30 31 33 34 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106...
result:
ok 899959 numbers
Test #56:
score: 0
Accepted
time: 29ms
memory: 18376kb
input:
300000 151432213 938888718 252225505 932843200 172211815 411617189 586097322 388520819 906956562 979118249 632216907 16652827 135334508 358322605 363850076 250813790 543858033 530487944 303374169 613646693 314083901 514716885 441687842 119598173 572307091 132191347 98142845 376363256 366610521 85579...
output:
899955 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 10...
result:
ok 899956 numbers
Test #57:
score: 0
Accepted
time: 43ms
memory: 18928kb
input:
300000 329515637 512437562 696262955 808729574 446528364 956095966 461093497 26672103 127890717 261422432 306477346 73179867 778167302 532892142 585820399 328261707 827105755 979702798 176804891 757943638 461147649 839897366 516603864 636439853 594620948 857277363 811237066 396979605 95357537 748093...
output:
899953 1 4 6 8 10 11 12 13 14 15 16 17 18 19 20 21 23 24 25 26 27 28 29 30 31 32 33 35 36 37 38 39 40 41 42 43 44 45 46 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 10...
result:
ok 899954 numbers
Test #58:
score: 0
Accepted
time: 47ms
memory: 19040kb
input:
300000 212631765 380953703 290043508 834359051 280653426 940766231 895898185 74888795 53857577 543726614 980737786 834739610 715967393 557718576 807790722 405709624 255577669 838983060 345202909 51983687 753435590 314820952 31711373 858314236 616934805 727587571 524331287 977404466 268814954 7901360...
output:
899941 2 3 6 8 10 11 13 14 16 17 18 19 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 44 45 46 47 48 49 50 51 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 75 76 77 78 79 80 81 82 83 84 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 ...
result:
ok 899942 numbers
Test #59:
score: 0
Accepted
time: 39ms
memory: 18432kb
input:
300000 390715189 659535251 883824062 859988529 260002679 485245008 65861656 418072783 274791732 120998092 654998225 596299354 653767483 732288113 174985237 483157541 538825392 138454811 513600927 196280632 605532042 934968730 546818882 375155915 49314070 302930483 532392804 262862031 292529266 68243...
output:
899945 3 4 6 7 9 10 11 12 13 15 16 18 19 20 21 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 42 43 44 45 46 47 48 49 50 51 52 53 54 55 57 58 59 60 61 62 64 65 66 67 68 69 70 71 72 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 1...
result:
ok 899946 numbers
Test #60:
score: 0
Accepted
time: 35ms
memory: 18984kb
input:
300000 568798613 233084095 327861512 590650711 239351933 324691081 795633639 761256771 495725887 108334978 34291369 357859098 296600277 462147250 691922856 560605458 967297306 997735073 387031649 635544872 752595791 555116508 916702200 742254490 71627927 733049204 245487025 988511083 21276282 574735...
output:
899941 1 2 3 4 5 7 8 9 10 11 13 14 16 17 18 19 20 21 22 23 24 25 27 28 29 30 31 32 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 102 103 104 105 10...
result:
ok 899942 numbers
Test #61:
score: 0
Accepted
time: 42ms
memory: 18532kb
input:
300000 746882037 101600236 921642065 56471676 73476994 14394049 375662518 104440759 421692747 390639161 708551809 269161945 529367664 636716787 764150075 488310272 660610437 2239527 260462371 634617625 44883731 30040093 431809709 259096169 93941784 603359412 958581246 863903240 194733699 467035612 8...
output:
899963 1 3 4 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 38 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 94 95 96 97 98 99 100 101 102 103 104 1...
result:
ok 899964 numbers
Test #62:
score: 0
Accepted
time: 32ms
memory: 18400kb
input:
300000 792837885 389432708 826207378 338869224 264793027 857133225 961511186 147080642 541486599 960826178 158415704 701777930 880667971 95405780 321639998 756245880 670084051 397113962 912056772 31677575 103529845 277108496 571421579 234083318 617169359 690350167 165222744 699138888 815686889 71060...
output:
899948 1 2 3 5 6 7 8 9 10 12 13 14 15 16 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104...
result:
ok 899949 numbers
Test #63:
score: 0
Accepted
time: 1ms
memory: 3676kb
input:
1 132183177 734230841 544400974 738032622 975726391 40073041
output:
0
result:
ok 1 number(s): "0"