제출 #1041917

#제출 시각아이디문제언어결과실행 시간메모리
1041917MarwenElarbi카니발 티켓 (IOI20_tickets)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> #include "tickets.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<std::vector<int>> ans(n,vector<int> (m,-1)); long long res=0; int mx=0; int mn=1e9; for (int i = 0; i < n; ++i) { mx=max(mx,x[i][0]); mn=min(mn,x[i][0]); } long long cur=mx-(mx-mn)/2; for (int i = 0; i < n; i++){ res+=abs(cur-x[i][0]); ans[i][0]=0; } allocate_tickets(ans); return res; }
#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...