Submission #894175

#TimeUsernameProblemLanguageResultExecution timeMemory
894175ozner77Arranging Shoes (IOI19_shoes)C++17
Compilation error
0 ms0 KiB
#include <iostream> #include <vector> using namespace std; int main() { int a,b; vector<int> S; cin>>a; for(int i=0;i<a*2;i++){ cin>>b; S.push_back(b); } if(S[0]<0){ int count_swaps=0; printf("%d",count_swaps); }else{ int count_swaps=1; printf("%d",count:swaps); } }

Compilation message (stderr)

shoes.cpp: In function 'int main()':
shoes.cpp:18:26: error: found ':' in nested-name-specifier, expected '::'
   18 |         printf("%d",count:swaps);
      |                          ^
      |                          ::
shoes.cpp:18:21: error: 'count' has not been declared
   18 |         printf("%d",count:swaps);
      |                     ^~~~~
shoes.cpp:17:12: warning: unused variable 'count_swaps' [-Wunused-variable]
   17 |        int count_swaps=1;
      |            ^~~~~~~~~~~