제출 #1123868

#제출 시각아이디문제언어결과실행 시간메모리
1123868epicci23카니발 티켓 (IOI20_tickets)C++17
27 / 100
425 ms51532 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>> answer(n,vector<int>(m,-1)); long long tot = 0; for(int i=0;i<n;i++) tot-=x[i][0]; vector<array<long long,2>> v; for(int i=0;i<n;i++) v.push_back({x[i].back()+x[i][0],i}); sort(v.begin(),v.end()); reverse(v.begin(),v.end()); for(int i=0;i<n/2;i++){ tot += v[i][0]; answer[v[i][1]][m-1]=0; } for(int i=n/2;i<n;i++){ answer[v[i][1]][0]=0; } allocate_tickets(answer); return tot; }
#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...