QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#475026#9129. Quotient Sumucup-team008#WA 187ms17492kbC++2313.6kb2024-07-13 10:33:462024-07-13 10:33:47

Judging History

你现在查看的是最新测评结果

  • [2024-09-26 15:38:30]
  • hack成功,自动添加数据
  • (/hack/908)
  • [2024-07-13 10:33:47]
  • 评测
  • 测评结果:WA
  • 用时:187ms
  • 内存:17492kb
  • [2024-07-13 10:33:46]
  • 提交

answer

// {{{ y0105w49 template 24K21
// hi mom
#ifndef NULL
#ifdef __GNUC__
#ifndef __clang__
// #include <bits/stdc++.h>
#include <bits/extc++.h>
#include <tr2/dynamic_bitset>
#define EXTS
#else
#ifdef ARST
#include <bits/clang++.h>
#else
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <cwchar>
#include <cwctype>
#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
// #include <cstdalign>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
// #include <cuchar>
#endif
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <codecvt>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif
#if __cplusplus >= 201402L
#include <shared_mutex>
#endif
#if __cplusplus >= 201703L
#include <any>
#include <charconv>
// #include <execution>
#include <filesystem>
#include <optional>
// #include <memory_resource>
#include <string_view>
#include <variant>
#endif
#if __cplusplus >= 202002L
#include <barrier>
#include <bit>
#include <compare>
#include <concepts>
#if __cpp_impl_coroutine
# include <coroutine>
#endif
#include <latch>
#include <numbers>
#include <ranges>
#include <span>
// #include <stop_token>
#include <semaphore>
// #include <source_location>
// #include <syncstream>
#include <version>
#endif
#if __cplusplus > 202002L
// #include <expected>
// #include <spanstream>
#if __has_include(<stacktrace>)
# include <stacktrace>
#endif
#include <stdatomic.h>
#endif
#endif
#endif
#else
#error "unsupported"
#endif
#endif
using namespace std;
#ifdef ARST
#define JO 1
#define OJ 0
#else
#define JO 0
#define OJ 1
#endif
#define STR(x) #x
#define GCCDIAG(s) _Pragma(STR(GCC diagnostic s)) static_assert(true)
#define Wsave GCCDIAG(push)
#define Wpop GCCDIAG(pop)
#define Wsupp(w) GCCDIAG(ignored "-W" w)
#define Wpush(w) Wsave; Wsupp(w)
#define typeof __typeof__
namespace gbd_ns {
	template<typename C> struct is_iterable {
		template<class T> static long check(...);
		template<class T> static char check(int,typename T::const_iterator = C().end());
		enum {
			value = sizeof(check<C>(0)) == sizeof(char),
			neg_value = sizeof(check<C>(0)) != sizeof(char)
		};
	};
	template<class T> struct _gbd3C;
	template<class T> ostream &_gbd3(ostream &os,const T &x) { return _gbd3C<T>::call(os,x); }
	template<> ostream &_gbd3(ostream &os,const string &x) { return os<<'"'<<x<<'"'; }
	template<> ostream &_gbd3(ostream &os,char *const &x) { return os<<'"'<<x<<'"'; }
	template<class T> ostream &_gbd3_5(ostream &os,const T &x) { return _gbd3(os,x); }
	template<class A,class B> ostream &_gbd4(ostream &os,const pair<A,B> &p) {
		_gbd3(os<<'(',p.first);
		_gbd3(os<<',',p.second);
		return os<<')';
	}
	template<class T,size_t N> struct _gbd4_tupleC {
		static void call(ostream &os,const T &t) {
			_gbd4_tupleC<T,N-1>::call(os,t);
			os<<','<<get<N-1>(t);
		}
	};
	template<class T> struct _gbd4_tupleC<T,1> {
		static void call(ostream &os,const T &t) { os<<get<0>(t); }
	};
	template<typename... Types> ostream &_gbd4(ostream &os,const tuple<Types...> &t) {
		os<<'(';
		_gbd4_tupleC<tuple<Types...>,sizeof...(Types)>::call(os,t);
		return os<<')';
	}
	template<> ostream &_gbd4(ostream &os,const tuple<> &t) { (void)t; return os<<"()"; }
	template<class T> ostream &_gbd4(ostream &os,const T &x) {
		return os<<x;
	}
	template<class T> struct _gbd3C {
		template<class U=T> static ostream &call(ostream &os,enable_if_t<is_iterable<U>::value,const T> &V) {
			os<<"{";
			bool ff=0;
			for(const auto &E:V) _gbd3_5<decltype(E)>(ff?os<<",":os,E), ff=1;
			return os<<"}";
		}
		template<class U=T> static ostream &call(ostream &os,enable_if_t<is_iterable<U>::neg_value,const T> &x) {
			return _gbd4(os,x);
		}
	};
	template<class T,typename... Args> ostream &_gbd2(ostream &os,bool,vector<string>::iterator nm,const T &x,Args&&... args);
	ostream &_gbd2(ostream &os,bool,vector<string>::iterator) { return os; }
	template<typename... Args> ostream &_gbd2(ostream &os,bool fi,vector<string>::iterator nm,const char *x,Args&&... args) {
		return _gbd2(os<<(fi?"":"  ")<<x,0,nm+1,args...);
	}
	template<class T,typename... Args> ostream &_gbd2(ostream &os,bool fi,vector<string>::iterator nm,const T &x,Args&&... args) {
		return _gbd2(_gbd3<T>(os<<(fi?"":"  ")<<*nm<<"=",x),0,nm+1,args...);
	}
	vector<string> split(string s) {
		vector<string> Z;
		string z="";
		s+=',';
		int dep=0;
		for(char c:s) {
			if(c==',' && !dep) Z.push_back(z),z="";
			else z+=c;
			if(c=='(' || c=='{' || c=='[') ++dep;
			if(c==')' || c=='}' || c==']') --dep;
		}
		return Z;
	}
	template<typename... Args> ostream &_gbd1(ostream &os,const string &nm,Args&&... args) {
		return _gbd2(os,1,split(nm).begin(),args...);
	}
	template<typename... Args> string _gbd1(const string &nm,Args&&... args) {
		ostringstream oss;
		_gbd2(oss,1,split(nm).begin(),args...);
		return oss.str();
	}
}
bool DBG=1,EMACS=0;
#define dbg(...) (JO&&DBG?gbd_ns::_gbd1(cerr<<"\033[38;5;5m"<<__FILE__<<":"<<__LINE__<<(EMACS?":note: ":": "),#__VA_ARGS__,__VA_ARGS__)<<"\033[0m"<<endl:cerr)
#define dbgt(...) dbg(fmt_time(),__VA_ARGS__)
#define fmt(...) gbd_ns::_gbd1(#__VA_ARGS__,__VA_ARGS__)
template<class Fun> struct _y_combinator_result {
	Fun _fun;
	template<class T> explicit _y_combinator_result(T &&fun) : _fun(forward<T>(fun)) {}
	template<typename... Args> decltype(auto) operator()(Args&&... args) {
		return _fun(ref(*this),forward<Args>(args)...);
	}
};
template<class Fun> [[nodiscard]] decltype(auto) fix(Fun &&fun) {
	return _y_combinator_result<decay_t<Fun>>(forward<Fun>(fun));
}
#define nop void()
#define sz(x) (int((x).size()))
#define all(v) (v).begin(),(v).end()
#define forenum(i,...) for(int i:{-1}) for(__VA_ARGS__) if(++i,0) assert(0); else
#define forenumll(i,...) for(long long i:{-1}) for(__VA_ARGS__) if(++i,0) assert(0); else
#define forbs(k,i,bs) for(ptrdiff_t k=0,i=(bs)._Find_first();i<(ptrdiff_t)(bs).size();i=(bs)._Find_next(i),++k)
#define fordbs(k,i,bs) for(ptrdiff_t k=0,i=(bs).find_first();i<(ptrdiff_t)(bs).size();i=(bs).find_next(i),++k)
#define get(x,i) get<i>(x)
template<class T> T &smin(T &x,const T &y) { return y<x?x=y:x; }
template<class T> T &smax(T &x,const T &y) { return y>x?x=y:x; }
template<class T> bool inb(const T &x,const T &l,const T &r) { return l<=x&&x<=r; }
template<class T> bool cinb(const T &x,const T &l,const T &r) { return l<=r?l<=x&&x<=r:l<=x||x<=r; }
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
template<template<class> class C,class T> T popv(C<T> &v) { T z=v.back(); v.pop_back(); return z; }
template<template<class> class C,class T> T popq(C<T> &v) { T z=v.front(); v.pop(); return z; }
template<template<class> class C,class T> T pops(C<T> &v) { T z=*v.begin(); v.erase(v.begin()); return z; }
template<template<class,class> class C,class K,class V> pair<K,V> popm(C<K,V> &v) { pair<K,V> z=*v.begin(); v.erase(v.begin()); return z; }
template<template<class> class C,class T> void erase1(C<T> &v,const T &x) { v.erase(v.find(x)); }
template<template<class> class C,class T> int lbi(C<T> &v,const T &x) { return int(lower_bound(all(v),x)-v.begin()); }
template<template<class> class C,class T> int findi(C<T> &v,const T &x) { auto it=lower_bound(all(v),x); return it!=v.end()&&*it==x?int(it-v.begin()):-1; }
template<class V> int sortu(V &v) { sort(all(v)); int z=int(unique(all(v))-v.begin()); v.resize(z); return z; }
template<typename T,typename... Args> T tee(T (*f)(Args... args),Args&&... args) { T z=f(forward<Args>(args)...); cout<<z<<endl; return z; }
template<typename... Args> void tee(void (*f)(Args... args),Args&&... args) { f(forward<Args>(args)...); }
#ifdef EXTS
template<class S,class T> using omap=__gnu_pbds::tree<S,T,less<S>,__gnu_pbds::rb_tree_tag,__gnu_pbds::tree_order_statistics_node_update>;
template<class T> using oset=omap<T,__gnu_pbds::null_type>;
template<class T> using rope=__gnu_cxx::rope<T>;
using dbitset=tr2::dynamic_bitset<>;
#endif
constexpr int e0=1, e1=10, e2=100, e3=1000;
constexpr int e4=10*e3, e5=100*e3, e6=1000*e3;
constexpr int e7=10*e6, e8=100*e6, e9=1000*e6;
constexpr long long e10=10LL*e9, e11=100LL*e9, e12=1000LL*e9;
constexpr long long e13=10*e12, e14=100*e12, e15=1000*e12;
constexpr long long e16=10*e15, e17=100*e15, e18=1000*e15;
constexpr __int128_t e21=__int128_t(e3)*e18, e24=__int128_t(e6)*e18, e27=__int128_t(e9)*e18;
constexpr __int128_t e30=e3*e27, e33=e6*e27, e36=e9*e27;
using ulll=__uint128_t;
using lll=__int128_t;
using ull=unsigned long long;
using ll=long long;
using uint=unsigned int;
using ushort=unsigned short;
using uchar=char;
using ld=long double;
#ifdef EXTS
using lld=__float128;
#endif
long long START_TIME=chrono::duration_cast<chrono::microseconds>(chrono::steady_clock::now().time_since_epoch()).count();
inline long long now_U_03BC_s() { return chrono::duration_cast<chrono::microseconds>(chrono::steady_clock::now().time_since_epoch()).count()-START_TIME; }
const char *fmt_time(long long U_03BC_s=now_U_03BC_s()) { static char dur[20]; sprintf(dur,"%llu.%03llus",U_03BC_s/e6,(U_03BC_s%e6)/e3); return dur; }
#define timed(cb) do { dbg("timed "#cb" ..."); unsigned long long start=now_U_03BC_s(); cb; dbg("timed "#cb" took",fmt_time(now_U_03BC_s()-start)); } while(0)
int arg1; bool inp; vector<string> args;
unsigned seed=unsigned(JO&&getenv("sd")?atoi(getenv("sd")):OJ?START_TIME:START_TIME%e5);
mt19937 igen(seed<<1),gen(seed<<1|1);
#define irand(...) (assert(!inp),_rand(igen,__VA_ARGS__))
#define rand(...) _rand(gen,__VA_ARGS__)
template<class T> enable_if_t<numeric_limits<T>::is_integer,T> _rand(mt19937 &g,T l,T r) { return uniform_int_distribution<T>(l,r)(g); }
template<class T> enable_if_t<numeric_limits<T>::is_integer,T> _rand(mt19937 &g,T n) { return _rand(g,T(1),n); }
[[deprecated]] int _rand(mt19937 &g) { return _rand(g,0,numeric_limits<int>::max()); }
template<class T> enable_if_t<numeric_limits<T>::is_iec559,T> _rand(mt19937 &g,T l,T r) { return uniform_real_distribution<T>(l,r)(g); }
bool _rand(mt19937 &g,double p) { return bernoulli_distribution(p)(g); }
template<class T> T _rand(mt19937 &g,initializer_list<T> il) { return *(il.begin()+_rand(g,0,(int)il.size()-1)); }
template<class T> T _rand(mt19937 &g,double p,T a,T b) { return _rand(g,p)?a:b; }
template<class T> T _rand(mt19937 &g,initializer_list<T> il,initializer_list<double> wt) { assert(il.size()==wt.size()); return *(il.begin()+discrete_distribution<int>(wt)(g)); }
#define random_shuffle(...) static_assert(false,"random_shuffle deprecated, use shuffle")
#define ine(x,e) (inp?cin>>(x),nop:((x)=(e),nop))
#define inr(x,...) ine(x,irand(__VA_ARGS__))
#define endl '\n'
string garb;
void exit0() { DBG=1; dbgt("gg (early)",seed); exit(0); }
#ifndef MAIN
#define MAIN _main
#endif
void MAIN();
int32_t main([[maybe_unused]]int argc,[[maybe_unused]]char *argv[]) {
	ios_base::sync_with_stdio(0); cin.tie(0); cin.exceptions(ios_base::failbit | ios_base::badbit);
	arg1=0,args={argv,argv+argc};
	if(sz(args)>1) {
		if(args[1][0]=='i') freopen((string(__FILE__).substr(0,string(__FILE__).find('.'))+"."+args[1].substr(1)+".in").c_str(),"r",stdin);
		else if(args[1][0]=='I') freopen(args[1].substr(1).c_str(),"r",stdin);
		else arg1=stoi(args[1]);
	}
	inp=!arg1;
	if(JO && getenv("EMACS")) EMACS=1;
	dbgt(arg1,seed,args);
	#ifdef QUIET
	DBG=0;
	#endif
	MAIN();
	DBG=1;
	dbgt("gg;wp",seed);
	return 0;
}
constexpr int inf=e9+99;
constexpr ll linf=1LL*e9*e9+99;
#if __cplusplus >= 202002L
constexpr long double U_03C4__ld=2*numbers::pi_v<long double>;
#else
const long double U_03C4__ld=2*acosl(-1);
#endif
#define U_03C4_ ((flt)U_03C4__ld)
constexpr long double U_03B5__ld=1e-8l;
#define U_03B5_ ((flt)U_03B5__ld)
// }}}
using flt=double; //CARE
constexpr int P=e9+7;//998'244'353;





