# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
98443 | bogdan10bos | The Big Prize (IOI17_prize) | C++14 | 97 ms | 1144 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>
#include "prize.h"
using namespace std;
typedef pair<int, int> pii;
int sq, mxcnt, ans;
map<int, int> mp[2];
pii myask(int pos)
{
if(mp[0].count(pos))
return {mp[0][pos], mp[1][pos]};
auto v = ask(pos);
mp[0][pos] = v[0];
mp[1][pos] = v[1];
return {v[0], v[1]};
}
void solve(int st, int dr)
{
if(st > dr) return;
if(ans != -1) return;
auto askst = myask(st);
auto askdr = myask(dr);
int sumst = askst.first + askst.second;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |