lightOJ 1186 Incredible Chess
来源:互联网 发布:淘宝店铺地址怎么改 编辑:程序博客网 时间:2024/06/01 09:35
#include <iostream>#include <cstdio>const int MAX = 105;int arr1[105], arr2[105];int main(){int t, cas = 0;std::cin >> t;while (t--){int num;std::cin >> num;for (int i = 0; i != num; ++i){std::cin >> arr1[i];}for (int j = 0; j != num; ++j){std::cin >> arr2[j];}int res = arr2[0] - arr1[0] - 1;for (int i = 1; i != num; ++i){res = (res ^ (arr2[i] - arr1[i] - 1));}printf("Case %d: ", ++cas);if (res)std::cout << "white wins\n";elsestd::cout << "black wins\n";}return 0;}
0 0
- lightOJ 1186 Incredible Chess
- LightOj 1186 Incredible Chess nim游戏
- lightoj 1186 - Incredible Chess Nim博弈
- LightOJ 1030 Discovering Gold + Hdu4405 Aeroplane chess (期望)
- chess
- Chess
- chess
- chess
- Chess
- Chess
- Chess
- chess
- Chess
- Chess
- ZOJ 2868 Incredible Cows
- lightoj1118 Incredible Molecules
- LightOJ
- LightOJ
- JAVA timer.schedule用法
- 常量指针和指针常量的区别详解
- (java)Subsets II
- AsyncTask的实现
- java反射之获取Class对象
- lightOJ 1186 Incredible Chess
- Masonry简单使用
- 利用Nginx 代理输出缩放图片
- SharedPreferences详解
- 从上往下打印二叉树
- Android Activity的onSaveInstanceState() 和 onRestoreInstanceState()方法
- 配置虚拟主机
- linux下redis安装
- linux sudo apt-get update问题