Submission #889086

#TimeUsernameProblemLanguageResultExecution timeMemory
889086svazArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include "shoes.h" #include<iostream> #include<vector> using namespace std; long long count_swaps(std::vector<int> S){ if(S.size()==2){ if(S[0]>s[1])return 1; return 0; } return S.size()/2; } /*int main(){ int n,zap; cin>>n; for(int i=0;i<n*2;i++){ cin>>zap; zapatos.push_back(zap); } cout<<count_swaps(zapatos)<<"\n"; return 0; }*/

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:7:17: error: 's' was not declared in this scope
    7 |         if(S[0]>s[1])return 1;
      |                 ^