제출 #364042

#제출 시각아이디문제언어결과실행 시간메모리
364042wind_reaper카니발 티켓 (IOI20_tickets)C++17
16 / 100
688 ms71380 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; long long find_maximum(int k, vector<vector<int>> x) { int n = x.size(); int m = x[0].size(); vector<vector<int>> ans(n, vector<int>(m, -1)); long long a = 0; vector<pair<int64_t, int>> b(n); for(int i = 0; i < n; i++){ ans[i][m-1] = 0; b[i] = {1LL*(x[i][0] + x[i][m-1]), i}; a += 1LL*x[i][m-1]; } sort(b.begin(), b.end()); for(int i = 0; i < n/2; i++){ a -= b[i].first; ans[b[i].second][0] = 0; ans[b[i].second][m-1] = -1; } allocate_tickets(ans); return a; }
#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...