Submission #1019871

#TimeUsernameProblemLanguageResultExecution timeMemory
1019871vjudge1Detecting Molecules (IOI16_molecules)C++17
9 / 100
1 ms436 KiB
#include <bits/stdc++.h> //#define int long long using namespace std; vector <int> find_subset(int l, int u, vector <int> w) { int sum = 0; vector <int> id; for (int i = 0; i < w.size(); i++) { id.push_back(i); sum+=w[i]; if (sum>=l and sum <= u) { return id; } } return {}; } /* signed main() { int t; cin >> t; while(t--) { //solve(); } } * */

Compilation message (stderr)

molecules.cpp: In function 'std::vector<int> find_subset(int, int, std::vector<int>)':
molecules.cpp:9:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    9 |     for (int i = 0; i < w.size(); i++) {
      |                     ~~^~~~~~~~~~
#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...