제출 #1292845

#제출 시각아이디문제언어결과실행 시간메모리
1292845lambd47Counting Mushrooms (IOI20_mushrooms)C++20
10 / 100
54 ms400 KiB
#include "mushrooms.h"
#include<bits/stdc++.h>
using namespace std;
#define L(i,j,k) for(int i=(j);i<=(k);i++)
#define R(i,j,k) for(int i=(j);i>=(k);i--)
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(),(v).end()


int count_mushrooms(int n) {
	std::vector<int> m;
	m.push_back(0);
	int resp=1;
	for (int i = 1; i < n; i++){
		m.push_back(i);
		resp+=(1^use_machine(m));
		m.pop_back();
	}
	return resp;
}
#Verdict Execution timeMemoryGrader output
Fetching results...