Submission #1014485

#TimeUsernameProblemLanguageResultExecution timeMemory
1014485CookieCoins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
#include<fstream>
using namespace std;
#define sz(a) (int)a.size()
#define ALL(v) v.begin(), v.end()
#define ALLR(v) v.rbegin(), v.rend()
#define ll long long
#define pb push_back
#define forr(i, a, b) for(int i = a; i < b; i++)
#define dorr(i, a, b) for(int i = a; i >= b; i--)
#define ld double
#define vt vector
#include<fstream>
#define fi first
#define se second
#define pll pair<ll, ll>
#define pii pair<int, int>
#define mpp make_pair
#include "transfer.h"
std::vector<int> coin_flips(std::vector<int> b, int c) {
    int xo = 0;
    for(int i = 0; i < sz(b); i++){
        if(b[i] == 1)xo ^= i;
    }
    vt<int>flips; flips.pb(xo ^ c);
    return flips;
}

int find_coin(std::vector<int> b) {
    int xo = 0;
    for(int i = 0; i < sz(b); i++){
        if(b[i] == 1)xo ^= i;
    }
    return(xo);
}


/*
#include <iostream>
#include <vector>
#include <string>

using namespace std;

static string run_test() {
	int c;
	cin >> c;
	vector<int> b(64);
	for (int i = 0; i < 8; i++) {
		string s;
		cin >> s;
		for (int j = 0; j < 8; j++) {
			b[i * 8 + j] = int(s[j] - '0');
		}
	}
	vector<int> flips = coin_flips(b, c);
	if ((int)flips.size() == 0) {
		return "0 turn overs";
	}
	for (int i = 0; i < (int)flips.size(); i++) {
		if (flips[i] < 0 || flips[i] > 63) {
			return "cell number out of range";
		}
		b[flips[i]] = 1 - b[flips[i]];
	}
	int coin = find_coin(b);
	if (coin != c) {
		return "wrong coin";
	}
	return "ok";
}

int main() {
	int tests;
	cin >> tests;
	for (int t = 1; t <= tests; t++) {
		string result = run_test();
		cout << "test #" << t << ": " << result << endl;
	}
	return 0;
}

*/

Compilation message (stderr)

coins.cpp:19:10: fatal error: transfer.h: No such file or directory
   19 | #include "transfer.h"
      |          ^~~~~~~~~~~~
compilation terminated.