이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "tickets.h"
#include <bits/stdc++.h>
#include <vector>
typedef long long ll;
using namespace std;
long long find_maximum(int k, vector<vector<int>> x) {
ll n = x.size();
ll m = x[0].size();
ll ans=1e18;
vector<vector<int>> answer;
for(int i=0;i<n;i++){
answer.push_back(vector<int>(m,-1));
}
if(m==1){
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
answer[i][j]=0;
}
}
for(int i=0;i<n;i++){
ll currans=0;
for(int j=0;j<n;j++){
currans+=abs(x[i][0]-x[j][0]);
}
ans=min(ans,currans);
}
}
allocate_tickets(answer);
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |