제출 #418367

#제출 시각아이디문제언어결과실행 시간메모리
418367Azimjon카니발 티켓 (IOI20_tickets)C++17
11 / 100
2 ms688 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; long long find_maximum(int k, std::vector<std::vector<int>> x) { int n = x.size(); int m = x[0].size(); vector<vector<int>> answer(n, vector<int>(m, 0)); allocate_tickets(answer); vector<int> a; for (int i = 0; i < n; i++) { a.push_back(x[i][0]); } sort(a.begin(), a.end()); int me = a[n / 2]; long long ans = 0; for (int i : a) ans += abs(i - me); 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...