# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
411995 | mosiashvililuka | Counting Mushrooms (IOI20_mushrooms) | C++14 | 306 ms | 572 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 "mushrooms.h"
#include<bits/stdc++.h>
using namespace std;
int a,b,c,d,e,i,j,ii,jj,zx,xc,A,B,T=200;
string QWE;
vector <int> vA,vB,vv;
/*int use_machine(vector <int> q){
int we=0;
for(int qw=1; qw<q.size(); qw++){
if(QWE[q[qw]]!=QWE[q[qw-1]]){
we++;
}
}
return we;
}*/
int count_mushrooms(int n) {
a=n;
vA.push_back(0);
A++;
for(i=1; i<a; i++){
//if(vA.size()>=T||vB.size()>=T) break;
vv.clear();vv.push_back(0);vv.push_back(i);
c=use_machine(vv);
if(c==0){
vA.push_back(i);
A++;
}else{
vB.push_back(i);
B++;
}
}
return A;
}
/*int main(){
ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
//cin>>a;
cin>>QWE;
cout<<count_mushrooms(QWE.size());
return 0;
}*/
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |