이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "tickets.h"
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()
ll find_maximum(int k,vector<vector<int>>x){
auto s=x;
int n=x.size();
int m=x[0].size();
if(m==1){
ll ans=0;
vector<ll>v;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
s[i][j]=0;
v.pb(x[i][j]);
}
}
sort(all(v));
for(int j=n/2;j<n;j++){
ans+=v[j];
}
for(int j=0;j<n/2;j++){
ans-=v[j];
}
allocate_tickets(s);
return ans;
}
return 0ll;
}
# | 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... |