# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
737801 | Elvin_Fritl | Detecting Molecules (IOI16_molecules) | C++17 | 0 ms | 0 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.
#include <bits/stdc++.h>
using namespace std;
#include "molecules.h"
vector<int> find_subset(int l, int u, vector<int> w){
int toto=u-l;
vector<pair<int,int>>m;
vector<int>res;
for(int i=0;i<w.size();i++){
m.push_back({w[i],i});
}
sort(m.begin(),m.end());
for(int i=0;i<w.size()-1;i++){
if(abs(m[i].first - m[i+1].first)<=toto){
res.push_back(m[i].second);
res.push_back(m[i+1].second);
break;
}
}
return vector<int>ress(0);
}