# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
76086 | luciocf | Detecting Molecules (IOI16_molecules) | C++14 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include <molecules>
using namespace std;
const int MAXN = 2e5+10;
typedef long long ll;
struct P {
int ind;
ll v;
} num[MAXN];
bool comp(P a, P b)
{
return a.v < b.v;
}
ll soma[MAXN];
int busca(int pos, int k, int n)
{
int ini = pos, fim = n;
while (ini <= fim)
{
int mid = (ini+fim)>>1;
if (mid == n && soma[mid]-soma[pos-1] <= k) return mid;
else if (mid == n)