| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1310409 | DangerNoodle7591 | Detecting Molecules (IOI16_molecules) | C++20 | 35 ms | 6216 KiB |
#include <bits/stdc++.h>
using namespace std;
#pragma GCC target ("avx2")
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
//#define int long long int
#define N 200005
//#define big 1000000000000000
//#define fark 0.0000001
#define ll long long
//#define endl "\n"
#define pb push_back
#define ins insert
#define p push
#define f first
#define s second
vector<int> find_subset(int l, int u, vector<int> w){
vector<pair<ll int,int>> v;
for(int i=0;i<w.size();i++){
v.pb({w[i],i});
}
sort(v.begin(),v.end());
int s=0,e=-1;
ll int top=0;
vector<int> cev;
//cout<<"a"<<" "<<e<<" "<<v.size()<<endl;
while(e<(int)v.size()){
//cout<<s<<" "<<e<<" "<<top<<endl;
if(top<l){
e++;
top+=v[e].f;
continue;
}
if(top>u){
top-=v[s].f;
s++;
continue;
}
for(int i=s;i<=e;i++)cev.pb(v[i].s);
break;
}
sort(cev.begin(),cev.end());
return cev;
}
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... | ||||
