Submission #617797

#TimeUsernameProblemLanguageResultExecution timeMemory
617797SAADDetecting Molecules (IOI16_molecules)C++17
0 / 100
0 ms212 KiB
#define F first #define S second #define rep(i,a,b) for(int i=a;!(a==b&&i!=b)&&((i<=b&&b>=a)||(i>=b&&a>=b));i+=(a<=b?1:-1)) #define pb push_back #define Fbitl __builtin_ffs #define bit1 __builtin_popcount #include <iostream> #include <math.h> #include <algorithm> #include <string.h> #include <vector> #include <queue> #include <map> #include <unordered_map> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<string, string> pss; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<pii> vii; typedef vector<ll> vl; typedef vector<vl> vvl; //#include "molecules.h" vector<int> find_subset(int l, int u, vector<int> w) { vi res; int sum = 0 ; bool th = false; for (int i = w.size() - 1; i >= 0; i--) { if (sum + w[i] <= u) { res.push_back(i+1); sum += w[i]; } if (sum >= l && sum <= u) { th = true; break; } } if ( !th ) return vector<int>(0); return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...