# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
223781 | bharat2002 | Detecting Molecules (IOI16_molecules) | C++14 | 74 ms | 8932 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.
/*input
10 20
4
15 17 16 18
*/
#include "molecules.h"
#include<bits/stdc++.h>
using namespace std;
const int N=2e5 + 100;
const int mod=1e9 + 7;
#define pii pair<long long, int>
#define int long long
#define mp make_pair
#define f first
#define s second
int n;vector< pii > vals;
bool sf(pii a, pii b);long long pref[N];
vector<int> ans;int L, U;
void check(int num)
{
if(pref[num-1]<=U)
{
for(int i=0;i<num;i++) ans.push_back(vals[i].s);return;
}
for(int i=num;i<n;i++)
{
if(pref[i]-pref[i-num]>=L&&pref[i]-pref[i-num]<=U)
{
for(int j=i-num+1;j<=i;j++) ans.push_back(vals[j].s);return;
Compilation message (stderr)
# | 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... |