Catherine.cpp: In function 'int {anonymous}::T(std::vector<int>)':
Catherine.cpp:4:692: warning: control reaches end of non-void function [-Wreturn-type]
using namespace std;namespace {int A,B,l;bool o;vector<int> s;vector<vector<int>> O={{1,1,0,0,1},{1,0,0,1,0},{0,0,1,0,1},{0,1,0,1,1},{1,0,1,1,0},{0,1,1,0,0},};int T(vector<int> y){vector<int> Y=y;if(~l)Y[l]++;int deg=accumulate(Y.begin(),Y.end(),0);if(deg != 2)o=true;if(o){if(deg == 1){if(l == -1)FOR(i,0,A)if(y[i])return l=i;return -1;} else if(deg == 2){FOR(i,0,A)if(y[i])return l=i;} else {FOR(i,0,A)if(Y[i] == 1){if(!y[i])return -1;return l=i;}}} else {if(~l){FOR(i,0,A)if(y[i]){s.push_back(i);if(s.size()< 5)return l=i;else {o=true;for(vector<int> v : O)if(v == s)return l=i;return -1;}}} else {FOR(i,0,A)if(y[i]){s.push_back(i);y[i]--;FOR(j,0,A)if(y[j]){s.push_back(j);return l=j;}}}}}int G(vector<int> y){if(~l)y[l]++;FOR(i,0,3)if(y[i] && y[(i+1)% 3])return l=i;FOR(i,0,3)if(y[i])return l=i;}}void Init(int A,int B){::A=A;::B=B;o=false;l=-1;}int Move(vector<int> y){if(B)return T(y);return G(y);}
^
Catherine.cpp: In function 'int {anonymous}::G(std::vector<int>)':
Catherine.cpp:4:800: warning: control reaches end of non-void function [-Wreturn-type]
using namespace std;namespace {int A,B,l;bool o;vector<int> s;vector<vector<int>> O={{1,1,0,0,1},{1,0,0,1,0},{0,0,1,0,1},{0,1,0,1,1},{1,0,1,1,0},{0,1,1,0,0},};int T(vector<int> y){vector<int> Y=y;if(~l)Y[l]++;int deg=accumulate(Y.begin(),Y.end(),0);if(deg != 2)o=true;if(o){if(deg == 1){if(l == -1)FOR(i,0,A)if(y[i])return l=i;return -1;} else if(deg == 2){FOR(i,0,A)if(y[i])return l=i;} else {FOR(i,0,A)if(Y[i] == 1){if(!y[i])return -1;return l=i;}}} else {if(~l){FOR(i,0,A)if(y[i]){s.push_back(i);if(s.size()< 5)return l=i;else {o=true;for(vector<int> v : O)if(v == s)return l=i;return -1;}}} else {FOR(i,0,A)if(y[i]){s.push_back(i);y[i]--;FOR(j,0,A)if(y[j]){s.push_back(j);return l=j;}}}}}int G(vector<int> y){if(~l)y[l]++;FOR(i,0,3)if(y[i] && y[(i+1)% 3])return l=i;FOR(i,0,3)if(y[i])return l=i;}}void Init(int A,int B){::A=A;::B=B;o=false;l=-1;}int Move(vector<int> y){if(B)return T(y);return G(y);}
^