| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 872546 | Zero | Detecting Molecules (IOI16_molecules) | C++17 | 1 ms | 436 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 <bits/stdc++.h>
#define ll long long
#include "molecules.h"
 
#define pb push_back
using namespace std;
 
vector<int> find_subset(int l, int u, vector<int> a){
    ll n = a.size();
    vector<int> v;
    ll s = 0;
    for(ll i=0; i < n; i ++){
        if(a[i]>=l && a[i] <= u){
            v.pb(i);
            return v;
        }
    }
    for(int i=0; i < n; i ++){
        ll ss = 0;
        for(int j=i; j < n ; j ++){
            ss += a[j];
            if(ss >=l &&ss <=u){
                for(int k=i; k <=j;k++)v.pb(k);
                return v;
            }
        }
    }
    return v;
}
 
// signed main(){
//     int l,u; cin >> l >> u;
//     vector<int> a(4);
//     for(auto &i : a) cin >> i;
//     vector<int> y = find_subset(l,u,a);
//     for(auto i : y) cout << i << " ";
//     return 0;
// }
Compilation message (stderr)
| # | 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... | ||||
