이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
#include "tickets.h"
#define rep(i,a,b) for(int i=int(a);i<int(b);i++)
#define rrep(i,a,b) for(int i=int(a);i>int(b);i--)
#define trav(a,v) for(auto& a: v)
#define sz(v) v.size()
#define all(v) v.begin(),v.end()
#define vi vector<int>
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
const long long inf = 1e15;
using namespace std;
vector<bool> visited(1e6);
vector<vector<ll>> g;
vector<ll> v;
ll curr = 0;
long long find_maximum(int k, std::vector<std::vector<int>> x) {
vector<ll> v;
ll n = x.size();
ll m = x[0].size();
vector<vector<int>> answer(n, vector<int>(m,-1));
rep(i, 0, n)rep(j, 0, k)answer[i][j] = j;
trav(a, x) {
trav(b, a)v.push_back(b);
}
sort(all(v));
ll ans = 0;
rep(i, 0, v.size() / 2)ans -= v[i];
rep(i, v.size() / 2, v.size()) ans += v[i];
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... |