제출 #405121

#제출 시각아이디문제언어결과실행 시간메모리
405121ly20카니발 티켓 (IOI20_tickets)C++17
0 / 100
1 ms296 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 1512; int resp[MAXN]; long long find_maximum(int k, vector<vector<int>> x) { int n = x.size(); int m = x[0].size(); vector <int> d1; for(int i = 0; i < n; i++) { d1.push_back(x[i][0]); } sort(d1.begin(), d1.end()); long long md = d1[m/2]; long long resp = 0; for(int i = 0; i < n; i++) { if(d1[i] < md) resp += md - d1[i]; else resp += d1[i] - md; } vector <vector <int> > answer; vector <int> temp; for(int i = 0; i < n; i++) { temp.push_back(0); } answer.push_back(temp); allocate_tickets(answer); return resp; }
#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...