제출 #302722

#제출 시각아이디문제언어결과실행 시간메모리
302722galca카니발 티켓 (IOI20_tickets)C++14
11 / 100
2 ms768 KiB
#include "tickets.h" #include <vector> #include <algorithm> long long find_maximum(int k, std::vector<std::vector<int>> x) { int n = x.size(); int m = x[0].size(); std::vector<std::vector<int>> answer; std::vector<int> tickets; for (int i = 0; i < n; i++) { std::vector<int> row(m); tickets.push_back(x[i][0]); for (int j = 0; j < m; j++) { row[j] = 0; } answer.push_back(row); } std::sort(tickets.begin(), tickets.end()); long long res = 0; for (int i = 0; i < n / 2; i++) { res += (tickets[n - i - 1] - tickets[i]); } allocate_tickets(answer); return res; }
#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...