Submission #765545

#TimeUsernameProblemLanguageResultExecution timeMemory
765545LudisseyArranging Shoes (IOI19_shoes)C++14
Compilation error
0 ms0 KiB
#include <iostream> #include <string> #include <set> #include <map> #include <cstring> #include <unordered_map> #include <vector> #include <fstream> #include <bitset> #include <tuple> #include <cmath> #include <cstdint> #include <stack> #include <cassert> #include <cstdio> #include <queue> #include <iterator> #include <iomanip> #include <algorithm> #include <sstream> #define INF 9223372036854775801 #define int long long #define double long double #define MOD(a) ((a) % 1000000007 + 1000000007 ) % 1000000007 #define FI first #define caseOut(t) cout << "Case " << t << ": "; #define SE second #define USACO_SETUP() ifstream cin("paint.in"); ofstream cout("paint.out"); #define SETUP() ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); using namespace std; long long count_swaps(std::vector<int> S) { if (a[0] > 0) { swap(a[0], a[1]); return 1; } else { return 0; } }

Compilation message (stderr)

shoes.cpp: In function 'long long int count_swaps(std::vector<long long int>)':
shoes.cpp:35:9: error: 'a' was not declared in this scope
   35 |     if (a[0] > 0) {
      |         ^
shoes.cpp:42:1: warning: control reaches end of non-void function [-Wreturn-type]
   42 | }
      | ^