Submission #1177708

#TimeUsernameProblemLanguageResultExecution timeMemory
1177708tamzidArranging Shoes (IOI19_shoes)C++20
Compilation error
0 ms0 KiB
#include "shoes.h" long long count_swaps(std::vector<int> s) { if(s[i]==-s[i]) return 1; else return 0; }

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:4:14: error: 'i' was not declared in this scope
    4 |         if(s[i]==-s[i])
      |              ^
shoes.cpp:8:1: warning: control reaches end of non-void function [-Wreturn-type]
    8 | }
      | ^