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