首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
太一
2026年3月16日 23:06
旋转矩阵加强版 题解:这题都没表述清楚
P1377
回复 0
|
赞 8
|
浏览 141
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; int main() { int n; while (cin >> n) { int arr[10][10], brr[10][10],...
王艺道
2026年3月12日 23:24
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 16
|
浏览 240
#include<bits/stdc++.h> using namespace std; int A[11][11]; int B[11][11]; int n; int res[4]; int main(){ while(cin >> n){ for(int i = 0; i <= 10; i++){ fo...
HKX9XAS
2026年3月12日 17:19
旋转矩阵 - 北航 递归解法
P1377
回复 0
|
赞 3
|
浏览 104
#include <stdio.h> #include<iostream> using namespace std; int inputMatrix(int n,int (&matrix)[9][9]){ for(int i=0; i<n; i++){ for(int j=0; j<n; j++){ ...
xiaoboQAQ
2026年3月11日 19:23
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 5
|
浏览 98
#include<bits/stdc++.h> using namespace std; int change(int n,int a[10][10]){ int c[10][10]; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ c[i][j] = a[n - j + 1][i]; } } for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ a[i][j]=c[i][j]; ...
无名1
2025年6月26日 15:33
旋转矩阵 - 北航 题解:C++ 关键在于顺时针旋转90度的公式
P1377
回复 1
|
赞 39
|
浏览 1.2k
#include<bits/stdc++.h> using namespace std; //矩阵旋转90度的函数;需要注意的是其余的180度和270度可通过多次调用这个函数来达到相同的效果;对于0度的话直接判断是否 //与原矩阵相同即可 void change(int n,int a[10][10]){ int a_c[10][10]; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ a_c[j][n-i-1]=a[i][j]; } } //将旋转之后的矩阵再次存入a数组...
Liang_Pan
2026年3月10日 20:37
暴力方法 :多次遍历+剪枝
P1377
回复 0
|
赞 4
|
浏览 86
#include<bits/stdc++.h> using namespace std; int main(){ int n; while(cin>> n){ if(n == 1){//单独判断1 int a,b; cin >> a >> b; if(a==b)cout << 0 <<endl; else cout << -1 <<endl; continue;...
无名吟
2026年3月9日 20:59
旋转矩阵 - 北航 C语言解题,数组保存角度,一次遍历
P1377
回复 0
|
赞 13
|
浏览 158
#include<stdio.h> int main(){ int n; while(~scanf("%d", &n)){ int arr[10][10], brr[10][10]; for(int i=1; i<=n; i++){ for(int j=1; j<=n; j++){ scanf("%d", &arr[i][j]); } } for(int i=1; i<=n; i++){ for(int j=1; j<=n; j++){ scanf("...
kkkkkkllll
2026年3月7日 17:20
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 4
|
浏览 158
#include<iostream> #include<algorithm> #include<vector> #include<set> #include<string> #include<math.h> using namespace std; int main(){ int n; while(cin>>n){ vector<bool>angle(4,...
fuuuuuu
2026年3月6日 22:05
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 2
|
浏览 111
C++用cin和cout会超时,得补一个ios::sync_with_stdio(false)和cin.tie(0)就不超时了 #include<bits/stdc++.h> using namespace std; void t90(vector<vector<int>> &a,int n){ vector<vector<int>> b(n+1,vector<int>(n+1,0)); for(int i=1;i<=n;i++)...
Cat111
2026年3月5日 20:38
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 10
|
浏览 188
#include <bits/stdc++.h> using namespace std; int a[10][10]; int b[10][10]; //0 bool is0(int a[10][10],int b[10][10],int n){ int flag=1; for(int i=1;i<=n;i++){ for(int j=1;j<=n;j++){ if(a[i][j]!=b[i][j]) flag=0; } } if(flag==1) return true; else return fals...
1
2
3
...
6
题目
旋转矩阵加强版
题解数量
51
发布题解
在线答疑
热门题解
1
旋转矩阵 - 北航 题解:旋转后判断
2
旋转矩阵 - 北航 题解:
3
旋转矩阵 - 北航 题解:C++ 关键在于顺时针旋转90度的公式
4
旋转矩阵 - 北航 题解:
5
这道题oj上面的几个坑提醒注意
6
1377旋转矩阵
7
旋转矩阵(模拟 - 注意多组测试输入--第一次交没注意过了80%) - 北航 题解:
8
旋转矩阵 - 北航 题解:
9
旋转矩阵 - 北航 题解:
10
旋转矩阵 - 北航 题解:暴力