제출 #304528

#제출 시각아이디문제언어결과실행 시간메모리
304528Leonardo_Paes카니발 티켓 (IOI20_tickets)C++17
11 / 100
2 ms768 KiB
#include "tickets.h" #include <vector> #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; vector<int> v(n); for(int i=0; i<n; i++){ vector<int> row(m); v[i] = x[i][0]; for(int j=0; j<m; j++) { row[j] = 0; } answer.push_back(row); } sort(v.begin(), v.end()); int val = v[n/2]; long long ans = 0; for(auto x : v) ans += abs(val - x); allocate_tickets(answer); 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...