Submission #921946

#TimeUsernameProblemLanguageResultExecution timeMemory
921946HoriaHaivasDetecting Molecules (IOI16_molecules)C++14
Compilation error
0 ms0 KiB
/* "care a facut teste cu Lattice reduction attack e ciudat" "linistiti va putin" - 2023 - */ #include<"molecules.h"> #define debug(x) cerr << #x << " " << x << "\n" #define debugs(x) cerr << #x << " " << x << " " #pragma GCC optimize("Ofast") using namespace std; vector<int> rez; struct sirelement { int val; int poz; }; vector<sirelement> v; bool cmp (sirelement a, sirelement b) { return a.val<b.val; } vector<int> find_subset(int l, int u, vector<int> w) { int i; for (i=0;i<w.size();i++) { v.push_back({w[i],i}); } sort(v.begin(),v.end(),cmp); int pointer,s,j; s=0; pointer=0; for (i=0;i<v.size();i++) { if (pointer<i) pointer=i; while (pointer<v.size() && s+v[pointer].val<=u) { s+=v[pointer].val; pointer++; } if (s>=l && s<=u) { for (j=i;j<pointer;j++) rez.push_back(v[j].poz); return rez; } else { s-=v[i].val; } } return rez; }

Compilation message (stderr)

molecules.cpp:6:9: fatal error: "molecules.h": No such file or directory
    6 | #include<"molecules.h">
      |         ^~~~~~~~~~~~~~~
compilation terminated.