제출 #1206124

#제출 시각아이디문제언어결과실행 시간메모리
1206124tkm_algorithms버섯 세기 (IOI20_mushrooms)C++20
25 / 100
26 ms420 KiB
/** * In the name of Allah * We are nothing and you're everything **/ #include <bits/stdc++.h> #include "mushrooms.h" using namespace std; using ll = long long; #define all(x) begin(x), end(x) #define sz(x) (int)(x).size() //#define int long long const char nl = '\n'; int count_mushrooms(int n) { int i = 1, res = 1; while (i < n-1) { vector<int> x = {i, 0, i+1}; int c = use_machine(x); res += 2-c; i += 2; } if (i == n-1) { vector<int> x = {0, i}; int c = use_machine(x); res += 1-c; } return res; } //int main() { //cout << count_mushrooms(4); //}
#Verdict Execution timeMemoryGrader output
Fetching results...