# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
30488 | bill_kondo | Detecting Molecules (IOI16_molecules) | C++14 | 66 ms | 6944 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 "molecules.h"
#include "bits/stdc++.h"
using namespace std;
typedef pair<int,int>pii;
const int maxn = 2e5 + 10;
bool mrk[maxn];
vector<int> find_subset(int l, int r, vector<int>w) {
vector<int>ret;
long long sum = 0;
vector<pii> W;
int n = (int)w.size();
int j = 0;
for(int i = 0; i < n; ++i)
W.push_back(pii(w[i],i));
sort(W.begin(),W.end());
for(int i = 0; i < n; ++i){
sum += W[i].first;
mrk[W[i].second] = true;
while(j < i && sum > r){
sum -= W[j].first;
mrk[W[j].second] = false;
# | 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... |