# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
720730 | qwerasdfzxcl | Naan (JOI19_naan) | C++17 | 409 ms | 86808 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr ll INF = 4e18;
struct Frac{
ll a, b;
Frac(){}
Frac(ll _a, ll _b): a(_a), b(_b) {}
bool operator < (const Frac &F) const{
return (__int128)a*F.b < (__int128)b*F.a;
}
};
int n, m, used[2020];
ll a[2020];
vector<Frac> V[2020];
void input(int i){
ll S = 0;
for (int j=1;j<=m;j++){
cin >> a[j];
S += a[j];
}
ll cur = S, c = 1, pt = 1;
while(c<n){
if (a[pt]*n < cur) {cur -= a[pt++]*n; continue;}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |