이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "books.h"
using namespace std;
const int nx=1e5+5;
long long n, k, a[nx], t;
set<pair<long long, long long>> s;
void solve(int N, int K, long long A, int S) {
n=N, k=K, t=A;
int l=k, r=n;
while (l<=r)
{
long long md=(l+r)/2, sm=0;
for (int j=0; j<k; j++) sm+=skim(md-j);
if (sm<t) l=md+1;
else if (sm>2*t) r=md-1;
else
{
vector<int> res;
for (int j=0; j<k; j++) res.push_back(md-j);
answer(res);
}
}
impossible();
}
/*
5 3 10 179
1 2 9 10 100
*/
# | 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... |