auto solve() { /* CURSOR START */
	int n; ine(n,arg1);
	vector<ll> a(n); for(ll &x:a) inr(x,e18);
	sort(all(a));
	map<ll,ll> dp;
	dp[a.back()]=0; a.pop_back();
	reverse(all(a));
	for(ll x:a) {
		ll z=linf;
		for(int k:{1,2,3,4,5,6}) {
			auto it=dp.lower_bound(x*k);
			if(it==dp.begin()) continue;
			--it;
			smin(z,it->se+it->fi/x);
		}
		for(int k:{6}) {
			auto it=dp.lower_bound(x*k);
			if(it==dp.end()) continue;
			smin(z,it->se+it->fi/x);
		}
		if(n<20) dbg(x,z);
		dp[x]=z;
	}
	return dp.begin()->se;
}



void _main() { int NTC=1;
	// ine(NTC,5);
	for(int TC=1;TC<=NTC;TC++) {
		// cout<<"Case #"<<TC<<": ";
		tee(solve);
	}
	if(JO&&inp) assert((cin>>ws).eof());
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3804kb

input:

3
2 3 6

output:

3

result:

ok "3"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

2
15 4

output:

3

result:

ok "3"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

9
284791808 107902 13660981249408 4622332661 13405199 24590921 361 244448137 16077087227955422

output:

4580

result:

ok "4580"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

9
12 9 5 17 2 6 7 1 15

output:

6

result:

ok "6"

Test #5:

score: 0
Accepted
time: 0ms
memory: 3680kb

input:

10
19 13 18 11 20 16 6 8 17 3

output:

4

result:

ok "4"

Test #6:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

8
5 7 11 16 2 15 1 20

output:

7

result:

ok "7"

Test #7:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

10
13 2 19 11 15 9 16 5 12 1

output:

7

result:

ok "7"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3684kb

input:

8
9 1 14 11 3 12 8 20

output:

7

result:

ok "7"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

4
4 6 20 3

output:

5

result:

ok "5"

Test #10:

score: 0
Accepted
time: 0ms
memory: 3708kb

input:

382
1495 1297 1197 976 1335 486 1850 992 1483 1269 1898 1593 237 1342 711 957 1992 1401 1413 206 917 1831 1444 698 1291 1987 231 1559 1119 1822 1790 471 736 496 1157 1886 1974 699 1702 321 325 758 683 1826 1051 95 632 456 1224 1590 1394 1854 1226 1963 1926 1819 989 34 980 371 535 807 1541 144 433 12...

output:

11

result:

ok "11"

Test #11:

score: 0
Accepted
time: 1ms
memory: 3564kb

input:

317
1565 1374 387 1215 766 1670 862 673 1391 70 727 152 182 26 1111 1430 64 1318 349 994 780 1762 1993 552 715 1943 967 972 1039 646 617 1822 373 486 1863 1179 1840 1781 1963 220 773 671 126 613 719 1660 334 1851 65 707 1862 490 1466 1590 1717 1723 656 1526 1138 31 1976 1823 1335 1719 397 612 593 13...

output:

8

result:

ok "8"

Test #12:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

100
1070 947 7 1735 476 1172 995 2000 536 15 1499 656 1810 1435 639 1647 61 630 4 754 1594 442 1644 1743 5 629 1879 1707 1174 1984 1526 1829 1449 783 1483 1734 1032 494 537 1872 1117 1316 1069 780 520 689 31 1970 1653 1071 251 360 1063 988 1154 638 547 525 264 495 273 436 967 633 462 1863 164 402 18...

output:

12

result:

ok "12"

Test #13:

score: 0
Accepted
time: 1ms
memory: 3688kb

input:

495
368 27 1415 966 351 1575 449 1982 15 1207 1806 1483 1304 1488 750 1751 1047 314 1833 1365 1281 589 1062 419 1430 345 41 230 1248 11 338 1139 1146 1892 281 1994 950 26 1247 817 1250 131 1954 631 1020 1705 382 220 172 1434 1841 1866 849 793 1236 53 1275 1366 1038 1889 615 1652 218 1862 84 377 76 1...

output:

19

result:

ok "19"

Test #14:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

452
1711 258 865 1330 1923 4 1656 652 1660 1768 603 1841 646 1810 1235 200 503 1083 418 511 1803 886 54 213 1914 734 1531 1941 272 1686 1873 1831 1367 1746 141 404 1538 989 768 1830 1684 426 527 1872 1105 1655 540 1444 331 767 1896 49 1141 921 772 307 614 764 848 1997 1406 339 63 828 416 1891 1925 6...

output:

11

result:

ok "11"

Test #15:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

61
320 456 426 201 1105 1894 570 661 1307 618 956 1185 1241 6 574 1236 604 462 1900 1488 697 1688 1085 775 635 747 1252 1721 431 192 768 1798 1712 686 1496 932 1309 1431 904 1467 1863 804 856 1682 1159 78 1276 211 942 848 270 225 117 302 1418 1951 534 1345 591 110 1967

output:

19

result:

ok "19"

Test #16:

score: 0
Accepted
time: 3ms
memory: 4104kb

input:

6007
926195740081456592 954460021832145143 601395744686943902 21575530228356921 463431657670752021 711276919720293649 916086948281828983 942717046975828490 627872019769751663 375556646744053894 531095909932455304 993855300776486066 208335586285140634 319193845177757965 985795314563730251 10507706789...

output:

12

result:

ok "12"

Test #17:

score: 0
Accepted
time: 5ms
memory: 4044kb

input:

8261
284791808 107902 13660981249408 4622332661 13405199 24590921 361 244448137 16077087227955422 29020 2999 243823 11405 3084850839644 51410 1293 598217528 6419212814 19670 42431 16305842936592 588083868939790 35416223344083524 1670928183457 462015428 19431 7573789315 819 4594126473685 8554104 1422...

output:

63

result:

ok "63"

Test #18:

score: 0
Accepted
time: 3ms
memory: 4100kb

input:

6015
358871240359366151 224257618022883235 172819476860570817 75125953034362365 824984506523526062 988848382335902687 898522089822105149 755567463105677238 970409760639198928 430709898290812041 779827111538256956 857511190324448260 329465323773300663 685019732014997951 197724427289098867 15126091335...

output:

14

result:

ok "14"

Test #19:

score: 0
Accepted
time: 2ms
memory: 3824kb

input:

2319
7 769 14566 213732121851657504 3031249 117432 1853 43404611161 2137819942 2525662612281 575 628859144901512192 82402637244386 570993657677445760 244 540730562 190876 146904 11282 2881663495750947 36247 410727237 100465424998099 48557284 334485561776644672 1611191 191632019669065056 203 2122865 ...

output:

64

result:

ok "64"

Test #20:

score: 0
Accepted
time: 2ms
memory: 3944kb

input:

3647
191274254202747070 816451465136605666 632954453162088720 316484101993458936 400530481203520131 36361261508615425 107377728836074713 479766874026239333 132490733793819615 701342570200191348 393529093120808255 997930221798392349 37262148109322604 236346409115411 445572155956552286 578658600443172...

output:

15

result:

ok "15"

Test #21:

score: 0
Accepted
time: 1ms
memory: 3808kb

input:

2459
1418053410414 637622553455 1470 1931006024625 27526276968 4967139053 521674647989055 186443981371189 39480756299336 95680188183 2727948481 557901603 11423 10709859272749 242760849 307283093727562688 42213 3181 518822290138407936 1532145441957570 40684208181105 254735022780282 56 58 5905 166 193...

output:

63

result:

ok "63"

Test #22:

score: 0
Accepted
time: 80ms
memory: 11344kb

input:

113844
462209310844307827 895186606000026911 536883699910050004 923768182795407203 116843726498620270 837342622857072639 5401336272754811 956408591677017253 644988425043116019 643246228819184945 544277427880226394 694401128212891523 352892254813391858 739821579965916396 991683818573040504 7744776087...

output:

16

result:

ok "16"

Test #23:

score: 0
Accepted
time: 186ms
memory: 16964kb

input:

194435
2691485 412893522790905728 14698764318 223230348450 79466646146 106916997248562 668789825 15651263346034818 6602164367069652 7736843382176793 398591166927295 21282612274422 12609786010 463 73237470025259248 1756698204 17854370570384 364588 13045 1165416117509 22557532638431 28889662774652 649...

output:

62

result:

ok "62"

Test #24:

score: 0
Accepted
time: 12ms
memory: 5400kb

input:

28233
492525631319916156 711072765816623886 459232417094360150 178798507591150604 353974036315601613 194110040523143355 505141911910923391 664035751438995680 165712677460360109 173043053636817457 846663981201087731 374037523526255941 615493493779455262 402943770653209584 177780263822236862 587639656...

output:

19

result:

ok "19"

Test #25:

score: 0
Accepted
time: 80ms
memory: 9972kb

input:

95668
3858000880 60795117 38235057004215 298098951 64314296133179 18833904350356 120770850925 2774944191269 255141101 4154206501543 21211992074 2182387455404017 1081676 363628 100215812 2894 4715142770132 3907947523860996 14800803990578786 1539665 336976382981 346697971791917 14189195 1223709102 125...

output:

62

result:

ok "62"

Test #26:

score: 0
Accepted
time: 97ms
memory: 12860kb

input:

138737
344080383853530510 506164534912392073 139977616575079622 514052853498838453 152764635074458728 832083649720388173 993219396611857398 879660925480156303 453759956308175743 160600829699596235 323853232622454230 723843069506245926 575269759636569718 168343487411019088 838968602347042497 57119631...

output:

22

result:

ok "22"

Test #27:

score: 0
Accepted
time: 80ms
memory: 10428kb

input:

100166
1151157553 836591449264925312 313948 2676928393605 13001634471019 99365359359285008 769801072 697627803298476 191573 113952 845016 127215 11816661249 1354142147467898 457548 38436728826913 653 1401486 180932188831607 392180 225912447 52306519486088240 107369540422594 273624 1554040 370171615 ...

output:

62

result:

ok "62"

Test #28:

score: 0
Accepted
time: 148ms
memory: 17492kb

input:

200000
920958999654769887 44652757342146560 588489988140055764 699663983847393136 315612138966758196 363575024892322674 672781839441013508 88936379681887294 804875024546631171 658554778695822095 286444958264530140 23178858151405656 799137576073800100 663360499806895180 970593772223770261 59102126259...

output:

18

result:

ok "18"

Test #29:

score: 0
Accepted
time: 187ms
memory: 17372kb

input:

200000
174039034751809 3913449945 1231151041349148 1716357008 387750331009 265833 2128290757998 1581879 6554637 10528531 825870 54581638747659 61324040385337 73724654248641 2437818 2432559052495 1157877982 21743686292271 2608906738 17773353689 1340616779510480 212791991 6356509296744 27163067 371427...

output:

62

result:

ok "62"

Test #30:

score: 0
Accepted
time: 176ms
memory: 17364kb

input:

200000
608206876488013963 765742835263016526 404552338643357901 106165943051038032 661019497372534691 826671466097675376 154008041242843652 349350716523790060 114843035991741400 923861710816630325 502676115113668896 370704897782885594 937730204337141988 341874145536678500 893689026695611024 36360588...

output:

19

result:

ok "19"

Test #31:

score: 0
Accepted
time: 186ms
memory: 17348kb

input:

200000
147868401596385856 216988611781312 3142577822912 15277293516341 117746406342738 256984283219 564300524272028224 733656753 48331071205 455402217 6028756 12485 33225 271076 119063025316758624 9358818030569930 924666 492150932707103040 203341335439014 4385930676651 27248614129 14439049 186662971...

output:

62

result:

ok "62"

Test #32:

score: 0
Accepted
time: 132ms
memory: 17324kb

input:

200000
951721177876293159 170996162850303371 799238425724097973 477741534830539723 995930401206693919 657374179590985166 329086821700411311 609454572273843502 54543294048485422 819305692977092597 596293161077766507 894898386836465941 68509791070187014 364976989437807875 523648367694886346 7725358029...

output:

18

result:

ok "18"

Test #33:

score: 0
Accepted
time: 174ms
memory: 17368kb

input:

200000
935075 5200293 660465 12624 287192907 760535865 23881028 79277607409072560 90163533257784 345142177 3989 12145088 415115636533749248 1496354690718777 125569825487850 325525721 895741 35120072566556 30876357000311232 7442 57056874945 15011529 890928819587 11137912789 99883451555613712 26285956...

output:

62

result:

ok "62"

Test #34:

score: 0
Accepted
time: 125ms
memory: 17416kb

input:

200000
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...

output:

20

result:

ok "20"

Test #35:

score: 0
Accepted
time: 96ms
memory: 17488kb

input:

200000
200000 200001 200002 200003 200004 200005 200006 200007 200008 200009 200010 200011 200012 200013 200014 200015 200016 200017 200018 200019 200020 200021 200022 200023 200024 200025 200026 200027 200028 200029 200030 200031 200032 200033 200034 200035 200036 200037 200038 200039 200040 200041...

output:

1

result:

ok "1"

Test #36:

score: 0
Accepted
time: 127ms
memory: 17428kb

input:

200000
223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 2...

output:

10

result:

ok "10"

Test #37:

score: 0
Accepted
time: 88ms
memory: 17424kb

input:

200000
191759 191760 191761 191762 191763 191764 191765 191766 191767 191768 191769 191770 191771 191772 191773 191774 191775 191776 191777 191778 191779 191780 191781 191782 191783 191784 191785 191786 191787 191788 191789 191790 191791 191792 191793 191794 191795 191796 191797 191798 191799 191800...

output:

2

result:

ok "2"

Test #38:

score: 0
Accepted
time: 119ms
memory: 17420kb

input:

200000
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 2...

output:

11

result:

ok "11"

Test #39:

score: 0
Accepted
time: 99ms
memory: 17420kb

input:

200000
114853 114854 114855 114856 114857 114858 114859 114860 114861 114862 114863 114864 114865 114866 114867 114868 114869 114870 114871 114872 114873 114874 114875 114876 114877 114878 114879 114880 114881 114882 114883 114884 114885 114886 114887 114888 114889 114890 114891 114892 114893 114894...

output:

2

result:

ok "2"

Test #40:

score: 0
Accepted
time: 0ms
memory: 3572kb

input:

2
1 1000000000000000000

output:

1000000000000000000

result:

ok "1000000000000000000"

Test #41:

score: 0
Accepted
time: 103ms
memory: 17336kb

input:

200000
1 999999999999800002 999999999999800003 999999999999800004 999999999999800005 999999999999800006 999999999999800007 999999999999800008 999999999999800009 999999999999800010 999999999999800011 999999999999800012 999999999999800013 999999999999800014 999999999999800015 999999999999800016 999999...

output:

999999999999800003

result:

ok "999999999999800003"

Test #42:

score: 0
Accepted
time: 120ms
memory: 17364kb

input:

200000
3 4 16 17 18 19 20 21 22 23 24 25 26 27 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 2...

output:

119

result:

ok "119"

Test #43:

score: -100
Wrong Answer
time: 123ms
memory: 17368kb

input:

200000
6 7 8 9 10 11 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 109 110 111 112 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 44...

output:

111

result:

wrong answer 1st words differ - expected: '110', found: '111'