【链接】h在这里写链接


【题意】


让你把一个正方形A竖直或水平翻转。
问你翻转一次能不能把A翻转成B

【题解】


有说一定要恰好为1次。
并不是说A和B相同就一定不行。

【错的次数】


2

【反思】


自己强行理解错题意

【代码】

/*

*/
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
#include <iomanip>
#include <set>
#include <cstdlib>
#include <cmath>
#include <bitset>
using namespace std;
#define lson l,m,rt<<1
#define rson m+1,r,rt<<1|1
#define LL long long
#define rep1(i,a,b) for (int i = a;i <= b;i++)
#define rep2(i,a,b) for (int i = a;i >= b;i--)
#define mp make_pair
#define pb emplace_back
#define fi first
#define se second
#define ld long double
#define ms(x,y) memset(x,y,sizeof x)
#define ri(x) scanf("%d",&x)
#define rl(x) scanf("%lld",&x)
#define rs(x) scanf("%s",x)
#define rf(x) scnaf("%lf",&x)
#define oi(x) printf("%d",x)
#define ol(x) printf("%lld",x)
#define oc putchar(' ')
#define os(x) printf(x)
#define all(x) x.begin(),x.end()
#define Open() freopen("F:\\rush.txt","r",stdin)
#define Close() ios::sync_with_stdio(0)
#define sz(x) ((int) x.size())
#define ld long double typedef pair<int,int> pii;
typedef pair<LL,LL> pll; //mt19937 myrand(time(0));
//int get_rand(int n){return myrand()%n + 1;}
const int dx[9] = {0,1,-1,0,0,-1,-1,1,1};
const int dy[9] = {0,0,0,-1,1,-1,1,-1,1};
const double pi = acos(-1.0);
const int N = 110; int n,a[N+10][N+10],b[N+10][N+10]; bool ok(){
    rep1(i,1,n)
        rep1(j,1,n)
            if (a[i][j]!=b[i][j]){
                return false;
            }
    return true;
} void shui(){
    rep1(i,1,n/2)
        rep1(j,1,n)
            swap(a[i][j],a[n-i+1][j]);
} void shu(){
    rep1(j,1,n/2){
        rep1(i,1,n)
            swap(a[i][j],a[i][n-j+1]);
    }
} int main(){
    //Open();
    //Close();
    ri(n);
    rep1(i,1,n)
        rep1(j,1,n)
            ri(a[i][j]);
    rep1(i,1,n)
        rep1(j,1,n)
            ri(b[i][j]);     shui();
    if (ok()){
        puts("1");
        return 0;
    }
    shui();     shu();
    if (ok()){
        puts("1");
        return 0;
    }
    puts("0");
    return 0;
}

最新文章

  1. 做一个gulp+webpack+vue的单页应用开发架子
  2. 关于Jmeter分布式测试在公司内的使用
  3. JavaScript基础介绍
  4. 《zw版&#183;Halcon-delphi系列原创教程》 Halcon分类函数012,polygon,多边形
  5. ExtJs
  6. [JS4] 最简单JS框架
  7. 《深入理解计算机系统》深入实践之——vim深入研究
  8. oracle连接和执行流程总结
  9. NSPoint
  10. TCMalloc
  11. Maven 项目 启动时 解决3 字节的 UTF-8 序列的字节 3 无效
  12. ibeacon和蓝牙有什么区别_它们的区别在哪里
  13. bzoj4152-[AMPPZ2014]The_Captain
  14. 20165237 2017-2018-2 《Java程序设计》第6周学习总结
  15. 使用pm2离线部署nodejs项目
  16. maven 配置篇 之 settings.xml
  17. java 中方法重载
  18. Hashmat the brave warrior(UVa10055)简单题
  19. 在TFS中使用Git Tags(标签或标记),实现代码的版本管理
  20. 第六章 函数、谓词、CASE表达式 6-2 谓词

热门文章

  1. HRBUST 1818 石子合并问题--直线版
  2. PatentTips - System and method to deprivilege components of a virtual machine monitor
  3. TCP/IP协议族-----20、远程登录:TELNET与SSH
  4. 測试password强度
  5. RvmTranslator6.0 - AVEVA Marine Hull Model
  6. 洛谷P1722 矩阵 II
  7. button按钮下边框有立体效果样式
  8. js对象基础写法练习
  9. 如何在canvas中画出一个太极图
  10. django shell 操作