Pocket Cube
2015-07-22 19:45
302 查看
看了别人的,mark一下
[code]#include <iostream> #include <cstring> #include <cstdio> #include <cstdlib> #include <algorithm> using namespace std; int a[] = {-1,1,1,-1,1,-1,0,0,1,-1,-1,1,0,0,-1,1,-1,1,1,-1,0,0,0,0}; int T; int main(){ scanf("%d",&T); for(int re=1;re<=T;++re){ int ans = 0; char ch[3]; for(int i=0;i<24;++i){ scanf("%s",ch); if(ch[0] == 'w' || ch[0] == 'y') ans += a[i]; } printf("Case #%d: %s\n",re,ans%3?"NO":"YES"); } return 0; }
相关文章推荐
- uva 104 Arbitrage (DP + floyd)
- The Counting Problem(区间数数,很好哦!)
- hdu 2017 字符串统计
- Android 编程下 WebView 加载一个网页如何得到网页的 Cookie 值
- IIS使用时问题汇总
- webrtc学习笔记1(建立连接基本流程)
- git 问题总结
- Js_Eval方法
- 月之数
- Winform 应用程序内嵌Webbrowser的若干问题
- 微博和知乎中的 feed 流是如何实现的?
- 泛型基础概念
- 运维经验分享(六)-- 深究crontab不能正确执行Shell脚本的问题(二)
- 1425 sort
- 基于各种浏览器的写法兼容
- 经典01背包问题 HDU2602
- Js_数组操作
- 黑马程序员-抽象方法的继承
- Centos安装redis3.0.3
- java 内部类 枚举