제출 #306738

#제출 시각아이디문제언어결과실행 시간메모리
306738VEGAnn버섯 세기 (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;
}

컴파일 시 표준 에러 (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...