Submission #411994

#TimeUsernameProblemLanguageResultExecution timeMemory
411994mosiashvililukaCounting Mushrooms (IOI20_mushrooms)C++17
Compilation error
0 ms0 KiB
//#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; }*/

Compilation message (stderr)

mushrooms.cpp: In function 'int count_mushrooms(int)':
mushrooms.cpp:23:5: error: 'use_machine' was not declared in this scope
   23 |   c=use_machine(vv);
      |     ^~~~~~~~~~~