UVA 12293 - Box Game UVA • Sep 1, 2020 Problem PDFSolution:/*#include int main() { long long n; while(scanf("%lld",&n)==1) { if(n==0) break; else { int p=1; while(p #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define MP make_pair #define PB push_back #define foreach(e,x) for(__typeof(x.begin()) e=x.begin(); e!=x.end(); ++ e) using namespace std; typedef pair PII; typedef long long LL; typedef unsigned long long ULL; typedef long double LD; int N; char buf[20]; void solve() { scanf("%d%s", &N, buf); if (buf[0] == 'A') { -- N; if (N % 3 == 0) puts("Bob"); else puts("Alice"); } else { if (N % 3 == 0) puts("Alice"); else puts("Bob"); } } int main() { int T; scanf("%d", &T); for(int i = 1; i <= T; ++ i) { printf("Case %d: ", i); solve(); } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/12293/12293.cpp Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read