# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
590466 | tamthegod | Xylophone (JOI18_xylophone) | C++14 | 73 ms | 328 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 "xylophone.h"
#define pb push_back
#define fi first
#define se second
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const int maxN = 5000 + 5;
const int mod = 1e9 + 7;
const ll oo = 1e18;
int res[maxN];
void solve(int n)
{
int low = 1, high = n, mid;
while(low <= high)
{
mid = (low + high) / 2;
if(query(mid, n) == n - 1) low = mid + 1;
else high = mid -1;
}
low--;
res[low] = 1;
//cout << query(1, 2);exit(0);
if(low > 1)
{
res[low - 1] = 1 + query(low - 1, low);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |