Submission #928737

#TimeUsernameProblemLanguageResultExecution timeMemory
928737FoolestboyDetecting Molecules (IOI16_molecules)C++14
0 / 100
0 ms348 KiB
#ifndef SKY #include "molecules.h" #endif // SKY #include<bits/stdc++.h> using namespace std; vector<int> find_subset(int low, int high, vector<int> weights) { vector<int> v; for (int i = 0; i < weights.size(); i++) v.push_back(i); return v; } #ifdef SKY int main(void) { int n, low, high; cin >> n >> low >> high; vector<int> weights(n, 0); for (int i = 0; i < n; i++) cin >> weights[i]; vector<int> res = find_subset(low, high, weights); cout << res.size() << " elements" << endl; for (int x : res) cout << x << " "; cout << endl; } #endif // SKY

Compilation message (stderr)

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