# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
604554 | Sam_a17 | 버섯 세기 (IOI20_mushrooms) | C++14 | 0 ms | 208 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define sz(x) (int((x).size()))
#define len(x) (int)x.length()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define dbg(x) cout << #x << " " << x << endl;
#define uniq(x) x.resize(unique(all(x)) - x.begin());
#define pb push_back
#define ld long double
#define ll long long
// #include "mushrooms.h"
int use_machine(vector<int> m);
int count_mushrooms(int n) {
// std::vector<int> m;
// for (int i = 0; i < n; i++)
// m.push_back(i);
// int c1 = use_machine(m);
// m = {0, 1};
// int c2 = use_machine(m);
// return c1+c2;
int curr = 1;
vector<int> a{0}, b;
int s = 0;
for(int i = 1; i < n; i += 2) {
vector<int> ask{i, 0, i + 1};
int c1 = use_machine(ask);
s += 2 - c1;
}
if(n % 2 == 0) {
vector<int> ask{0, n - 1};
int c1 = use_machine(ask);
s += 1 - c1;
}
return s;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |