이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<vector>
#include<cstdio>
#include<set>
#include<cstdlib>
#include<cstdarg>
#include<cassert>
#include"books.h"
#include <bits/stdc++.h>
using namespace std;
#define pi pair<int, int>
#define pii pair<int, pi>
#define fi first
#define se second
#ifdef _WIN32
#define getchar_unlocked _getchar_nolock
#endif
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
void solve(int N, int K, long long A, int S) {
long long lo = K, hi = N, tmp = N + 1, val = -1;
while(lo <= hi){
int mid = (lo + hi) >> 1;
long long tot = 0;
for(int j = mid - K + 1; j <= mid; j++)tot += skim(j);
if(tot >= A)tmp = mid, hi = mid - 1, val = tot;
else lo = mid + 1;
}
if(val == -1 || val > 2 * A)impossible();
else {
vector <int> v;
for(int j = tmp - K + 1; j <= tmp; j++)v.push_back(j);
answer(v);
}
}
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |