首页
DreamJudge
院校信息
专业题库
模拟考试
机试真题
上岸课程
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
15984861226
2025年3月22日 01:05
Problem B 题解:C++
P1423
回复 0
|
赞 1
|
浏览 80
#include <iostream> #include <algorithm> using namespace std; int main(){ int m; cin>>m; int matrix[m][m]; int n=2*m+2; int ans[n]={0}; int p=0,q=m; &nbs...
kbgimf
2024年7月22日 09:14
Problem B 题解:
P1423
回复 0
|
赞 1
|
浏览 434
#include<bits/stdc++.h> using namespace std; int a[12][12],s[105]; int main(){ int n; cin>>n; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ ...
My_opt
2022年4月26日 18:09
c++
P1423
回复 0
|
赞 2
|
浏览 4.1k
#include <iostream> #include <algorithm> using namespace std; int n, a[11][11], res[30]; int main() { int n; cin >> n; for (int i = 1; i <= n; i ++ ) for (int j = 1; j <= n; j ++ ) cin >> a[i][j]; int cnt = 0; for (int i = 1; i <= n;...
tongzeliang
2022年4月24日 15:16
可能使用multiset更合理一些...
P1423
回复 0
|
赞 1
|
浏览 4.5k
#include<iostream> #include<set> #include<vector> using namespace std; class mycompare { public: bool operator()(const int a, const int b)const { return a > b; } }; ...
一只小黑
2022年3月6日 18:39
就说一点
P1423
回复 0
|
赞 1
|
浏览 5.0k
按答案来应该是求每行、列、主副对角线之和,而题目没提副对角线。。。 至于思路到不难,先初始化数组,然后计算每行、每列之和,结果保存在一个数组list中,再计算主、副对角线之和加入list,最后单独对list排序,我用的是选择排序。
题目
Problem B
题解数量
5
发布题解
在线答疑
热门题解
1
c++
2
Problem B 题解:C++
3
就说一点
4
Problem B 题解:
5
可能使用multiset更合理一些...