제출 #418365

#제출 시각아이디문제언어결과실행 시간메모리
418365Azimjon카니발 티켓 (IOI20_tickets)C++17
0 / 100
1 ms204 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, 1)); 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...