上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 25 下一页
摘要: 首先来认识一下矩阵乘法,矩阵乘法就是两个矩阵相乘,当然,要相乘的话还要满足一定条件——第一个矩阵的列数等于第二个矩阵的行数 具体来演示一下矩阵运算的规则: 矩阵的运算如上所示,更具体的需要去学离散数学,(大一狗表示没学呜呜),然后对于就两个矩阵相乘,代码如下: 1 for(int i=0;i<n;i 阅读全文
posted @ 2022-04-16 20:55 江上舟摇 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805117167976448 评价:不太好做; 首先,题目上来给的概念就很模糊,但是仔细一看,对于找重合和排序问题的话,集合是最拿手的,所以我们用集合来处理这道题 阅读全文
posted @ 2022-04-16 20:31 江上舟摇 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805133597065216 这道题处理起来相当麻烦,但是实际上是个模拟题 我们拿到这道题该怎么处理呢? 首先,题目要求让我们进行分数运算的同时最后输出既约分数形式 阅读全文
posted @ 2022-04-16 19:27 江上舟摇 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 来到数论王国,一切都得重新开始啦 模运算,顾名思义,对一个数进行取模运算,在大数运算中,模运算是常客 如果一个数太大无法直接输出,或者是不需要直接输出,可以对他进行取模缩小数值在输出 我们习惯这样写:a%b=c 取模的结果一般满足于0<=c<=m-1,m一般是题目给的数据范围 而对于取模操作,满足一 阅读全文
posted @ 2022-04-14 21:23 江上舟摇 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 姥姥手下留情出的水题,但我调了将近一个小时才出来呜呜 题目链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805080346181632 这道题目考察的是对于字符串的理解; 其实也不算是很难,但就是容易考虑不到点子上; 阅读全文
posted @ 2022-04-14 20:02 江上舟摇 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 我男神出的,并且题目质量还是有的,拿来讲讲吧 题目链接:https://pintia.cn/problem-sets/994805046380707840/problems/994805084284633088 话说这个题对光棍们||单身狗们可不太友好啊呜呜呜 首先拿到题目,打眼一看,这个数字用lo 阅读全文
posted @ 2022-04-14 19:54 江上舟摇 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 28. /*#pragma GCC optimize(3)//pta判断素数 #include<bits/stdc++.h> using namespace std; int n; int main() { std::ios::sync_with_stdio(false); cin>>n; whil 阅读全文
posted @ 2022-04-14 19:37 江上舟摇 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 数据结构上机作业,对二叉树的操作考察还是比较全面的 1 //写完作业咯 2 #include<bits/stdc++.h> 3 using namespace std; 4 const int N=1010; 5 int n; 6 int pre[N];//先 7 int in[N];//中 8 i 阅读全文
posted @ 2022-04-14 10:11 江上舟摇 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 16. 1 #pragma GCC optimize(3)//pta檢查身份證 2 #include<bits/stdc++.h> 3 using namespace std; 4 int n; 5 char ch[12]={'1','0','X','9','8','7','6','5','4',' 阅读全文
posted @ 2022-04-12 20:12 江上舟摇 阅读(26) 评论(0) 推荐(0) 编辑
摘要: 1.水 2. 1 #include<bits/stdc++.h>//PTA打印沙漏 2 using namespace std; 3 int main() 4 { 5 int N,s=1,n=2; 6 char c; 7 cin>>N>>c; 8 while(N-s>=0) 9 { 10 s+=2* 阅读全文
posted @ 2022-04-11 17:06 江上舟摇 阅读(28) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 25 下一页