Submission #1262288

#TimeUsernameProblemLanguageResultExecution timeMemory
1262288califrastico_09Detecting Molecules (IOI16_molecules)C++20
0 / 100
0 ms324 KiB
#include "molecules.h"
#include<bits/stdc++.h>
using namespace std;
vector<int> find_subset(int l, int u, vector<int> w){
    int k=0, f=0, n=w.size(); vector<int> o, a; bool sp=true; 
    for(auto x:w) 
    {
        k+=x; o.push_back(f); if(k>=l&&k<=u){break;}
        if(k>u||(f==n&&k<l)){sp=false; break;} f++;
    }
    if(!sp) return a;
    else return o;
}

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...