# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
720730 | qwerasdfzxcl | Naan (JOI19_naan) | C++17 | 409 ms | 86808 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |