Submission #812693

#TimeUsernameProblemLanguageResultExecution timeMemory
812693elotelo966Detecting Molecules (IOI16_molecules)C++17
Compilation error
0 ms0 KiB
#include "molecules.h" #include <bits/stdc++.h> using namespace std; typedef long long ll std::vector<int> find_subset(int l, int u, std::vector<int> w){ vector <pair<ll,ll>> dizi; ll n=w.size(); for(ll i=0;i<n;i++){ dizi.push_back({w[i],i}); } sort(dizi.begin(),dizi.end()); ll le=0,r=0,sum=0; bool stop=false; while(le<=r && r<n){ if(sum+dizi[r].first<l){ sum+=dizi[r].first; r++; } else if(sum+dizi[r].first>=l && sum+dizi[r].first<=u){ stop=true; break; } else{ sum-=dizi[le].first; le++; } } vector <ll> cev; if(stop){ for(int i=le;i<=r;i++){ cev.push_back(ger[i].second); } sort(cev.begin(),cev.end()); } return cev; }

Compilation message (stderr)

molecules.cpp:6:1: error: expected initializer before 'std'
    6 | std::vector<int> find_subset(int l, int u, std::vector<int> w){
      | ^~~