제출 #302181

#제출 시각아이디문제언어결과실행 시간메모리
302181kriii카니발 티켓 (IOI20_tickets)C++17
0 / 100
1 ms256 KiB
#include "tickets.h" #include <algorithm> #include <vector> using namespace std; long long find_maximum(int k, vector<vector<int> > x) { int n = x.size(); int m = x[0].size(); long long ans = 0; vector<int> sum; for (int i = 0; i < n; i++){ for (int j = 0; j < k; j++){ ans -= x[i][j]; sum.push_back(x[i][j] + x[i][m - k + j]); } } sort(sum.rbegin(), sum.rend()); int pop = n * k / 2; for (int i = 0; i < pop; i++) ans += sum[i]; return ans; }
#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...