제출 #313930

#제출 시각아이디문제언어결과실행 시간메모리
313930srvlt버섯 세기 (IOI20_mushrooms)C++14
0 / 100
0 ms256 KiB
#include "mushrooms.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define SZ(x) (int)(x).size() #define all(x) begin(x), end(x) int count_mushrooms(int n) { vector<int> m, c(n); int res = 1; for (int i = 1; i < n; i++) { m.clear(); m.pb(i - 1), m.pb(i); if (use_machine(m)) c[i] = c[i - 1] ^ 1; res += (c[i] == 0); } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...