Submission #1326619

#TimeUsernameProblemLanguageResultExecution timeMemory
1326619x_aDetecting Molecules (IOI16_molecules)C++20
9 / 100
1 ms332 KiB
#include "molecules.h"
#include <bits/stdc++.h>
using namespace std;

using ll = int;


vector<int> find_subset(int l, int u, vector<int> w) {
    vector<int> ans;
    ll n = w.size(), x = 0;
    ll curr = 0;
    bool f = false;
    for(ll k : w){
        curr += k;
        ans.push_back(x);
        x ++;
        if(curr >= l && curr <= u){
            f = true;
            break;
        }
    }
    if(!f){
        return vector<int>();
    }
    return ans;
}

Compilation message (stderr)

molecules.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
molecules_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
#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...