Submission #865162

#TimeUsernameProblemLanguageResultExecution timeMemory
865162vjudge1Sure Bet (CEOI17_sure)C++17
0 / 100
1 ms348 KiB
/* Author: AZ1X Created:24.10.2023 Why am I so stupid? :| Slishkom slab< */ #include<bits/stdc++.h> // it's solo #define int unsigned long long #define ld long double #define all(x) x.begin(), x.end() #define yes "YES\n" #define no "NO\n" #define ok "OK\n" #define amirrrr ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0) #define pf push_front #define pb push_back #define S second #define F first using namespace std; int mx = (int)1e18 * -1, mn = (int)1e18 * 1; const int N = 100000; const int mod = 1e9 + 7; const int inf = 1e18 - 1; /* I gO To SchooL #kbo1_top_5 */ void legenda_ne_umret() { int n; cin >> n; ld sum = 0.0, summ = 0.0; while (n--) { ld a, b; cin >> a >> b; if (a > b) { sum += a ; } else { summ += b; } } int a = sum; int b = summ; sum -= a; summ -= b; cout <<fixed << setprecision(4) << min(summ, sum); } signed main () { amirrrr; //freopen("cities.in", "r", stdin); //freopen("cities.out", "w", stdout); ///////////////////////////////////////// int t = 1; //cin >> t; for (int i = 1; i <= t; i++) { //cout << "Case " << i << ":\n"; legenda_ne_umret(); } // created by Abdulaziz(tuuf choza kraww?!) }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...