QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#336302 | #8281. Pangu and Stones | ucup-team112# | AC ✓ | 33ms | 11904kb | C++20 | 10.2kb | 2024-02-24 14:46:56 | 2024-02-24 14:46:57 |
Judging History
answer
//#define _GLIBCXX_DEBUG
//#pragma GCC target("avx2")
//#pragma GCC optimize("O3")
//#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include <debug_print.hpp>
#define OUT(...) debug_print::multi_print(#__VA_ARGS__, __VA_ARGS__)
#else
#define OUT(...) (static_cast<void>(0))
#endif
#define endl '\n'
#define lfs cout<<fixed<<setprecision(15)
#define ALL(a) (a).begin(),(a).end()
#define ALLR(a) (a).rbegin(),(a).rend()
#define UNIQUE(a) (a).erase(unique((a).begin(),(a).end()),(a).end())
#define spa << " " <<
#define fi first
#define se second
#define MP make_pair
#define MT make_tuple
#define PB push_back
#define EB emplace_back
#define rep(i,n,m) for(ll i = (n); i < (ll)(m); i++)
#define rrep(i,n,m) for(ll i = (ll)(m) - 1; i >= (ll)(n); i--)
using ll = long long;
using ld = long double;
const ll MOD1 = 1e9+7;
const ll MOD9 = 998244353;
const ll INF = 1e18;
using P = pair<ll, ll>;
template<typename T> using PQ = priority_queue<T>;
template<typename T> using QP = priority_queue<T,vector<T>,greater<T>>;
template<typename T1, typename T2>bool chmin(T1 &a,T2 b){if(a>b){a=b;return true;}else return false;}
template<typename T1, typename T2>bool chmax(T1 &a,T2 b){if(a<b){a=b;return true;}else return false;}
ll median(ll a,ll b, ll c){return a+b+c-max({a,b,c})-min({a,b,c});}
void ans1(bool x){if(x) cout<<"Yes"<<endl;else cout<<"No"<<endl;}
void ans2(bool x){if(x) cout<<"YES"<<endl;else cout<<"NO"<<endl;}
void ans3(bool x){if(x) cout<<"Yay!"<<endl;else cout<<":("<<endl;}
template<typename T1,typename T2>void ans(bool x,T1 y,T2 z){if(x)cout<<y<<endl;else cout<<z<<endl;}
template<typename T1,typename T2,typename T3>void anss(T1 x,T2 y,T3 z){ans(x!=y,x,z);};
template<typename T>void debug(const T &v,ll h,ll w,string sv=" "){for(ll i=0;i<h;i++){cout<<v[i][0];for(ll j=1;j<w;j++)cout<<sv<<v[i][j];cout<<endl;}};
template<typename T>void debug(const T &v,ll n,string sv=" "){if(n!=0)cout<<v[0];for(ll i=1;i<n;i++)cout<<sv<<v[i];cout<<endl;};
template<typename T>void debug(const vector<T>&v){debug(v,v.size());}
template<typename T>void debug(const vector<vector<T>>&v){for(auto &vv:v)debug(vv,vv.size());}
template<typename T>void debug(stack<T> st){while(!st.empty()){cout<<st.top()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(queue<T> st){while(!st.empty()){cout<<st.front()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(deque<T> st){while(!st.empty()){cout<<st.front()<<" ";st.pop_front();}cout<<endl;}
template<typename T>void debug(PQ<T> st){while(!st.empty()){cout<<st.top()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(QP<T> st){while(!st.empty()){cout<<st.top()<<" ";st.pop();}cout<<endl;}
template<typename T>void debug(const set<T>&v){for(auto z:v)cout<<z<<" ";cout<<endl;}
template<typename T>void debug(const multiset<T>&v){for(auto z:v)cout<<z<<" ";cout<<endl;}
template<typename T,size_t size>void debug(const array<T, size> &a){for(auto z:a)cout<<z<<" ";cout<<endl;}
template<typename T,typename V>void debug(const map<T,V>&v){for(auto z:v)cout<<"["<<z.first<<"]="<<z.second<<",";cout<<endl;}
template<typename T>vector<vector<T>>vec(ll x, ll y, T w){vector<vector<T>>v(x,vector<T>(y,w));return v;}
vector<ll>dx={1,-1,0,0,1,1,-1,-1};vector<ll>dy={0,0,1,-1,1,-1,1,-1};
template<typename T>vector<T> make_v(size_t a,T b){return vector<T>(a,b);}
template<typename... Ts>auto make_v(size_t a,Ts... ts){return vector<decltype(make_v(ts...))>(a,make_v(ts...));}
template<typename T1, typename T2>ostream &operator<<(ostream &os, const pair<T1, T2>&p){return os << "(" << p.first << "," << p.second << ")";}
template<typename T>ostream &operator<<(ostream &os, const vector<T> &v){os<<"[";for(auto &z:v)os << z << ",";os<<"]"; return os;}
template<typename T>void rearrange(vector<int>&ord, vector<T>&v){
auto tmp = v;
for(int i=0;i<tmp.size();i++)v[i] = tmp[ord[i]];
}
template<typename Head, typename... Tail>void rearrange(vector<int>&ord,Head&& head, Tail&&... tail){
rearrange(ord, head);
rearrange(ord, tail...);
}
template<typename T> vector<int> ascend(const vector<T>&v){
vector<int>ord(v.size());iota(ord.begin(),ord.end(),0);
sort(ord.begin(),ord.end(),[&](int i,int j){return make_pair(v[i],i)<make_pair(v[j],j);});
return ord;
}
template<typename T> vector<int> descend(const vector<T>&v){
vector<int>ord(v.size());iota(ord.begin(),ord.end(),0);
sort(ord.begin(),ord.end(),[&](int i,int j){return make_pair(v[i],-i)>make_pair(v[j],-j);});
return ord;
}
template<typename T> vector<T> inv_perm(const vector<T>&ord){
vector<T>inv(ord.size());
for(int i=0;i<ord.size();i++)inv[ord[i]] = i;
return inv;
}
ll FLOOR(ll n,ll div){assert(div>0);return n>=0?n/div:(n-div+1)/div;}
ll CEIL(ll n,ll div){assert(div>0);return n>=0?(n+div-1)/div:n/div;}
ll digitsum(ll n){ll ret=0;while(n){ret+=n%10;n/=10;}return ret;}
ll modulo(ll n,ll d){return (n%d+d)%d;};
template<typename T>T min(const vector<T>&v){return *min_element(v.begin(),v.end());}
template<typename T>T max(const vector<T>&v){return *max_element(v.begin(),v.end());}
template<typename T>T acc(const vector<T>&v){return accumulate(v.begin(),v.end(),T(0));};
template<typename T>T reverse(const T &v){return T(v.rbegin(),v.rend());};
//mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
int popcount(ll x){return __builtin_popcountll(x);};
int poplow(ll x){return __builtin_ctzll(x);};
int pophigh(ll x){return 63 - __builtin_clzll(x);};
template<typename T>T poll(queue<T> &q){auto ret=q.front();q.pop();return ret;};
template<typename T>T poll(priority_queue<T> &q){auto ret=q.top();q.pop();return ret;};
template<typename T>T poll(QP<T> &q){auto ret=q.top();q.pop();return ret;};
template<typename T>T poll(stack<T> &s){auto ret=s.top();s.pop();return ret;};
ll MULT(ll x,ll y){if(LLONG_MAX/x<=y)return LLONG_MAX;return x*y;}
ll POW2(ll x, ll k){ll ret=1,mul=x;while(k){if(mul==LLONG_MAX)return LLONG_MAX;if(k&1)ret=MULT(ret,mul);mul=MULT(mul,mul);k>>=1;}return ret;}
ll POW(ll x, ll k){ll ret=1;for(int i=0;i<k;i++){if(LLONG_MAX/x<=ret)return LLONG_MAX;ret*=x;}return ret;}
std::ostream &operator<<(std::ostream &dest, __int128_t value) {
std::ostream::sentry s(dest);
if (s) {
__uint128_t tmp = value < 0 ? -value : value;
char buffer[128];
char *d = std::end(buffer);
do {
--d;
*d = "0123456789"[tmp % 10];
tmp /= 10;
} while (tmp != 0);
if (value < 0) {
--d;
*d = '-';
}
int len = std::end(buffer) - d;
if (dest.rdbuf()->sputn(d, len) != len) {
dest.setstate(std::ios_base::badbit);
}
}
return dest;
}
namespace converter{
int dict[500];
const string lower="abcdefghijklmnopqrstuvwxyz";
const string upper="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string digit="0123456789";
const string digit1="123456789";
void regi_str(const string &t){
for(int i=0;i<t.size();i++){
dict[t[i]]=i;
}
}
void regi_int(const string &t){
for(int i=0;i<t.size();i++){
dict[i]=t[i];
}
}
vector<int>to_int(const string &s,const string &t){
regi_str(t);
vector<int>ret(s.size());
for(int i=0;i<s.size();i++){
ret[i]=dict[s[i]];
}
return ret;
}
vector<int>to_int(const string &s){
auto t=s;
sort(t.begin(),t.end());
t.erase(unique(t.begin(),t.end()),t.end());
return to_int(s,t);
}
vector<vector<int>>to_int(const vector<string>&s,const string &t){
regi_str(t);
vector<vector<int>>ret(s.size(),vector<int>(s[0].size()));
for(int i=0;i<s.size();i++){
for(int j=0;j<s[0].size();j++){
ret[i][j]=dict[s[i][j]];
}
}
return ret;
}
vector<vector<int>>to_int(const vector<string>&s){
string t;
for(int i=0;i<s.size();i++){
t+=s[i];
}
sort(t.begin(),t.end());t.erase(unique(t.begin(),t.end()),t.end());
return to_int(s,t);
}
string to_str(const vector<int>&s,const string &t){
regi_int(t);
string ret;
for(auto z:s)ret+=dict[z];
return ret;
}
vector<string> to_str(const vector<vector<int>>&s,const string &t){
regi_int(t);
vector<string>ret(s.size());
for(int i=0;i<s.size();i++){
for(auto z:s[i])ret[i]+=dict[z];
}
return ret;
}
}
template< typename T = int >
struct edge {
int to;
T cost;
int id;
edge():to(-1),id(-1){};
edge(int to, T cost = 1, int id = -1):to(to), cost(cost), id(id){}
operator int() const { return to; }
};
template<typename T>
using Graph = vector<vector<edge<T>>>;
template<typename T>
Graph<T>revgraph(const Graph<T> &g){
Graph<T>ret(g.size());
for(int i=0;i<g.size();i++){
for(auto e:g[i]){
int to = e.to;
e.to = i;
ret[to].push_back(e);
}
}
return ret;
}
template<typename T>
Graph<T> readGraph(int n,int m,int indexed=1,bool directed=false,bool weighted=false){
Graph<T> ret(n);
for(int es = 0; es < m; es++){
int u,v;
T w=1;
cin>>u>>v;u-=indexed,v-=indexed;
if(weighted)cin>>w;
ret[u].emplace_back(v,w,es);
if(!directed)ret[v].emplace_back(u,w,es);
}
return ret;
}
template<typename T>
Graph<T> readParent(int n,int indexed=1,bool directed=true){
Graph<T>ret(n);
for(int i=1;i<n;i++){
int p;cin>>p;
p-=indexed;
ret[p].emplace_back(i);
if(!directed)ret[i].emplace_back(p);
}
return ret;
}
void solve(){
ll res=0,buf=0;
bool judge = true;
ll n,L,R;cin>>n>>L>>R;
auto dp=make_v(n+1,n+1,n+1,INF);
vector<ll>a(n),b(n+1);
rep(i,0,n)cin>>a[i];
rep(i,0,n)b[i+1]=a[i]+b[i];
rrep(l,0,n){
rep(r,l+1,n+1){
if(l+1==r){
dp[l][r][1]=0;
continue;
}
rep(m,l+1,r){
rep(cl,1,m-l+1){
rep(cr,1,r-m+1){
if(cl==1&&cr==1&&r-l==2)OUT(l,m,r,dp[l][m][cl],dp[m][r][cr]);
chmin(dp[l][r][cl+cr],dp[l][m][cl]+dp[m][r][cr]);
}
}
}
//OUT(l,r,dp[l][r]);
rep(c,L,R+1){
chmin(dp[l][r][1],dp[l][r][c]+b[r]-b[l]);
}
}
}
//OUT(dp);
anss(dp[0][n][1],INF,0);
}
int main(){
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
ll res=0,buf=0;
bool judge = true;
int T = 1;
//cin>>T;
while(T--){
solve();
}
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3556kb
input:
3 2 2 1 2 3
output:
9
result:
ok 1 number(s): "9"
Test #2:
score: 0
Accepted
time: 0ms
memory: 3560kb
input:
3 2 3 1 2 3
output:
6
result:
ok 1 number(s): "6"
Test #3:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
4 3 3 1 2 3 4
output:
0
result:
ok 1 number(s): "0"
Test #4:
score: 0
Accepted
time: 31ms
memory: 11844kb
input:
100 4 7 570 608 194 26 243 470 418 119 1000 936 440 302 797 155 676 283 869 60 959 793 158 397 808 656 379 316 485 854 753 280 543 435 756 822 106 561 402 347 99 739 8 682 834 549 812 32 338 765 699 575 575 785 171 504 335 113 284 612 276 518 835 677 865 900 687 48 859 179 343 318 626 812 523 11 400...
output:
120446
result:
ok 1 number(s): "120446"
Test #5:
score: 0
Accepted
time: 33ms
memory: 11772kb
input:
100 35 76 322 199 744 64 89 251 274 508 722 852 273 341 916 231 495 767 852 260 717 813 346 694 113 796 571 754 603 660 271 915 819 330 116 925 301 1 83 769 79 251 833 761 954 899 65 245 263 444 767 780 340 599 952 447 479 137 425 58 835 963 749 164 513 479 179 18 624 975 175 135 767 607 760 718 859...
output:
66473
result:
ok 1 number(s): "66473"
Test #6:
score: 0
Accepted
time: 32ms
memory: 11768kb
input:
100 5 88 407 187 244 913 687 507 292 248 848 218 328 78 836 803 625 476 353 897 826 342 545 622 408 777 332 556 497 913 20 428 634 319 417 734 276 968 174 264 734 73 236 2 697 57 997 361 200 680 124 746 270 503 3 922 941 864 789 27 420 152 21 154 640 881 143 623 815 197 766 781 305 359 765 938 271 7...
output:
51039
result:
ok 1 number(s): "51039"
Test #7:
score: 0
Accepted
time: 33ms
memory: 11744kb
input:
100 10 30 757 969 996 252 426 316 148 167 367 299 364 887 791 861 86 445 932 549 701 60 2 432 422 814 251 560 562 34 787 591 792 261 356 789 976 743 277 390 213 656 342 918 778 339 960 231 529 857 587 868 496 81 639 878 510 526 694 599 940 386 810 509 326 658 756 162 52 833 437 921 148 657 408 611 8...
output:
85346
result:
ok 1 number(s): "85346"
Test #8:
score: 0
Accepted
time: 29ms
memory: 11812kb
input:
100 5 15 394 173 353 18 68 682 94 444 733 179 231 63 124 470 788 939 26 816 745 545 8 991 644 421 953 406 709 74 731 625 462 367 468 610 555 585 114 555 964 417 371 45 705 55 718 464 765 23 418 540 813 475 854 192 811 201 705 409 30 991 3 781 916 372 811 503 507 64 250 774 21 766 839 538 546 577 133...
output:
94828
result:
ok 1 number(s): "94828"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
17 11 17 12 235 26 539 468 344 289 228 775 132 635 562 697 324 667 627 678
output:
7238
result:
ok 1 number(s): "7238"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3844kb
input:
3 3 3 591 250 723
output:
1564
result:
ok 1 number(s): "1564"
Test #11:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
11 3 5 981 876 196 456 185 437 754 485 380 724 193
output:
8723
result:
ok 1 number(s): "8723"
Test #12:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
8 4 8 26 623 957 307 182 220 509 28
output:
2852
result:
ok 1 number(s): "2852"
Test #13:
score: 0
Accepted
time: 1ms
memory: 3684kb
input:
21 4 6 222 739 682 294 434 799 222 253 380 968 14 65 189 136 887 746 236 679 49 689 213
output:
15764
result:
ok 1 number(s): "15764"
Test #14:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
5 2 3 869 357 842 309 381
output:
4266
result:
ok 1 number(s): "4266"
Test #15:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
14 4 8 709 845 858 321 754 69 105 822 274 196 638 595 144 79
output:
8950
result:
ok 1 number(s): "8950"
Test #16:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
13 7 9 782 880 951 605 855 727 937 841 408 366 499 348 703
output:
13004
result:
ok 1 number(s): "13004"
Test #17:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
3 2 3 76 930 611
output:
1617
result:
ok 1 number(s): "1617"
Test #18:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
12 5 8 407 430 224 576 919 133 350 112 853 619 751 179
output:
7620
result:
ok 1 number(s): "7620"
Test #19:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
5 2 3 269 962 839 910 649
output:
5699
result:
ok 1 number(s): "5699"
Test #20:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
20 3 9 585 847 141 296 730 94 236 403 223 162 439 163 597 764 325 493 919 795 810 64
output:
13659
result:
ok 1 number(s): "13659"
Test #21:
score: 0
Accepted
time: 26ms
memory: 10364kb
input:
94 3 25 908 507 942 189 166 793 557 246 680 678 607 721 19 387 940 529 539 902 91 163 189 351 597 35 992 514 991 615 817 384 996 58 813 685 905 267 555 595 104 467 527 6 189 707 593 327 76 163 772 473 473 524 959 391 30 560 511 228 857 380 811 401 931 37 167 674 674 192 762 553 807 496 368 42 393 14...
output:
78412
result:
ok 1 number(s): "78412"
Test #22:
score: 0
Accepted
time: 21ms
memory: 10584kb
input:
95 87 94 127 868 631 886 233 528 398 557 683 642 602 230 13 893 896 680 936 792 782 427 97 886 716 541 460 423 638 638 311 101 107 427 210 232 241 894 910 259 310 764 915 204 872 78 944 656 231 89 791 124 950 766 621 5 749 618 599 729 18 663 304 356 307 1 700 572 245 155 449 838 225 79 952 519 473 3...
output:
0
result:
ok 1 number(s): "0"
Test #23:
score: 0
Accepted
time: 23ms
memory: 10808kb
input:
96 43 56 537 36 23 878 491 367 944 867 495 606 109 332 223 102 341 24 933 978 874 692 109 910 348 47 145 140 580 364 100 115 514 308 904 291 472 329 456 522 925 60 814 402 660 449 102 472 386 230 513 263 211 711 476 131 173 677 494 527 771 842 309 119 979 966 530 982 113 822 840 610 450 879 25 803 4...
output:
62859
result:
ok 1 number(s): "62859"
Test #24:
score: 0
Accepted
time: 24ms
memory: 11104kb
input:
97 76 77 755 397 416 167 262 103 977 985 498 570 912 137 216 312 593 176 738 572 374 956 121 638 571 744 613 858 35 386 594 640 817 676 597 838 808 661 2 889 540 653 201 88 855 820 261 993 541 563 340 506 688 465 434 41 404 735 93 28 932 125 802 75 59 339 871 585 388 488 527 894 379 463 905 279 122 ...
output:
0
result:
ok 1 number(s): "0"
Test #25:
score: 0
Accepted
time: 26ms
memory: 11156kb
input:
98 86 93 677 861 105 864 521 646 819 295 605 727 907 134 722 522 845 519 31 462 873 516 541 469 395 250 786 767 977 409 679 654 224 341 290 192 336 992 549 449 555 246 293 582 346 895 315 322 400 1000 359 645 653 706 288 464 124 90 285 122 685 407 999 734 732 304 700 187 960 451 918 474 501 47 490 4...
output:
0
result:
ok 1 number(s): "0"
Test #26:
score: 0
Accepted
time: 27ms
memory: 11784kb
input:
99 16 23 600 29 794 152 588 189 660 606 120 691 710 939 524 731 801 671 836 648 669 781 553 493 322 460 767 485 432 431 173 372 335 710 495 35 567 427 391 8 170 734 192 780 133 74 474 843 555 141 81 887 721 460 950 886 547 852 884 623 438 586 788 497 404 269 234 893 827 118 309 951 430 631 563 744 9...
output:
88767
result:
ok 1 number(s): "88767"
Test #27:
score: 0
Accepted
time: 28ms
memory: 11904kb
input:
100 44 95 875 666 316 771 997 698 662 313 681 694 573 868 850 788 512 241 998 802 264 731 521 39 650 695 281 558 710 561 643 90 163 189 533 133 393 295 522 903 13 851 321 958 304 702 174 888 824 410 688 194 750 662 809 981 647 852 402 115 980 402 292 742 665 881 759 106 665 697 367 542 104 211 658 2...
output:
72079
result:
ok 1 number(s): "72079"
Test #28:
score: 0
Accepted
time: 20ms
memory: 10204kb
input:
94 79 81 462 985 195 966 149 781 713 133 120 717 697 859 534 304 558 87 557 655 31 941 699 30 158 243 213 566 600 485 43 358 799 195 818 285 339 342 793 298 396 582 604 357 378 790 701 571 990 118 886 229 270 641 151 329 917 373 558 840 72 293 850 975 666 186 848 798 273 30 415 340 118 711 243 472 8...
output:
0
result:
ok 1 number(s): "0"
Test #29:
score: 0
Accepted
time: 21ms
memory: 10460kb
input:
95 15 58 872 50 884 663 112 516 258 443 123 386 692 960 40 810 811 431 362 33 531 205 711 757 573 749 681 284 246 508 833 476 398 859 23 640 675 969 147 369 115 878 208 851 869 161 51 196 145 259 904 368 531 586 814 943 636 431 158 342 529 472 343 930 338 559 485 400 844 993 806 920 240 295 20 653 2...
output:
67988
result:
ok 1 number(s): "67988"
Test #30:
score: 0
Accepted
time: 26ms
memory: 10712kb
input:
96 81 87 91 218 573 951 179 59 99 49 934 350 199 61 842 724 767 286 655 627 326 469 427 589 205 959 662 1 701 234 622 193 805 36 12 187 202 300 694 929 26 175 595 48 656 236 618 716 4 889 923 611 8 340 668 662 60 490 349 139 282 755 644 101 714 332 19 106 712 660 493 204 465 583 900 937 498 934 302 ...
output:
0
result:
ok 1 number(s): "0"
Test #31:
score: 0
Accepted
time: 29ms
memory: 11128kb
input:
97 44 60 13 874 670 136 437 795 133 463 937 314 2 570 539 229 315 630 460 813 122 734 335 21 132 465 835 911 347 257 116 911 916 109 706 542 730 736 240 296 937 64 686 542 851 607 776 237 159 30 454 750 973 285 330 84 291 356 244 641 443 230 841 57 91 296 848 708 987 326 884 680 98 167 781 414 770 8...
output:
63841
result:
ok 1 number(s): "63841"
Test #32:
score: 0
Accepted
time: 25ms
memory: 10984kb
input:
98 41 60 127 43 358 129 208 338 974 774 748 278 997 671 341 143 567 781 753 703 814 102 346 853 252 970 7 332 801 575 609 436 515 478 103 88 65 67 82 855 552 360 882 740 343 978 127 566 18 467 176 696 746 335 992 698 714 711 36 142 196 217 630 820 763 669 189 414 855 289 571 261 324 751 557 890 850 ...
output:
65845
result:
ok 1 number(s): "65845"
Test #33:
score: 0
Accepted
time: 27ms
memory: 11752kb
input:
99 12 55 345 699 47 121 467 881 519 84 559 435 504 180 743 648 716 421 854 592 313 71 62 876 179 668 284 538 448 302 591 450 626 846 92 443 297 502 141 927 463 657 973 234 322 349 286 383 173 96 195 835 711 280 846 120 138 473 227 940 141 499 827 775 139 634 18 16 426 956 962 545 445 335 438 175 123...
output:
66028
result:
ok 1 number(s): "66028"
Test #34:
score: 0
Accepted
time: 25ms
memory: 11760kb
input:
100 79 100 132 143 378 548 685 686 521 791 121 542 663 110 661 897 643 799 720 851 13 317 30 422 403 903 502 611 319 432 869 168 262 621 346 541 122 370 759 14 114 773 806 116 301 977 986 428 250 773 802 246 740 483 809 215 830 369 449 431 195 211 627 724 696 247 248 230 264 831 916 625 823 723 533 ...
output:
48140
result:
ok 1 number(s): "48140"
Test #35:
score: 0
Accepted
time: 21ms
memory: 10232kb
input:
94 66 66 208 359 257 935 325 65 572 315 560 269 787 396 858 413 281 541 279 896 484 718 208 413 207 859 730 427 424 356 565 732 386 627 631 694 69 417 734 217 497 696 897 811 567 770 216 407 416 585 999 281 555 165 752 564 699 698 413 348 775 806 186 956 697 551 633 922 872 164 963 126 134 223 14 60...
output:
0
result:
ok 1 number(s): "0"
Test #36:
score: 0
Accepted
time: 26ms
memory: 10500kb
input:
95 79 79 426 823 946 927 391 800 413 921 267 425 294 201 659 919 533 693 380 785 279 983 220 141 134 365 607 849 70 378 59 450 793 996 620 240 404 44 385 776 408 289 285 9 58 949 375 736 571 214 722 420 520 214 414 986 227 52 309 146 232 89 383 720 369 924 974 524 443 127 650 706 63 807 895 83 578 2...
output:
0
result:
ok 1 number(s): "0"
Test #37:
score: 0
Accepted
time: 24ms
memory: 10888kb
input:
96 30 34 348 888 338 920 354 343 255 231 78 389 585 6 61 833 681 36 377 675 75 55 640 972 62 167 883 54 13 401 744 464 96 172 17 595 932 375 931 847 23 585 376 207 549 320 725 256 430 355 549 367 293 160 372 896 650 111 100 943 689 860 683 675 745 889 803 230 15 794 42 990 184 95 776 367 658 221 955...
output:
72695
result:
ok 1 number(s): "72695"
Test #38:
score: 0
Accepted
time: 28ms
memory: 11096kb
input:
97 44 46 462 56 27 913 421 79 96 542 185 354 92 107 862 338 934 188 478 565 767 616 652 700 989 673 352 476 467 423 534 989 503 245 518 142 460 810 774 703 230 178 979 997 40 691 884 777 585 688 567 801 66 913 226 318 370 169 291 445 146 847 472 334 122 854 337 128 586 460 729 467 114 679 656 140 93...
output:
0
result:
ok 1 number(s): "0"
Test #39:
score: 0
Accepted
time: 29ms
memory: 11180kb
input:
98 93 93 681 520 420 905 679 622 833 660 188 22 87 104 560 252 186 828 475 455 562 584 664 724 813 179 228 681 410 445 27 3 806 910 212 497 499 142 24 774 653 475 367 195 531 62 938 402 444 126 290 748 31 859 888 636 601 228 891 946 899 130 669 98 498 34 974 538 646 423 120 47 339 966 433 320 10 425...
output:
0
result:
ok 1 number(s): "0"
Test #40:
score: 0
Accepted
time: 27ms
memory: 11740kb
input:
99 8 31 899 881 5 898 450 357 675 266 999 986 594 909 362 566 438 979 280 537 62 848 572 556 36 684 505 103 864 172 817 720 213 279 905 43 27 873 378 333 267 67 458 392 318 137 97 923 599 267 117 183 804 612 742 58 25 286 786 744 356 309 162 53 170 999 803 436 217 90 511 331 460 550 313 605 579 919 ...
output:
73887
result:
ok 1 number(s): "73887"
Test #41:
score: 0
Accepted
time: 33ms
memory: 11904kb
input:
100 11 71 878 813 632 517 156 378 676 677 264 285 754 839 688 815 557 253 738 795 657 95 539 101 260 623 724 472 335 598 95 439 849 757 158 141 556 445 997 421 110 184 883 570 490 61 797 672 164 536 619 490 129 111 705 153 613 990 304 236 898 828 666 2 624 804 225 353 55 157 976 411 838 235 112 92 4...
output:
61654
result:
ok 1 number(s): "61654"
Test #42:
score: 0
Accepted
time: 21ms
memory: 10192kb
input:
94 49 92 465 836 510 7 308 757 728 793 703 13 581 829 181 330 899 99 297 136 232 304 717 988 64 876 951 288 736 226 688 3 678 763 739 294 798 979 268 623 790 915 382 970 563 854 324 651 330 244 113 525 840 793 752 798 586 319 756 152 286 720 225 530 920 917 418 45 663 298 616 720 149 735 594 37 762 ...
output:
0
result:
ok 1 number(s): "0"
Test #43:
score: 0
Accepted
time: 27ms
memory: 10452kb
input:
95 49 54 876 5 199 704 271 492 569 103 2 681 680 930 878 836 152 147 102 26 28 569 729 820 695 381 124 198 679 544 477 720 85 428 433 649 326 415 622 695 701 211 770 463 55 225 482 980 485 385 940 176 613 739 606 924 818 673 356 654 448 194 718 998 296 585 247 944 234 261 7 493 782 319 474 513 34 79...
output:
0
result:
ok 1 number(s): "0"
Test #44:
score: 0
Accepted
time: 23ms
memory: 10896kb
input:
96 74 77 94 365 592 993 337 35 114 414 517 133 379 735 680 750 404 595 395 620 16 537 445 548 623 79 104 915 133 567 971 542 196 605 830 195 662 746 873 550 420 508 669 661 738 596 537 796 344 14 662 610 578 788 268 834 241 732 251 451 201 181 19 657 969 254 588 354 806 928 886 777 7 310 355 798 114...
output:
0
result:
ok 1 number(s): "0"
Test #45:
score: 0
Accepted
time: 25ms
memory: 11108kb
input:
97 12 74 16 534 281 689 300 771 956 724 328 97 182 540 378 255 656 938 200 806 515 97 161 83 742 585 277 825 76 293 760 556 91 974 819 550 893 885 715 621 34 397 56 155 229 479 695 317 499 451 681 557 351 734 122 257 961 790 147 953 850 464 512 612 49 219 122 956 377 594 277 357 425 894 132 274 386 ...
output:
55507
result:
ok 1 number(s): "55507"
Test #46:
score: 0
Accepted
time: 30ms
memory: 10996kb
input:
98 13 75 234 894 970 682 367 314 989 842 331 62 690 345 179 169 612 90 493 696 15 362 173 107 670 387 745 246 530 316 254 273 202 46 25 97 229 513 262 181 945 693 148 649 720 850 46 646 358 784 700 992 316 487 784 679 192 849 42 750 307 643 4 375 529 888 951 662 245 557 965 833 58 478 12 751 659 8 8...
output:
52097
result:
ok 1 number(s): "52097"
Test #47:
score: 0
Accepted
time: 28ms
memory: 11744kb
input:
99 14 76 349 358 66 971 433 49 830 153 438 26 685 151 581 675 353 434 299 290 810 626 185 939 301 893 726 259 177 146 43 799 801 415 14 451 757 844 616 548 856 990 343 847 507 517 205 167 513 221 934 939 89 729 934 293 616 907 833 548 764 926 201 35 201 557 292 264 816 224 356 118 283 62 893 35 739 ...
output:
56909
result:
ok 1 number(s): "56909"
Test #48:
score: 0
Accepted
time: 28ms
memory: 11904kb
input:
100 50 92 432 291 693 294 843 662 536 859 1000 325 548 80 307 732 280 811 756 740 406 577 857 676 117 832 241 333 455 468 513 813 140 486 459 549 582 520 939 339 403 298 368 25 678 849 609 212 782 898 837 541 118 931 897 388 203 611 863 40 409 637 297 88 655 465 10 477 654 995 821 197 853 450 180 52...
output:
77409
result:
ok 1 number(s): "77409"
Test #49:
score: 0
Accepted
time: 25ms
memory: 10256kb
input:
94 40 80 211 18 868 784 483 745 883 679 143 756 968 366 696 248 622 554 315 889 981 82 331 371 625 84 172 45 345 392 914 81 73 492 40 702 528 54 314 542 891 29 459 128 752 937 839 895 948 710 227 577 934 614 648 736 177 940 315 765 990 529 856 320 655 474 203 465 261 432 165 803 868 143 469 467 922 ...
output:
67351
result:
ok 1 number(s): "67351"
Test #50:
score: 0
Accepted
time: 22ms
memory: 10476kb
input:
95 19 63 429 482 453 777 254 480 428 990 954 721 771 171 497 457 874 1 120 483 672 50 751 203 552 590 345 59 799 415 703 95 376 564 245 249 56 194 564 101 506 622 63 918 243 12 998 520 103 339 53 715 899 367 798 159 897 998 211 266 151 812 53 275 328 247 736 771 833 395 852 279 93 726 350 943 194 89...
output:
58222
result:
ok 1 number(s): "58222"
Test #51:
score: 0
Accepted
time: 27ms
memory: 10828kb
input:
96 23 82 352 843 846 770 321 23 270 596 253 685 470 976 195 667 126 345 117 861 764 611 955 227 480 96 814 480 446 437 197 812 783 741 235 603 391 821 406 661 712 918 450 116 438 383 348 40 962 481 776 662 672 609 460 69 128 353 106 768 904 94 354 935 704 619 269 477 404 62 243 563 22 118 422 228 46...
output:
55319
result:
ok 1 number(s): "55319"
Test #52:
score: 0
Accepted
time: 24ms
memory: 11252kb
input:
97 45 62 762 715 534 658 579 759 111 906 768 137 977 78 701 876 275 496 218 751 264 875 670 763 303 601 498 686 900 164 986 338 86 110 632 150 623 960 953 28 327 511 541 610 225 754 507 561 117 814 499 97 636 362 314 491 847 115 898 565 65 273 551 698 376 584 907 79 976 920 930 847 144 406 7 408 546...
output:
70308
result:
ok 1 number(s): "70308"
Test #53:
score: 0
Accepted
time: 25ms
memory: 10988kb
input:
98 65 79 684 372 223 947 350 302 952 321 771 805 780 779 398 86 527 840 215 937 763 139 682 786 527 299 967 107 547 994 480 352 493 479 621 505 959 588 499 291 46 808 737 807 717 229 370 890 976 251 325 44 113 308 976 913 79 470 89 67 818 556 44 653 752 549 440 785 843 883 321 620 73 990 887 885 819...
output:
0
result:
ok 1 number(s): "0"
Test #54:
score: 0
Accepted
time: 28ms
memory: 11676kb
input:
99 10 30 902 540 616 644 609 37 690 631 582 770 479 880 200 592 483 992 21 531 751 212 694 514 158 805 243 312 785 16 757 365 900 847 827 52 486 919 853 659 957 104 828 5 504 600 720 707 131 688 344 887 374 61 830 231 502 232 688 864 275 735 537 609 129 922 269 683 415 550 712 200 298 574 960 169 89...
output:
88617
result:
ok 1 number(s): "88617"
Test #55:
score: 0
Accepted
time: 29ms
memory: 11828kb
input:
100 81 96 881 472 243 367 19 354 691 338 144 69 638 513 822 649 194 562 182 493 154 162 366 355 678 40 462 90 64 338 740 787 535 622 272 149 16 595 472 42 800 517 661 375 675 932 716 752 697 661 655 297 403 456 794 622 90 232 206 356 113 550 144 70 686 831 499 601 253 129 370 280 869 154 55 656 576 ...
output:
0
result:
ok 1 number(s): "0"
Extra Test:
score: 0
Extra Test Passed