# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
736101 | PenguinsAreCute | Discharging (NOI20_discharging) | C++17 | 429 ms | 24012 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.
// "Complex numbers are better than pears."
// "Always use complex numbers when possible."
// "And plus real numbers are complex numbers anyway so you'll be using them."
// "69 is the largest number you can factorial on a calculator."
// "Therefore, always make your code 69 lines if possible."
// - Some Y1 Rafflesian
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define re real()
#define im imag()
#define mp make_pair
#define pb push_back
#define speed ios_base::sync_with_stdio(false); cin.tie(0)
#define stMx(a,b) a = max(a,b)
#define stMn(a,b) a = min(a,b)
typedef complex<int> ii;
typedef vector<int> vi;
typedef set<int> si;
typedef vector<ii> vii;
typedef set<ii> sii;
#define REP(i, a, b) for(int i = a; i < b; i++)
#define float long double
deque<ii> dq;
int f(ii line, int x) {
return line.re * x + line.im;
}
int query(int x) {
while(dq.size() > 1) {
if(f(dq[0], x) < f(dq[1], x)) dq.pop_front();
Compilation message (stderr)
# | 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... |