Submission #468694

#TimeUsernameProblemLanguageResultExecution timeMemory
468694RedmoonautumnSure Bet (CEOI17_sure)C++17
20 / 100
63 ms284 KiB
#include <bits/stdc++.h> using namespace std; #define int int64_t signed main(){ ios_base::sync_with_stdio(false); cin.tie(0); int n; cin>>n; vector<double> a(n); vector<double> b(n); for(int i=0;i<n;i++){ cin>>a[i]>>b[i]; } double win=0; for(int i=0;i<(1<<n);i++){ for(int j=0;j<(1<<n);j++){ double anz=0; double wina=0; double winb=0; for(int k=0;k<n;k++){ if(i&(1<<k)){ anz++; wina+=a[k]; } if(j&(1<<k)){ anz++; winb+=b[k]; } } double winnow=min(wina-anz, winb-anz); win=max(win,winnow); } } printf("%.4lf",(double)win); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...