Submission #724979

#TimeUsernameProblemLanguageResultExecution timeMemory
724979AndrijaMBank (IZhO14_bank)C++14
0 / 100
0 ms212 KiB
#include <bits/stdc++.h> using namespace std; const int maxn=1e5+10; int n; int k; int x[maxn]; int sum[maxn]; vector<int>ans; int f(int idx,int kol,vector<int>v) { if(kol==0) { ans=v; return sum[n-1]-sum[idx]; } int rez=0; for(int i=idx+1;i<n-1;i++) { vector<int>pom; pom=v; pom.push_back(i); if(idx==-1) { int koj=kol-1; if(koj>=0) rez=max(rez, f(i,koj,pom)*sum[i]); } else { int koj=kol-1; if(koj>=0) rez=max(rez, f(i,koj,pom)*(sum[i]-sum[idx])); } } return rez; } int main() { return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...