# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
967231 | huutuan | Sightseeing in Kyoto (JOI22_kyoto) | C++14 | 540 ms | 32344 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;
#define int long long
struct Fraction{
int x, y, i;
Fraction (int _x=0, int _y=1, int _i=0){
x=_x, y=_y, i=_i;
if (y<0) y*=-1, x*=-1;
}
bool operator<(const Fraction &b) const {
return make_pair(x*b.y, i)>make_pair(b.x*y, b.i);
}
};
const int N=1e5+10;
int h, w, a[N], b[N], da[N], db[N];
Fraction ca[N], cb[N];
int32_t main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cin >> h >> w;
for (int i=1; i<=h; ++i) cin >> a[i];
for (int i=1; i<=w; ++i) cin >> b[i];
set<Fraction> st;
set<int> sta, stb;
for (int i=1; i<=h; ++i) sta.insert(i);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |