Submission #312667

#TimeUsernameProblemLanguageResultExecution timeMemory
312667jam_xd_Counting Mushrooms (IOI20_mushrooms)C++17
0 / 100
0 ms256 KiB
#include "mushrooms.h" #include <bits/stdc++.h> int count_mushrooms(int n) { std::vector<int> m, v; for (int i = 0; i < n; i++)m.push_back(i); int sum = 0; for(int i=1;i<m.size();i++){ v = {0,i}; if(use_machine(v) > 0)sum++; v.clear(); } return sum; }

Compilation message (stderr)

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:11:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |  for(int i=1;i<m.size();i++){
      |              ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...