Submission #306738

#TimeUsernameProblemLanguageResultExecution timeMemory
306738VEGAnnCounting Mushrooms (IOI20_mushrooms)C++14
10 / 100
244 ms384 KiB
#include <bits/stdc++.h>
#include "mushrooms.h"
using namespace std;

int count_mushrooms(int n) {
    int ans = 1;

    for (int i = 1; i < n; i++)
        if (use_machine({0, i}) == 0)
            ans++;

	return ans;
}

Compilation message (stderr)

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