Submission #615745

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
6157452022-07-31 12:17:32IvanJThe Big Prize (IOI17_prize)C++17
95.87 / 100
97 ms47536 KiB
#include<bits/stdc++.h>
#include "prize.h"
#define pb push_back
#define x first
#define y second
using namespace std;
typedef pair<int, int> ii;
const int maxn = 2e6 + 5;
vector<int> A[maxn];
vector<int> V;
void find(int lo, int hi) {
return;
int mid = (lo + hi) / 2;
if(A[mid].size() == 0) A[mid] = ask(mid);
if(A[mid][0] + A[mid][1] < A[hi][0] + A[hi][1]) {V.pb(mid);return;}
if(A[mid][1] == A[hi][1]) hi = mid;
else lo = mid + 1;
}
void solve(int lo, int hi, int R) {
if(lo >= hi) return;
if(R == 0) return;
//if(R == 1) {find(lo, hi);return;}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

prize.cpp: In function 'int find_best(int)':
prize.cpp:67:1: warning: control reaches end of non-void function [-Wreturn-type]
   67 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...