# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
77680 | updown1 | Sure Bet (CEOI17_sure) | C++17 | 128 ms | 4304 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;
#define For(i, a, b) for(int i=a; i<b; i++)
#define ffi For(i, 0, N)
#define ffj For(j, 0, M)
#define ffa ffi ffj
#define s <<" "<<
#define w cout
#define e "\n"
#define pb push_back
#define mp make_pair
#define a first
#define b second
//#define int ll
const int MAXN=100000, INF=100000000;
///500,000,000
int N;
double a[MAXN], b[MAXN];
bool works(double gain) {
int ap = 0, bp = 0;
double ag = 0, bg = 0;
while (true) {
// Base cases
if (ag >= gain && bg >= gain) return true;
if ( (ag < gain && ap == N) || (bg < gain && bp == N) ) return false;
if (ag < gain) {
ag += a[ap];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |