QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#881342 | #10050. Bitaro the Brave 2 | cmk666 | 100 ✓ | 10ms | 32992kb | C++23 | 10.0kb | 2025-02-04 15:01:55 | 2025-02-04 15:02:02 |
Judging History
answer
/* _ _ _ _ __ __ __
/ \ _ _ | |_ | |__ ___ _ __ _ ___ _ __ ___ | | __ / /_ / /_ / /_
/ _ \ | | | | | __| | '_ \ / _ \ | '__| (_) / __| | '_ ` _ \ | |/ / | '_ \ | '_ \ | '_ \
/ ___ \ | |_| | | |_ | | | | | (_) | | | _ | (__ | | | | | | | < | (_) | | (_) | | (_) |
/_/ \_\ \__,_| \__| |_| |_| \___/ |_| (_) \___| |_| |_| |_| |_|\_\ \___/ \___/ \___/
[Created Time: 2025-02-02 20:05:01]
[Last Modified Time: 2025-02-02 20:08:05] */
#ifdef LOCAL
#include<bits/stdc++.h>
#include"debug.h"
#else
#pragma GCC optimize("Ofast", "unroll-loops")
#include<bits/stdc++.h>
#define D(...) ((void)0)
#endif
using namespace std; using ll = long long;
#define For(i, j, k) for ( int i = (j) ; i <= (k) ; i++ )
#define Fol(i, j, k) for ( int i = (j) ; i >= (k) ; i-- )
namespace FastIO
{
#define USE_FastIO
// ------------------------------
// #define DISABLE_MMAP
// ------------------------------
#if ( defined(LOCAL) || defined(_WIN32) ) && !defined(DISABLE_MMAP)
#define DISABLE_MMAP
#endif
#ifdef LOCAL
inline void _chk_i() {}
inline char _gc_nochk() { return getchar(); }
inline char _gc() { return getchar(); }
inline void _chk_o() {}
inline void _pc_nochk(char c) { putchar(c); }
inline void _pc(char c) { putchar(c); }
template < int n > inline void _pnc_nochk(const char *c) { for ( int i = 0 ; i < n ; i++ ) putchar(c[i]); }
#else
#ifdef DISABLE_MMAP
inline constexpr int _READ_SIZE = 1 << 18; inline static char _read_buffer[_READ_SIZE + 40], *_read_ptr = nullptr, *_read_ptr_end = nullptr; static inline bool _eof = false;
inline void _chk_i() { if ( __builtin_expect(!_eof, true) && __builtin_expect(_read_ptr_end - _read_ptr < 40, false) ) { int sz = _read_ptr_end - _read_ptr; if ( sz ) memcpy(_read_buffer, _read_ptr, sz); char *beg = _read_buffer + sz; _read_ptr = _read_buffer, _read_ptr_end = beg + fread(beg, 1, _READ_SIZE, stdin); if ( __builtin_expect(_read_ptr_end != beg + _READ_SIZE, false) ) _eof = true, *_read_ptr_end = EOF; } }
inline char _gc_nochk() { return __builtin_expect(_eof && _read_ptr == _read_ptr_end, false) ? EOF : *_read_ptr++; }
inline char _gc() { _chk_i(); return _gc_nochk(); }
#else
#include<sys/mman.h>
#include<sys/stat.h>
inline static char *_read_ptr = (char *)mmap(nullptr, [] { struct stat s; return fstat(0, &s), s.st_size; } (), 1, 2, 0, 0);
inline void _chk_i() {}
inline char _gc_nochk() { return *_read_ptr++; }
inline char _gc() { return *_read_ptr++; }
#endif
inline constexpr int _WRITE_SIZE = 1 << 18; inline static char _write_buffer[_WRITE_SIZE + 40], *_write_ptr = _write_buffer;
inline void _chk_o() { if ( __builtin_expect(_write_ptr - _write_buffer > _WRITE_SIZE, false) ) fwrite(_write_buffer, 1, _write_ptr - _write_buffer, stdout), _write_ptr = _write_buffer; }
inline void _pc_nochk(char c) { *_write_ptr++ = c; }
inline void _pc(char c) { *_write_ptr++ = c, _chk_o(); }
template < int n > inline void _pnc_nochk(const char *c) { memcpy(_write_ptr, c, n), _write_ptr += n; }
inline struct _auto_flush { inline ~_auto_flush() { fwrite(_write_buffer, 1, _write_ptr - _write_buffer, stdout); } } _auto_flush;
#endif
#define println println_ // don't use C++23 std::println
template < class T > inline constexpr bool _is_signed = numeric_limits < T >::is_signed;
template < class T > inline constexpr bool _is_unsigned = numeric_limits < T >::is_integer && !_is_signed < T >;
#if __SIZEOF_LONG__ == 64
template <> inline constexpr bool _is_signed < __int128 > = true;
template <> inline constexpr bool _is_unsigned < __uint128_t > = true;
#endif
inline bool _isgraph(char c) { return c >= 33; }
inline bool _isdigit(char c) { return 48 <= c && c <= 57; } // or faster, remove c <= 57
constexpr struct _table {
#ifndef LOCAL
int i[65536];
#endif
char o[40000]; constexpr _table() :
#ifndef LOCAL
i{},
#endif
o{} {
#ifndef LOCAL
for ( int x = 0 ; x < 65536 ; x++ ) i[x] = -1; for ( int x = 0 ; x <= 9 ; x++ ) for ( int y = 0 ; y <= 9 ; y++ ) i[x + y * 256 + 12336] = x * 10 + y;
#endif
for ( int x = 0 ; x < 10000 ; x++ ) for ( int y = 3, z = x ; ~y ; y-- ) o[x * 4 + y] = z % 10 + 48, z /= 10; } } _table;
template < class T, int digit > inline constexpr T _pw10 = 10 * _pw10 < T, digit - 1 >;
template < class T > inline constexpr T _pw10 < T, 0 > = 1;
inline void read(char &c) { do c = _gc(); while ( !_isgraph(c) ); }
inline void read_cstr(char *s) { char c = _gc(); while ( !_isgraph(c) ) c = _gc(); while ( _isgraph(c) ) *s++ = c, c = _gc(); *s = 0; }
inline void read(string &s) { char c = _gc(); s.clear(); while ( !_isgraph(c) ) c = _gc(); while ( _isgraph(c) ) s.push_back(c), c = _gc(); }
template < class T, bool neg >
#ifndef LOCAL
__attribute__((no_sanitize("undefined")))
#endif
inline void _read_int_suf(T &x) { _chk_i(); char c; while
#ifndef LOCAL
( ~_table.i[*reinterpret_cast < unsigned short *& >(_read_ptr)] ) if constexpr ( neg ) x = x * 100 - _table.i[*reinterpret_cast < unsigned short *& >(_read_ptr)++]; else x = x * 100 + _table.i[*reinterpret_cast < unsigned short *& >(_read_ptr)++]; if
#endif
( _isdigit(c = _gc_nochk()) ) if constexpr ( neg ) x = x * 10 - ( c & 15 ); else x = x * 10 + ( c & 15 ); }
template < class T, enable_if_t < _is_signed < T >, int > = 0 > inline void read(T &x) { char c; while ( !_isdigit(c = _gc()) ) if ( c == 45 ) { _read_int_suf < T, true >(x = -( _gc_nochk() & 15 )); return; } _read_int_suf < T, false >(x = c & 15); }
template < class T, enable_if_t < _is_unsigned < T >, int > = 0 > inline void read(T &x) { char c; while ( !_isdigit(c = _gc()) ); _read_int_suf < T, false >(x = c & 15); }
inline void write(bool x) { _pc(x | 48); }
inline void write(char c) { _pc(c); }
inline void write_cstr(const char *s) { while ( *s ) _pc(*s++); }
inline void write(const string &s) { for ( char c : s ) _pc(c); }
template < class T, bool neg, int digit > inline void _write_int_suf(T x) { if constexpr ( digit == 4 ) _pnc_nochk < 4 >(_table.o + ( neg ? -x : x ) * 4); else _write_int_suf < T, neg, digit / 2 >(x / _pw10 < T, digit / 2 >), _write_int_suf < T, neg, digit / 2 >(x % _pw10 < T, digit / 2 >); }
template < class T, bool neg, int digit > inline void _write_int_pre(T x) { if constexpr ( digit <= 4 ) if ( digit >= 3 && ( neg ? x <= -100 : x >= 100 ) ) if ( digit >= 4 && ( neg ? x <= -1000 : x >= 1000 ) ) _pnc_nochk < 4 >(_table.o + ( neg ? -x : x ) * 4); else _pnc_nochk < 3 >(_table.o + ( neg ? -x : x ) * 4 + 1); else if ( digit >= 2 && ( neg ? x <= -10 : x >= 10 ) ) _pnc_nochk < 2 >(_table.o + ( neg ? -x : x ) * 4 + 2); else _pc_nochk(( neg ? -x : x ) | 48); else { constexpr int cur = 1 << __lg(digit - 1); if ( neg ? x <= -_pw10 < T, cur > : x >= _pw10 < T, cur > ) _write_int_pre < T, neg, digit - cur >(x / _pw10 < T, cur >), _write_int_suf < T, neg, cur >(x % _pw10 < T, cur >); else _write_int_pre < T, neg, cur >(x); } }
template < class T, enable_if_t < _is_signed < T >, int > = 0 > inline void write(T x) { if ( x >= 0 ) _write_int_pre < T, false, numeric_limits < T >::digits10 + 1 >(x); else _pc_nochk(45), _write_int_pre < T, true, numeric_limits < T >::digits10 + 1 >(x); _chk_o(); }
template < class T, enable_if_t < _is_unsigned < T >, int > = 0 > inline void write(T x) { _write_int_pre < T, false, numeric_limits < T >::digits10 + 1 >(x), _chk_o(); }
template < size_t N, class ...T > inline void _read_tuple(tuple < T... > &x) { read(get < N >(x)); if constexpr ( N + 1 != sizeof...(T) ) _read_tuple < N + 1, T... >(x); }
template < size_t N, class ...T > inline void _write_tuple(const tuple < T... > &x) { write(get < N >(x)); if constexpr ( N + 1 != sizeof...(T) ) _pc(32), _write_tuple < N + 1, T... >(x); }
template < class ...T > inline void read(tuple < T... > &x) { _read_tuple < 0, T... >(x); }
template < class ...T > inline void write(const tuple < T... > &x) { _write_tuple < 0, T... >(x); }
template < class T1, class T2 > inline void read(pair < T1, T2 > &x) { read(x.first), read(x.second); }
template < class T1, class T2 > inline void write(const pair < T1, T2 > &x) { write(x.first), _pc(32), write(x.second); }
template < class T > inline auto read(T &x) -> decltype(x.read(), void()) { x.read(); }
template < class T > inline auto write(const T &x) -> decltype(x.write(), void()) { x.write(); }
template < class T1, class ...T2 > inline void read(T1 &x, T2 &...y) { read(x), read(y...); }
template < class ...T > inline void read_cstr(char *x, T *...y) { read_cstr(x), read_cstr(y...); }
template < class T1, class ...T2 > inline void write(const T1 &x, const T2 &...y) { write(x), write(y...); }
template < class ...T > inline void write_cstr(const char *x, const T *...y) { write_cstr(x), write_cstr(y...); }
template < class T > inline void print(const T &x) { write(x); }
inline void print_cstr(const char *x) { write_cstr(x); }
template < class T1, class ...T2 > inline void print(const T1 &x, const T2 &...y) { write(x), _pc(32), print(y...); }
template < class ...T > inline void print_cstr(const char *x, const T *...y) { write_cstr(x), _pc(32), print_cstr(y...); }
inline void println() { _pc(10); }
inline void println_cstr() { _pc(10); }
template < class ...T > inline void println(const T &...x) { print(x...), _pc(10); }
template < class ...T > inline void println_cstr(const T *...x) { print_cstr(x...), _pc(10); }
} using FastIO::read, FastIO::read_cstr, FastIO::write, FastIO::write_cstr, FastIO::println, FastIO::println_cstr;
constexpr ll inf = numeric_limits < ll >::max() >> 1;
int n; ll a[500009], b[500009], s[500009], pre[500009], suf[500009], ans;
int main()
{
read(n), ans = inf;
For(i, 1, n) read(a[i]);
For(i, 1, n) read(b[i]), s[i] = s[i - 1] + b[i];
For(i, 1, n) pre[i] = max(pre[i - 1], a[i] - s[i - 1]);
Fol(i, n, 1) suf[i] = max(a[i], suf[i + 1] - b[i]);
For(i, 1, n) ans = min(ans, max(suf[i], pre[i - 1] - ( s[n] - s[i - 1] )));
return println(ans), 0;
}
// 想上GM捏 想上GM捏 想上GM捏 想上GM捏 想上GM捏
// 伊娜可爱捏 伊娜贴贴捏
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 0ms
memory: 7840kb
input:
2000 10 9 9 9 9 9 10 9 10 10 9 10 9 10 9 9 10 9 9 9 10 9 10 10 9 10 10 9 9 10 9 10 10 10 9 10 10 9 10 9 9 10 10 9 9 9 9 9 9 9 9 10 9 10 10 10 9 10 9 9 10 9 10 10 10 10 10 9 10 10 10 9 9 9 9 10 9 10 9 10 9 10 10 10 10 9 9 10 10 9 9 9 9 10 9 10 10 10 9 9 9 10 9 9 9 9 10 10 10 9 10 10 10 10 9 10 9 10 9...
output:
9
result:
ok single line: '9'
Test #2:
score: 10
Accepted
time: 0ms
memory: 7884kb
input:
2000 9 9 10 9 10 9 10 9 9 9 10 10 9 10 10 9 9 10 9 10 10 9 10 9 9 9 10 10 10 10 9 10 9 10 9 9 10 9 9 9 9 9 10 10 9 9 9 10 9 9 10 9 9 9 9 10 10 9 10 10 10 10 10 9 9 10 10 9 9 9 9 10 10 10 9 10 9 9 10 9 9 10 9 9 9 10 9 10 10 9 9 10 10 9 9 9 10 9 10 9 10 9 9 10 9 9 9 10 9 10 9 9 9 9 10 9 9 10 10 9 10 1...
output:
9
result:
ok single line: '9'
Test #3:
score: 10
Accepted
time: 0ms
memory: 7884kb
input:
2000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Test #4:
score: 10
Accepted
time: 0ms
memory: 7888kb
input:
2000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Test #5:
score: 10
Accepted
time: 0ms
memory: 7724kb
input:
2000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Test #6:
score: 10
Accepted
time: 0ms
memory: 7884kb
input:
2000 8 6 6 8 8 9 7 6 8 7 10 8 6 8 9 8 10 9 10 10 6 6 10 9 7 8 9 9 7 9 6 10 6 8 6 9 8 10 10 8 9 6 10 10 7 9 10 7 7 10 9 10 10 9 9 10 7 9 8 7 7 9 6 6 9 9 9 6 7 8 8 8 10 8 7 9 10 7 9 6 8 6 6 6 10 10 8 8 9 8 7 9 8 8 10 9 7 6 7 7 7 6 8 10 6 8 9 9 10 9 10 10 7 10 9 7 9 9 6 9 10 6 7 7 10 9 8 7 9 8 8 6 9 10...
output:
10
result:
ok single line: '10'
Test #7:
score: 10
Accepted
time: 0ms
memory: 7892kb
input:
2000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
8
result:
ok single line: '8'
Test #8:
score: 10
Accepted
time: 0ms
memory: 7892kb
input:
2000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
10
result:
ok single line: '10'
Test #9:
score: 10
Accepted
time: 0ms
memory: 11980kb
input:
2000 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
8
result:
ok single line: '8'
Test #10:
score: 10
Accepted
time: 0ms
memory: 7888kb
input:
2000 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
9
result:
ok single line: '9'
Subtask #2:
score: 21
Accepted
Test #11:
score: 21
Accepted
time: 0ms
memory: 7852kb
input:
2000 100000000 100000001 100000002 100000003 100000004 100000005 100000006 100000007 100000008 100000009 100000010 100000011 100000012 100000013 100000014 100000015 100000016 100000017 100000018 100000019 100000020 100000021 100000022 100000023 100000024 100000025 100000026 100000027 100000028 10000...
output:
99999489
result:
ok single line: '99999489'
Test #12:
score: 21
Accepted
time: 0ms
memory: 7892kb
input:
2000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
1000000000
result:
ok single line: '1000000000'
Test #13:
score: 21
Accepted
time: 0ms
memory: 7892kb
input:
2000 100000000 99999999 99999998 99999997 99999996 99999995 99999994 99999993 99999992 99999991 99999990 99999989 99999988 99999987 99999986 99999985 99999984 99999983 99999982 99999981 99999980 99999979 99999978 99999977 99999976 99999975 99999974 99999973 99999972 99999971 99999970 99999969 999999...
output:
99999017
result:
ok single line: '99999017'
Test #14:
score: 21
Accepted
time: 0ms
memory: 7892kb
input:
2000 99999990 99999990 99999993 99999995 99999994 99999999 99999999 99999993 99999992 99999993 99999996 99999995 99999998 99999999 99999995 99999997 99999991 99999991 99999991 99999999 99999997 99999995 99999992 99999992 99999994 99999997 99999990 99999998 99999990 99999992 99999999 99999995 9999999...
output:
99999995
result:
ok single line: '99999995'
Test #15:
score: 21
Accepted
time: 0ms
memory: 9896kb
input:
2000 99999997 99999998 99999994 99999999 99999996 99999994 99999997 99999997 99999993 99999998 99999997 99999998 99999999 99999991 99999999 99999992 99999995 99999994 99999992 99999991 99999991 99999995 99999997 99999997 99999990 99999999 99999998 99999998 99999998 99999991 99999997 99999994 9999999...
output:
99999996
result:
ok single line: '99999996'
Test #16:
score: 21
Accepted
time: 0ms
memory: 7892kb
input:
2000 99999996 99999998 99999997 99999993 99999997 99999998 99999995 99999990 99999995 99999999 99999994 99999997 99999994 99999997 99999991 99999998 99999996 99999992 99999997 99999997 99999992 99999990 99999999 99999997 99999990 99999998 99999998 99999999 99999997 99999990 99999992 99999999 9999999...
output:
99999996
result:
ok single line: '99999996'
Test #17:
score: 21
Accepted
time: 0ms
memory: 8016kb
input:
2000 500000000 595954395 500000000 719922556 500000000 673855701 500000000 524733105 500000000 569117483 500000000 645988962 500000000 618369893 500000000 603500273 500000000 703349061 500000000 744916082 500000000 640655652 500000000 523816441 500000000 673995695 500000000 569697107 500000000 71052...
output:
740407931
result:
ok single line: '740407931'
Test #18:
score: 21
Accepted
time: 0ms
memory: 8020kb
input:
2000 500000000 521755178 456489644 500000000 546667566 406664868 500000000 530279196 439441608 500000000 581555724 336888552 500000000 652694037 194611926 500000000 582467170 335065660 500000000 504346000 491308000 500000000 629620007 240759986 500000000 642779991 214440018 500000000 646764177 20647...
output:
661631870
result:
ok single line: '661631870'
Test #19:
score: 21
Accepted
time: 1ms
memory: 9976kb
input:
2000 500000000 552697382 605394764 341907854 500000000 509601020 519202040 471196940 500000000 614172225 728344450 157483325 500000000 610176729 720353458 169469813 500000000 605313640 710627280 184059080 500000000 605975345 711950690 182073965 500000000 543566392 587132784 369300824 500000000 55783...
output:
742359908
result:
ok single line: '742359908'
Test #20:
score: 21
Accepted
time: 0ms
memory: 8012kb
input:
2000 500000000 541907823 583815646 374276531 332368708 500000000 570171481 640342962 289485557 219314076 500000000 592827464 685654928 221517608 128690144 500000000 557436775 614873550 327689675 270252900 500000000 556968155 613936310 329095535 272127380 500000000 583513888 667027776 249458336 16594...
output:
686324284
result:
ok single line: '686324284'
Test #21:
score: 21
Accepted
time: 0ms
memory: 8020kb
input:
2000 500000000 536137908 572275816 608413724 644551632 680689540 283172552 247034644 210896736 174758828 500000000 540969022 581938044 622907066 663876088 704845110 254185868 213216846 172247824 131278802 500000000 510166059 520332118 530498177 540664236 550830295 439003646 428837587 418671528 40850...
output:
737919838
result:
ok single line: '737919838'
Test #22:
score: 21
Accepted
time: 0ms
memory: 7892kb
input:
2000 500000000 500926607 501853214 502779821 503706428 504633035 505559642 506486249 507412856 508339463 509266070 510192677 511119284 512045891 512972498 513899105 514825712 515752319 516678926 517605533 518532140 519458747 520385354 521311961 522238568 523165175 524091782 525018389 525944996 52687...
output:
727326597
result:
ok single line: '727326597'
Test #23:
score: 21
Accepted
time: 0ms
memory: 9956kb
input:
2000 500000 500484 500968 498548 500000 500633 501266 498101 500000 500606 501212 498182 500000 500597 501194 498209 500000 500585 501170 498245 500000 500576 501152 498272 500000 500575 501150 498275 500000 500360 500720 498920 500000 500380 500760 498860 500000 500412 500824 498764 500000 500693 5...
output:
1992
result:
ok single line: '1992'
Test #24:
score: 21
Accepted
time: 0ms
memory: 7888kb
input:
2000 500000 500606 501212 498182 500000 500374 500748 498878 500000 500348 500696 498956 500000 500391 500782 498827 500000 500507 501014 498479 500000 500337 500674 498989 500000 500638 501276 498086 500000 500341 500682 498977 500000 500664 501328 498008 500000 500664 501328 498008 500000 500334 5...
output:
1977
result:
ok single line: '1977'
Test #25:
score: 21
Accepted
time: 0ms
memory: 7884kb
input:
2000 500000 500470 500940 498590 498120 500000 500639 501278 498083 497444 500000 500622 501244 498134 497512 500000 500393 500786 498821 498428 500000 500511 501022 498467 497956 500000 500381 500762 498857 498476 500000 500624 501248 498128 497504 500000 500420 500840 498740 498320 500000 500317 5...
output:
1958
result:
ok single line: '1958'
Test #26:
score: 21
Accepted
time: 0ms
memory: 7892kb
input:
2000 500000 500418 500836 501254 501672 502090 497492 497074 496656 496238 500000 500430 500860 501290 501720 502150 497420 496990 496560 496130 500000 500536 501072 501608 502144 502680 496784 496248 495712 495176 500000 500345 500690 501035 501380 501725 497930 497585 497240 496895 500000 500382 5...
output:
2014
result:
ok single line: '2014'
Subtask #3:
score: 19
Accepted
Test #27:
score: 19
Accepted
time: 6ms
memory: 25960kb
input:
500000 3 4 10 8 4 3 8 10 1 7 2 5 5 4 8 6 5 9 1 6 5 7 2 9 7 1 6 7 9 6 5 3 2 5 9 8 5 9 7 6 3 8 6 4 7 4 2 1 3 7 9 5 2 10 4 6 3 5 7 7 2 1 3 1 6 7 5 6 8 7 10 6 10 8 5 9 3 4 5 7 9 2 4 2 10 2 5 1 8 1 5 1 5 6 10 7 6 4 6 3 5 9 7 1 7 10 8 8 7 2 3 4 10 3 8 4 1 6 6 1 1 7 5 9 8 1 6 2 2 5 1 1 3 3 1 3 4 1 9 1 5 6 ...
output:
1
result:
ok single line: '1'
Test #28:
score: 19
Accepted
time: 7ms
memory: 26172kb
input:
500000 10 8 9 8 8 10 8 10 9 8 10 10 10 8 8 10 9 9 10 10 9 10 9 9 9 8 8 10 8 9 8 8 9 8 10 8 10 9 10 10 9 8 9 9 9 8 10 10 8 8 10 8 9 8 8 10 10 9 10 9 9 9 9 10 10 9 10 8 8 10 9 8 10 10 8 10 9 9 9 8 10 9 10 9 10 10 8 9 9 10 8 8 9 9 8 8 9 8 8 8 10 9 9 9 10 10 9 10 8 8 9 10 8 10 10 9 8 10 10 9 8 9 10 10 8...
output:
8
result:
ok single line: '8'
Test #29:
score: 19
Accepted
time: 6ms
memory: 26132kb
input:
500000 9 10 6 4 1 1 1 9 1 4 2 9 0 1 7 7 2 10 1 3 0 3 7 1 1 2 9 6 9 8 3 5 4 1 0 1 9 0 8 7 2 0 10 3 7 1 7 10 7 9 9 0 9 5 7 5 6 8 2 10 8 5 4 5 1 6 9 0 9 5 4 5 0 5 2 3 4 6 1 9 7 6 9 3 4 6 1 1 6 9 10 10 9 5 7 10 1 4 2 0 3 3 8 0 8 5 7 10 3 0 0 1 8 2 7 5 2 7 9 8 1 10 0 8 3 1 4 3 3 8 4 10 8 8 4 6 1 6 6 6 10...
output:
0
result:
ok single line: '0'
Test #30:
score: 19
Accepted
time: 2ms
memory: 25500kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
8
result:
ok single line: '8'
Test #31:
score: 19
Accepted
time: 5ms
memory: 25628kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
10
result:
ok single line: '10'
Test #32:
score: 19
Accepted
time: 4ms
memory: 25124kb
input:
500000 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21...
output:
8
result:
ok single line: '8'
Test #33:
score: 19
Accepted
time: 5ms
memory: 25280kb
input:
500000 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21...
output:
8
result:
ok single line: '8'
Test #34:
score: 19
Accepted
time: 4ms
memory: 25612kb
input:
500000 9 9 9 10 9 9 9 9 10 9 9 9 9 9 9 9 9 9 10 9 9 9 9 9 10 9 10 9 9 10 9 10 9 10 10 10 9 10 10 9 9 10 10 10 9 9 9 10 9 9 9 10 10 10 9 9 10 9 9 10 10 9 9 9 10 9 9 9 9 9 10 9 10 9 10 10 9 10 9 10 10 10 9 10 10 10 9 10 9 10 10 9 10 9 9 9 9 10 9 9 10 10 9 9 9 9 10 9 10 9 10 10 9 9 9 9 10 9 10 9 10 9 9...
output:
9
result:
ok single line: '9'
Test #35:
score: 19
Accepted
time: 7ms
memory: 26168kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Test #36:
score: 19
Accepted
time: 2ms
memory: 26212kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Test #37:
score: 19
Accepted
time: 4ms
memory: 26104kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Test #38:
score: 19
Accepted
time: 4ms
memory: 26068kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Test #39:
score: 19
Accepted
time: 6ms
memory: 26340kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Test #40:
score: 19
Accepted
time: 1ms
memory: 26352kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Test #41:
score: 19
Accepted
time: 7ms
memory: 26324kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
0
result:
ok single line: '0'
Subtask #4:
score: 22
Accepted
Test #42:
score: 22
Accepted
time: 4ms
memory: 27696kb
input:
500000 500000 500064 500128 500192 500256 500320 500384 500448 500512 500576 500640 500704 500768 500832 500896 500960 501024 501088 501152 501216 501280 501344 501408 501472 501536 501600 501664 501728 501792 501856 501920 501984 502048 502112 502176 502240 502304 502368 502432 502496 502560 502624...
output:
499499
result:
ok single line: '499499'
Test #43:
score: 22
Accepted
time: 3ms
memory: 27856kb
input:
500000 500000 500061 500122 500183 500244 500305 500366 500427 500488 500549 500610 500671 500732 500793 500854 500915 500976 501037 501098 501159 501220 501281 501342 501403 501464 501525 501586 501647 501708 501769 501830 501891 501952 502013 502074 502135 502196 502257 502318 502379 502440 502501...
output:
531001
result:
ok single line: '531001'
Test #44:
score: 22
Accepted
time: 1ms
memory: 27776kb
input:
500000 500000 500082 500164 500246 500328 500410 500492 500574 500656 500738 500820 500902 500984 501066 501148 501230 501312 501394 501476 501558 501640 501722 501804 501886 501968 502050 502132 502214 502296 502378 502460 502542 502624 502706 502788 502870 502952 503034 503116 503198 503280 503362...
output:
499949
result:
ok single line: '499949'
Test #45:
score: 22
Accepted
time: 5ms
memory: 27744kb
input:
500000 500000 500005 500010 500015 500020 500025 500030 500035 500040 500045 500050 500055 500060 500065 500070 500075 500080 500085 500090 500095 500100 500105 500110 500115 500120 500125 500130 500135 500140 500145 500150 500155 500160 500165 500170 500175 500180 500185 500190 500195 500200 500205...
output:
502451
result:
ok single line: '502451'
Test #46:
score: 22
Accepted
time: 8ms
memory: 27744kb
input:
500000 500000 500014 500028 500042 500056 500070 500084 500098 500112 500126 500140 500154 500168 500182 500196 500210 500224 500238 500252 500266 500280 500294 500308 500322 500336 500350 500364 500378 500392 500406 500420 500434 500448 500462 500476 500490 500504 500518 500532 500546 500560 500574...
output:
502601
result:
ok single line: '502601'
Test #47:
score: 22
Accepted
time: 4ms
memory: 27732kb
input:
500000 500000 500030 500060 499910 500000 500081 500162 499757 500000 500006 500012 499982 500000 500030 500060 499910 500000 500094 500188 499718 500000 500021 500042 499937 500000 500060 500120 499820 500000 500056 500112 499832 500000 500080 500160 499760 500000 500057 500114 499829 500000 500091...
output:
499997
result:
ok single line: '499997'
Test #48:
score: 22
Accepted
time: 6ms
memory: 27724kb
input:
500000 500000 500091 500182 499727 499636 500000 500015 500030 499955 499940 500000 500058 500116 499826 499768 500000 500097 500194 499709 499612 500000 500003 500006 499991 499988 500000 500035 500070 499895 499860 500000 500002 500004 499994 499992 500000 500012 500024 499964 499952 500000 500089...
output:
500068
result:
ok single line: '500068'
Test #49:
score: 22
Accepted
time: 4ms
memory: 27472kb
input:
500000 500000 500017 500034 499949 499932 500000 500059 500118 499823 499764 500000 500097 500194 499709 499612 500000 500006 500012 499982 499976 500000 500063 500126 499811 499748 500000 500020 500040 499940 499920 500000 500092 500184 499724 499632 500000 500033 500066 499901 499868 500000 500015...
output:
500078
result:
ok single line: '500078'
Test #50:
score: 22
Accepted
time: 6ms
memory: 27688kb
input:
500000 500000 500073 500146 499781 499708 500000 500037 500074 499889 499852 500000 500050 500100 499850 499800 500000 500079 500158 499763 499684 500000 500056 500112 499832 499776 500000 500062 500124 499814 499752 500000 500006 500012 499982 499976 500000 500047 500094 499859 499812 500000 500067...
output:
500082
result:
ok single line: '500082'
Test #51:
score: 22
Accepted
time: 4ms
memory: 27760kb
input:
500000 500000 500055 500110 499835 499780 500000 500064 500128 499808 499744 500000 500100 500200 499700 499600 500000 500049 500098 499853 499804 500000 500058 500116 499826 499768 500000 500093 500186 499721 499628 500000 500060 500120 499820 499760 500000 500025 500050 499925 499900 500000 500055...
output:
499996
result:
ok single line: '499996'
Test #52:
score: 22
Accepted
time: 6ms
memory: 27676kb
input:
500000 500000 500093 500186 500279 500372 500465 499442 499349 499256 499163 500000 500054 500108 500162 500216 500270 499676 499622 499568 499514 500000 500008 500016 500024 500032 500040 499952 499944 499936 499928 500000 500020 500040 500060 500080 500100 499880 499860 499840 499820 500000 500070...
output:
500191
result:
ok single line: '500191'
Test #53:
score: 22
Accepted
time: 6ms
memory: 27480kb
input:
500000 500000 500056 500112 500168 500224 500280 499664 499608 499552 499496 500000 500099 500198 500297 500396 500495 499406 499307 499208 499109 500000 500001 500002 500003 500004 500005 499994 499993 499992 499991 500000 500073 500146 500219 500292 500365 499562 499489 499416 499343 500000 500062...
output:
500221
result:
ok single line: '500221'
Test #54:
score: 22
Accepted
time: 4ms
memory: 27628kb
input:
500000 500000 500048 500096 500144 500192 500240 499712 499664 499616 499568 500000 500070 500140 500210 500280 500350 499580 499510 499440 499370 500000 500065 500130 500195 500260 500325 499610 499545 499480 499415 500000 500045 500090 500135 500180 500225 499730 499685 499640 499595 500000 500065...
output:
499994
result:
ok single line: '499994'
Test #55:
score: 22
Accepted
time: 6ms
memory: 27560kb
input:
500000 500000 500062 500124 500186 500248 500310 499628 499566 499504 499442 500000 500086 500172 500258 500344 500430 499484 499398 499312 499226 500000 500006 500012 500018 500024 500030 499964 499958 499952 499946 500000 500041 500082 500123 500164 500205 499754 499713 499672 499631 500000 500081...
output:
499994
result:
ok single line: '499994'
Subtask #5:
score: 28
Accepted
Test #56:
score: 28
Accepted
time: 6ms
memory: 25288kb
input:
500000 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
output:
1000000000
result:
ok single line: '1000000000'
Test #57:
score: 28
Accepted
time: 5ms
memory: 32992kb
input:
500000 878732262 659850111 642167668 527055743 874918922 910516925 632227950 347446862 789657007 199359454 271738438 413064348 380649122 749297150 271061420 547940090 988295141 857908755 423119545 951447379 653726190 751491775 36946795 133415601 340869239 473110303 389127597 765480107 169286051 1172...
output:
2573
result:
ok single line: '2573'
Test #58:
score: 28
Accepted
time: 10ms
memory: 32912kb
input:
500000 92053807 821003041 998709647 997639666 737664671 52294529 92882552 897389465 838476243 66499365 841862027 570820639 265984300 881163733 222035000 645755487 108495075 557930072 951874990 248796463 803052472 211179064 180368193 37679412 58792565 482515541 85145894 348741658 333665969 957099801 ...
output:
2908
result:
ok single line: '2908'
Test #59:
score: 28
Accepted
time: 3ms
memory: 26224kb
input:
500000 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 1...
output:
100
result:
ok single line: '100'
Test #60:
score: 28
Accepted
time: 7ms
memory: 28776kb
input:
500000 100000000 100000001 100000002 100000003 100000004 100000005 100000006 100000007 100000008 100000009 100000010 100000011 100000012 100000013 100000014 100000015 100000016 100000017 100000018 100000019 100000020 100000021 100000022 100000023 100000024 100000025 100000026 100000027 100000028 100...
output:
99875428
result:
ok single line: '99875428'
Test #61:
score: 28
Accepted
time: 5ms
memory: 28880kb
input:
500000 100000000 100000001 100000002 100000003 100000004 100000005 100000006 100000007 100000008 100000009 100000010 100000011 100000012 100000013 100000014 100000015 100000016 100000017 100000018 100000019 100000020 100000021 100000022 100000023 100000024 100000025 100000026 100000027 100000028 100...
output:
99875185
result:
ok single line: '99875185'
Test #62:
score: 28
Accepted
time: 8ms
memory: 28904kb
input:
500000 100000000 100000001 100000002 100000003 100000004 100000005 100000006 100000007 100000008 100000009 100000010 100000011 100000012 100000013 100000014 100000015 100000016 100000017 100000018 100000019 100000020 100000021 100000022 100000023 100000024 100000025 100000026 100000027 100000028 100...
output:
99875058
result:
ok single line: '99875058'
Test #63:
score: 28
Accepted
time: 6ms
memory: 28744kb
input:
500000 99999999 99999993 99999997 99999994 99999999 99999994 99999994 99999996 99999992 99999993 99999991 99999991 99999995 99999997 99999995 99999991 99999998 99999993 99999995 99999998 99999996 99999993 99999990 99999995 99999993 99999996 99999996 99999994 99999992 99999993 99999999 99999996 99999...
output:
99999994
result:
ok single line: '99999994'
Test #64:
score: 28
Accepted
time: 7ms
memory: 28416kb
input:
500000 99999996 99999992 99999992 99999990 99999999 99999991 99999993 99999996 99999998 99999990 99999995 99999997 99999995 99999996 99999995 99999996 99999992 99999998 99999991 99999997 99999996 99999994 99999999 99999994 99999996 99999997 99999990 99999993 99999998 99999999 99999994 99999999 99999...
output:
99999994
result:
ok single line: '99999994'
Test #65:
score: 28
Accepted
time: 7ms
memory: 30816kb
input:
500000 500000000 556280134 500000000 558408306 500000000 508373541 500000000 714723533 500000000 613253505 500000000 567766871 500000000 732614973 500000000 684220111 500000000 708057471 500000000 611087915 500000000 618966411 500000000 577226631 500000000 545128948 500000000 664529731 500000000 663...
output:
740557719
result:
ok single line: '740557719'
Test #66:
score: 28
Accepted
time: 6ms
memory: 30756kb
input:
500000 500000000 550038950 399922100 500000000 665317823 169364354 500000000 632544042 234911916 500000000 640754928 218490144 500000000 515996682 468006636 500000000 534517633 430964734 500000000 561317749 377364502 500000000 629994115 240011770 500000000 620429227 259141546 500000000 554523641 390...
output:
657339665
result:
ok single line: '657339665'
Test #67:
score: 28
Accepted
time: 7ms
memory: 30836kb
input:
500000 500000000 517419855 534839710 447740435 500000000 554084905 608169810 337745285 500000000 605939766 711879532 182180702 500000000 537093910 574187820 388718270 500000000 599317308 698634616 202048076 500000000 618576579 737153158 144270263 500000000 521425460 542850920 435723620 500000000 545...
output:
734863672
result:
ok single line: '734863672'
Test #68:
score: 28
Accepted
time: 5ms
memory: 30812kb
input:
500000 500000000 501034457 502068914 496896629 495862172 500000000 554496060 608992120 336511820 282015760 500000000 520723164 541446328 437830508 417107344 500000000 572616585 645233170 282150245 209533660 500000000 565296594 630593188 304110218 238813624 500000000 552950528 605901056 341148416 288...
output:
685903651
result:
ok single line: '685903651'
Test #69:
score: 28
Accepted
time: 7ms
memory: 30780kb
input:
500000 500000000 547874989 595749978 643624967 691499956 739374945 212750066 164875077 117000088 69125099 500000000 512271797 524543594 536815391 549087188 561358985 426369218 414097421 401825624 389553827 500000000 511198441 522396882 533595323 544793764 555992205 432809354 421610913 410412472 3992...
output:
731481908
result:
ok single line: '731481908'
Test #70:
score: 28
Accepted
time: 6ms
memory: 30652kb
input:
500000 500000000 504535286 509070572 513605858 518141144 522676430 527211716 531747002 536282288 540817574 545352860 549888146 554423432 558958718 563494004 568029290 572564576 577099862 581635148 586170434 590705720 595241006 599776292 604311578 608846864 613382150 617917436 622452722 626988008 631...
output:
691763832
result:
ok single line: '691763832'
Test #71:
score: 28
Accepted
time: 10ms
memory: 30792kb
input:
500000 500000000 504773308 509546616 514319924 519093232 523866540 528639848 533413156 538186464 542959772 547733080 552506388 557279696 562053004 566826312 571599620 576372928 581146236 585919544 590692852 595466160 600239468 605012776 609786084 614559392 619332700 624106008 628879316 633652624 638...
output:
691381788
result:
ok single line: '691381788'
Test #72:
score: 28
Accepted
time: 6ms
memory: 29512kb
input:
500000 500000 500625 501250 498125 497500 500000 500560 501120 498320 497760 500000 500466 500932 498602 498136 500000 500377 500754 498869 498492 500000 500586 501172 498242 497656 500000 500569 501138 498293 497724 500000 500658 501316 498026 497368 500000 500567 501134 498299 497732 500000 500687...
output:
498612
result:
ok single line: '498612'
Test #73:
score: 28
Accepted
time: 6ms
memory: 29516kb
input:
500000 500000 500542 501084 501626 502168 502710 496748 496206 495664 495122 500000 500471 500942 501413 501884 502355 497174 496703 496232 495761 500000 500562 501124 501686 502248 502810 496628 496066 495504 494942 500000 500408 500816 501224 501632 502040 497552 497144 496736 496328 500000 500488...
output:
497257
result:
ok single line: '497257'
Test #74:
score: 28
Accepted
time: 2ms
memory: 29512kb
input:
500000 500000 500520 501040 501560 502080 502600 503120 503640 504160 504680 505200 505720 506240 506760 507280 507800 508320 508840 509360 509880 510400 510920 511440 511960 512480 513000 486480 485960 485440 484920 484400 483880 483360 482840 482320 481800 481280 480760 480240 479720 479200 478680...
output:
483680
result:
ok single line: '483680'
Test #75:
score: 28
Accepted
time: 5ms
memory: 29568kb
input:
500000 500000 500467 500934 501401 501868 502335 502802 503269 503736 504203 504670 505137 505604 506071 506538 507005 507472 507939 508406 508873 509340 509807 510274 510741 511208 511675 512142 512609 513076 513543 514010 514477 514944 515411 515878 516345 516812 517279 517746 518213 518680 519147...
output:
466613
result:
ok single line: '466613'
Test #76:
score: 28
Accepted
time: 3ms
memory: 29592kb
input:
500000 500000 500354 500708 501062 501416 501770 502124 502478 502832 503186 503540 503894 504248 504602 504956 505310 505664 506018 506372 506726 507080 507434 507788 508142 508496 508850 509204 509558 509912 510266 510620 510974 511328 511682 512036 512390 512744 513098 513452 513806 514160 514514...
output:
162010
result:
ok single line: '162010'
Test #77:
score: 28
Accepted
time: 6ms
memory: 28868kb
input:
500000 500000 501920 503840 505760 507680 509600 488480 486560 484640 482720 500000 501660 503320 504980 506640 508300 490040 488380 486720 485060 500000 501907 503814 505721 507628 509535 488558 486651 484744 482837 500000 501267 502534 503801 505068 506335 492398 491131 489864 488597 500000 501552...
output:
83335
result:
ok single line: '83335'
Test #78:
score: 28
Accepted
time: 2ms
memory: 28864kb
input:
500000 500000 501095 502190 503285 504380 505475 506570 507665 508760 509855 510950 512045 513140 514235 515330 516425 517520 518615 519710 520805 521900 522995 524090 525185 526280 527375 471530 470435 469340 468245 467150 466055 464960 463865 462770 461675 460580 459485 458390 457295 456200 455105...
output:
83335
result:
ok single line: '83335'
Test #79:
score: 28
Accepted
time: 9ms
memory: 28892kb
input:
500000 500000 501433 502866 504299 505732 507165 508598 510031 511464 512897 514330 515763 517196 518629 520062 521495 522928 524361 525794 527227 528660 530093 531526 532959 534392 535825 537258 538691 540124 541557 542990 544423 545856 547289 548722 550155 551588 553021 554454 555887 557320 558753...
output:
83335
result:
ok single line: '83335'
Extra Test:
score: 0
Extra Test Passed