Submission #1100393

#TimeUsernameProblemLanguageResultExecution timeMemory
1100393akzytrCoins (IOI17_coins)C++17
Compilation error
0 ms0 KiB
#include "coins.h"

std::vector<int> coin_flips(std::vector<int> b, int c) {
    std::vector<int> turn;
    if(c==0){
        if(b[0] == b[1]){
            turn.pb(63);
        }
        else{
            turn.pb(0);
        }
    }
    else{
        if(b[0] == b[1]){
            turn.pb(0);
        }
        else{
            turn.pb(63);
        }
    }
    return b;
  
}

int find_coin(std::vector<int> b) {
    return b[0] != b[1];
}

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:7:18: error: 'class std::vector<int>' has no member named 'pb'
    7 |             turn.pb(63);
      |                  ^~
coins.cpp:10:18: error: 'class std::vector<int>' has no member named 'pb'
   10 |             turn.pb(0);
      |                  ^~
coins.cpp:15:18: error: 'class std::vector<int>' has no member named 'pb'
   15 |             turn.pb(0);
      |                  ^~
coins.cpp:18:18: error: 'class std::vector<int>' has no member named 'pb'
   18 |             turn.pb(63);
      |                  ^~