Submission #1047005

#TimeUsernameProblemLanguageResultExecution timeMemory
1047005nightfalCounting Mushrooms (IOI20_mushrooms)C++17
10 / 100
119 ms600 KiB
#include <vector>
#include <iostream>
using namespace std;

int use_machine(std::vector<int> x);

int count_mushrooms(int n) {
	std::vector<int> m;
	for (int i = 0; i < n; i++)
		m.push_back(i);
    int total = 0;
    for(int i=1; i<n; i++)
        total += use_machine({m[0],m[i]});
	return n-total;
}

Compilation message (stderr)

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:12:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   12 |     for(int i=1; i<n; i++)
      |     ^~~
mushrooms.cpp:14:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   14 |  return n-total;
      |  ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...