主站
DreamJudge
院校信息
专业题库
模拟考试
机试真题
专业课程
讨论区
兑换中心
登录
注册
发布
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
我能走到对岸吗
2024年5月4日 00:47
旋转矩阵(模拟 - 注意多组测试输入--第一次交没注意过了80%) -
P1377
回复 0
|
赞 1
|
浏览 96
#include<bits/stdc++.h> using namespace std; const int N = 20; int a[20][20], b[20][20]; int n; int cheak() { bool t = true; for(int i = 1; i <= n; i ++) for(int j = 1; j <= n; j ++) if(a[i][j] != b[i][j]) t = false; if(t) return ...
flipped
2024年4月17日 20:54
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 1
|
浏览 221
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <math.h> #include <string.h> bool isequal(int arr1[][9], int arr2[][9], int n) { for (int i = 0; i < n; i++) { for (int j = 0; j < n...
1576684866
2024年3月23日 21:41
旋转矩阵 - 北航 题解:注意是多组数据输入,旋转三次还对不上就返回-
P1377
回复 0
|
赞 0
|
浏览 286
#include <cstdio> using namespace std; #include <string.h> #include <iostream> #include <stdlib.h> //判断两个矩阵是否相同 bool isSame(int(&s)[10][10], int(&ss)[10][10],int n) { int flag = true; for (int i = 1; i <= n; i++) { ...
OIsay-good
2024年3月17日 20:37
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 0
|
浏览 384
#include //核心: // s[i][j]==b[i][j] 0 // s[i][j]==b[j][n-i-1] 90 // s[i][j]==b[n-i-1][n-j-1] 180 // s[i][j]==b[n-j-1][i] 270 //比较矩阵是否相同 int same(int s[25][25],int b[25][25],int n){ for (int i = 0; i < n; i++) &nbs...
为欢几何
2024年3月10日 16:03
旋转矩阵 - 北航 题解:注意输出角度后面还要有一个换行
P1377
回复 1
|
赞 0
|
浏览 589
#include<stdio.h> int same(int b[105][105], int a[105][105], int n) { for (int i = 1;i <= n;i++) for (int j = 1;j <= n;j++) { if (a[i][j] != b[i][j]) &nbs...
easymoney
2024年3月10日 13:06
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 0
|
浏览 279
#include <stdio.h> int main() { int n; int a[10][10] = { 0 }; int b[10][10] = { 0 }; int reverse90[10][10] = { 0 }; int reverse180[10][10] = { 0 }; int reverse270[10][10]...
光明守护神
2024年3月7日 22:11
旋转矩阵 - 北航 题解:C++
P1377
回复 0
|
赞 1
|
浏览 425
0度就是没变 90度是关键 180度就是转2次90度 270度就是转3次90度 #include<iostream> #include<vector> using namespace std; /*输出一个2维数组*/ void print(vector<vector<int>>& a) { int n = a.size(); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { c...
799
2024年3月5日 21:53
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 0
|
浏览 239
#include <bits/stdc++.h> using namespace std; void xz(int n,int a[15][15],int b[15][15]); void Aprint(int a[15][15],int n); int pd(int a[15][15],int b[15][15],int n); int main() { //NxM 90度:(i,j)->(j,m-i+1) int a[15][15]={0},b[15][15]={0}; ...
mazixiang
2024年3月2日 15:58
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 0
|
浏览 258
#include<bits/stdc++.h> using namespace std; // 判断两个矩阵是否相等 int IsSame(int m1[][105], int m2[][105], int n) { for (int i = 1; i <=n; i++) for (int j = 1; j <=n; j++) if (m1[i][j] != m2[i][j]) ...
fzh
2024年2月7日 16:56
旋转矩阵 - 北航 题解:不断的对矩阵进行转置和对称变换即可
P1377
回复 0
|
赞 0
|
浏览 514
#include<bits/stdc++.h> using namespace std; //对矩阵进行转置 void TM(vector<vector<int>>& m1, int n) { //先将m1转置 int temp; for (int index = 0; index < n; index++) for (in...
1
2
3
题目
旋转矩阵 - 北航
题解数量
23
发布题解
热门题解
1
1377旋转矩阵
2
O(n^2),知道怎么旋转90°就全都会了(180°就是两次90°)
3
这道题oj上面的几个坑提醒注意
4
找出顺时针90度的索引变化规律就可以知道全部规律
5
旋转矩阵 - 北航 题解:C++
6
旋转矩阵(模拟 - 注意多组测试输入--第一次交没注意过了80%) - 北航 题解:
7
小白一枚
8
旋转矩阵
9
判断矩阵b为矩阵a旋转多少度
10
旋转矩阵 - 北航 题解: