首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
苍灵
2025年6月26日 15:33
旋转矩阵 - 北航 题解:C++ 关键在于顺时针旋转90度的公式
P1377
回复 0
|
赞 0
|
浏览 43
#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数组...
zhenhuaF
2025年3月24日 01:06
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 5
|
浏览 338
#include<bits/stdc++.h> using namespace std; int main(){ int n; int a[10][10]={0}; int b[10][10]={0}; int c[10][10]={0}; int d[10][10]={0}; int e[10][10]={0}; &nb...
zxjrheaven
2025年3月12日 18:45
旋转矩阵 - 北航 题解:暴力
P1377
回复 0
|
赞 12
|
浏览 776
#include <bits/stdc++.h> using namespace std; int juzhen1[10][10]; int juzhen2[10][10]; int juzhen3[10][10]; int juzhen4[10][10]; int jilu[10][10]; void du0(int n) { for(int i=0;i<n;i++) { for(int ...
18919717626
2025年3月11日 16:50
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 4
|
浏览 501
一直80%,找不到哪里错了,求大佬解惑 #include <bits/stdc++.h> using namespace std; int main(){ int a; cin>>a; int b[a][a],c[a][a]; int i,j; for(i=0;i<a;i++){ &...
爱学习的小妞
2025年3月8日 21:36
旋转矩阵 - 北航 题解:80%,求大佬解惑。
P1377
回复 1
|
赞 5
|
浏览 560
#include <stdio.h> #include <iostream> #include <iomanip> #include<math.h> #include <bitset> #include<vector> using namespace std; vector<vector<int>> distort(vector<vector<int>> a,int n) { vector<vector<int>> ...
dhh390
2025年3月8日 14:09
旋转矩阵 - 北航 题解:
P1377
回复 0
|
赞 6
|
浏览 523
#include<stdio.h> #include<stdlib.h> void rotate_90(int matrix[9][9],int n) { int tmp[9][9]; int i,j; for (i=0;i<n;i++) { for (j=0;j<n;j++) { tm...
安若少年
2025年3月2日 22:13
旋转矩阵 - 北航 题解:
P1377
回复 2
|
赞 9
|
浏览 452
有大佬可以帮我看下哪儿错了吗 一直是百分之80 #include <bits/stdc++.h> using namespace std; int main() { int x; while(cin>>x){ int flag1=1,flag2=1,flag3=1,flag4=1; int ch1[x][x]; int ch2[x][x]; &n...
RingoCrystal
2025年1月27日 11:28
旋转矩阵 - 北航 题解:旋转后判断
P1377
回复 0
|
赞 38
|
浏览 833
#include <bits/stdc++.h> using namespace std; vector<vector<int>> reverseMatrix(vector<vector<int>>a){ int n=a.size(); vector<vector<int>>b(n,vector<int>(n)); for(int i=0;i<a.size();i++){ for(int j=0;j<a[0].size()...
dnn_yyds
2024年9月4日 03:54
旋转矩阵 - 北航 题解:
P1377
回复 4
|
赞 18
|
浏览 2.2k
不知道哪里错了,能帮我瞅一眼不,上机小白,通过率一直是80%: # include <bits/stdc++.h> using namespace std; int main(){ int n; while( cin>>n){ int a[n][n] ; int b[n][n] ; int a1[n][n] ...
WaAutomaton
2020年4月11日 18:00
这道题oj上面的几个坑提醒注意
P1377
回复 6
|
赞 24
|
浏览 18.1k
1 多组输入输出,我一开始没有处理,只能通过50%,然而 北航的前面素数那道题,我也没有处理,竟然过了百分百; 2 旋转的时候记得 如果你只是设置了三个矩阵,一个作为旋转后的矩阵来做这道题的话,记得旋转90°之后,要更新之前用于选择的矩阵
1
2
3
4
题目
旋转矩阵 - 北航
题解数量
33
发布题解
在线答疑
热门题解
1
旋转矩阵 - 北航 题解:旋转后判断
2
旋转矩阵 - 北航 题解:
3
这道题oj上面的几个坑提醒注意
4
1377旋转矩阵
5
旋转矩阵(模拟 - 注意多组测试输入--第一次交没注意过了80%) - 北航 题解:
6
旋转矩阵 - 北航 题解:
7
旋转矩阵 - 北航 题解:暴力
8
旋转矩阵 - 北航 题解:
9
旋转矩阵 - 北航 题解:注意是多组数据输入,旋转三次还对不上就返回-1
10
旋转矩阵 - 北航 题解: