Submission #979204

#TimeUsernameProblemLanguageResultExecution timeMemory
979204vjudge1Let's Win the Election (JOI22_ho_t3)C++17
5 / 100
1 ms348 KiB
#include<bits/stdc++.h> #define ft first #define sd second #define pb push_back #define nl "\n" #define int ll typedef long long ll; typedef long double ld; using namespace std; const int mod = 1e9 + 7; const int N = 2000; signed main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); cout << fixed << setprecision(9); int T = 1; while(T--) { int n, k; cin >> n >> k; double a[n], b[n]; for (int i = 0; i < n; i++) { cin >> a[i] >> b[i]; } sort(a, a + n); double s = 0; for (int i = 0; i < k; i++) { s += a[i]; } cout << s << nl; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...