Submission #320346

#TimeUsernameProblemLanguageResultExecution timeMemory
320346lifchrsCoins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; typedef long long int; typedef long double ld; typedef double db; typedef string str; typedef pair<ll,ll> pl; typedef vector<ll> vl; typedef vector<vl> vvl; #define mp make_pair #define se second #define pb push_back #define pf push_front #define nn <<"\n" #define F0R(i,a) for(int i=0;i<a;i++) #define FOR(i,a,b) for(int i=a;i<b;i++) vector<int> coin_flips(vector<int> b, int c){ vector<int> flips(64,0); string binary = bitset<16>(c).to_string(); int currflip = 0; F0R(i,8){ if(binary[i] != b[i]){ flips[currflip] = i; currflip++; } } FOR(i,currflip,64) flips[i] = 63; return flips; } int find_coin(vector<int> b){ int ans = 0; F0R(i,8){ ans += pow(2,i) * int(b[i]); } return ans; }

Compilation message (stderr)

coins.cpp:3:19: error: declaration does not declare anything [-fpermissive]
    3 | typedef long long int;
      |                   ^~~
coins.cpp:7:14: error: 'll' was not declared in this scope; did you mean 'ld'?
    7 | typedef pair<ll,ll> pl;
      |              ^~
      |              ld
coins.cpp:7:17: error: 'll' was not declared in this scope; did you mean 'ld'?
    7 | typedef pair<ll,ll> pl;
      |                 ^~
      |                 ld
coins.cpp:7:19: error: template argument 1 is invalid
    7 | typedef pair<ll,ll> pl;
      |                   ^
coins.cpp:7:19: error: template argument 2 is invalid
coins.cpp:8:16: error: 'll' was not declared in this scope; did you mean 'pl'?
    8 | typedef vector<ll> vl;
      |                ^~
      |                pl
coins.cpp:8:18: error: template argument 1 is invalid
    8 | typedef vector<ll> vl;
      |                  ^
coins.cpp:8:18: error: template argument 2 is invalid