Submission #432540

#TimeUsernameProblemLanguageResultExecution timeMemory
432540Rouge_Hugo버섯 세기 (IOI20_mushrooms)C++14
25 / 100
110 ms264 KiB
#include<bits/stdc++.h> #include "mushrooms.h" #define ll long long #define fi first #define se second #define pb push_back using namespace std; vector<int>v; int count_mushrooms(int n) { int a=1,b=0; for(int i=1;i<n-1;i+=2) { v.clear();v.pb(i);v.pb(0);v.pb(i+1); int x=use_machine(v); x=3-x;x--; a+=x; } v.clear(); if(n%2==0) { v.pb(0);v.pb(n-1); if(use_machine(v))b++;else a++; } return a; }
#Verdict Execution timeMemoryGrader output
Fetching results...