제출 #421264

#제출 시각아이디문제언어결과실행 시간메모리
421264Monchito카니발 티켓 (IOI20_tickets)C++14
0 / 100
1 ms204 KiB
#include "tickets.h" #include <vector> #include <iostream> using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; int n, m, K; vector<vi> answer; ll find_maximum(int k, vvi x){ n = x.size(); m = x[0].size(); answer = vvi(n, vi(m, -1)); ll sum = 0; for(int i=0; i<n; i++){ answer[i][0] = 0; sum += (ll)x[i][0]; } ll mid_floor = sum / n; ll mid_ceil = (sum + n - 1) / n; ll s1, s2; s1 = s2 = 0; for(int i=0; i<n; i++) s1 += abs(x[i][0] - mid_floor); for(int i=0; i<n; i++) s2 += abs(x[i][0] - mid_ceil); allocate_tickets(answer); return s1; }
#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...