Submission #447420

#TimeUsernameProblemLanguageResultExecution timeMemory
447420osmanallazovSure Bet (CEOI17_sure)C++14
0 / 100
0 ms204 KiB
#include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; double ans=0; double a[t+1]; double b[t+1]; double a1[t+1]; double b1[t+1]; a[0]=0; b[0]=0; for(int i=1;i<=t;i++){ cin>>a[i]; cin>>b[i]; } sort(a+1,a+t+1); reverse(a+1,a+t+1); sort(b+1,b+t+1); reverse(b+1,b+t+1); for(int i=1;i<=t;i++){ for(int j=1;j<=t;j++){ ans=max(ans,min(a1[i]-i-j,b1[j]-i-j)); } } cout.precision(4); cout<<fixed<<ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...