Submission #1141406

#TimeUsernameProblemLanguageResultExecution timeMemory
1141406x93bd0Coins (IOI17_coins)C++20
Compilation error
0 ms0 KiB
/* x93bd0 - trying not to go down Rust is better, >: */ #include <algorithm> #include <csignal> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <map> #include <set> #include <list> #include <queue> #include <sys/types.h> #include <vector> #include <bitset> #include "coins.h" using namespace std; #define int long long #define uint unsigned int #define iinf LLONG_MAX #define uinf ULLONG_MAX vector<signed> coin_flips(vector<signed> b, int c) { vector<signed> o; for (uint x = 0; x < 6; x++) { if (b[x] != (c & 1)) { o.push_back(x); } c >>= 1; } return o; } int find_coin(vector<signed> b) { uint o = 0; for (uint x = 6; x > 0; x--) { o <<= 1; o |= b[x] > 0; } return o; }

Compilation message (stderr)

coins.cpp:43:5: error: ambiguating new declaration of 'long long int find_coin(std::vector<int>)'
   43 | int find_coin(vector<signed> b) {
      |     ^~~~~~~~~
In file included from coins.cpp:22:
coins.h:4:5: note: old declaration 'int find_coin(std::vector<int>)'
    4 | int find_coin(std::vector<int> b);
      |     ^~~~~~~~~