제출 #302715

#제출 시각아이디문제언어결과실행 시간메모리
302715galca카니발 티켓 (IOI20_tickets)C++14
0 / 100
1 ms512 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[i] = x[i][0]; for (int j = 0; j < m; j++) { row[j] = 1; } 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 1; }
#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...