Secrete Master Plan HDU
来源:互联网 发布:d3.js 可视化介绍 编辑:程序博客网 时间:2024/06/05 20:33
问两个锦囊是不是一个,就是简单的把第二个锦囊旋转一下对比就可以
暴力即可
//leehaoze#include <iostream>#include <deque>#include <string>#include <vector>#include <queue>#include <cstdio>#include <stack>#include <algorithm>#include <cstring>#include <cctype>#include <cstdio>#include <cmath>#include <cstdlib>using namespace std;const int INF = 1<<29;#define INC_SAT( val ) (val = ((val)+1 > (val)) ? (val)+1 : (val))#define ARR_SIZE( a ) ( sizeof( (a) ) / sizeof( (a[0]) ) )#define ULL unsigned long longint A[4][4],B[4][4];bool Comp(){ for (int i = 0; i < 2; ++i) { for (int j = 0; j < 2; ++j) { if(A[i][j] != B[i][j]) return false; } } return true;}void Change(){ swap(B[0][0],B[0][1]); swap(B[0][0],B[1][1]); swap(B[0][0],B[1][0]);}bool Match(){ for (int i = 0; i < 4; ++i) { if(Comp()){ return true; } else{ Change(); } } return false;}int main() {#ifdef LOCAL freopen("IN.txt", "r", stdin);#endif int T; scanf("%d",&T); int cases = 1; while(T--){ scanf("%d%d",&A[0][0],&A[0][1]); scanf("%d%d",&A[1][0],&A[1][1]); scanf("%d%d",&B[0][0],&B[0][1]); scanf("%d%d",&B[1][0],&B[1][1]); if(Match()){ printf("Case #%d: POSSIBLE\n",cases++); } else{ printf("Case #%d: IMPOSSIBLE\n",cases++); } }}
0 0
- Secrete Master Plan HDU
- HDU 5540 Secrete Master Plan
- hdu 5540/Secrete Master Plan
- HDU 5540 Secrete Master Plan
- HDU 5540 Secrete Master Plan(水)
- HDU5540-Secrete Master Plan
- UESTC 1215 Secrete Master Plan
- A - Secrete Master Plan【ccpc】
- 2015 CCPC Secrete Master Plan
- Secrete Master Plan (模拟)
- HDU5540 Secrete Master Plan(模拟)
- CDOJ 1215--Secrete Master Plan【水题】
- ccpc Secrete Master Plan(水模拟)
- 2015南阳CCPC A - Secrete Master Plan
- 杭电5540 Secrete Master Plan
- hdu5540 Secrete Master Plan--矩阵旋转
- hdoj Secrete Master Plan 5540 (矩阵翻转)
- The 2015 China Collegiate Programming Contest A - Secrete Master Plan
- mysql startservice失败解决方法
- Git解决冲突
- Java面试题总结
- PHP memcache扩展安装 for Windows
- 【知识总结】——URI URL URN
- Secrete Master Plan HDU
- SQL 语句总结
- Eureka Server 搭建部署
- Recyclerview的简单使用
- 缓存那些事
- 详谈内存管理技术(一)
- html5初学day2【作业】
- Excel做图像
- 二维SVM的可视化解释