![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
csp
全全全呀
在读本科生,欢迎一起交流讨论学习
展开
-
csp20200602稀疏矩阵
源代码如下:#include<iostream>using namespace std;typedef struct{ int x; int y; }stru;int main(){ //ios::sync_with_stdio(false); int n,a,b; cin>>n>>a>>b; stru m[a],s[b]; for(int i=0;i<a;i++) cin>>m[i].x>>m.原创 2020-09-05 16:17:51 · 241 阅读 · 1 评论 -
csp20200601 线性分类器
源代码如下:#include<iostream>using namespace std;typedef struct { int x; int y; char t;}stru1;typedef struct { int x; int y; int z;}stru2;int main(){ int n,m; cin>>n>>m; stru1 a[n]; stru2 b[m]; for(int i=1;i<=n;i++) cin.原创 2020-09-05 00:43:48 · 179 阅读 · 0 评论 -
CSP考试20190902小明种苹果(续)C++实现
给出的两个实例得出的结果都正确,检查了很久也没有发现哪里错了,希望哪位大佬发现了错误帮忙指正!源代码:#include<iostream>using namespace std;int main(){ int m; int T=0,D=0,E=0; int x; int N; cin>>N; int i,j; int point[100]={0}; for(i=0;i<N;i++){ int temp; cin>>m; //数量.原创 2020-07-08 09:56:33 · 255 阅读 · 0 评论 -
csp考试20190901小明种苹果 C++代码
源代码#include<iostream>using namespace std;int N,M;int main(){ int T=0; int k=0; int P=0; cin>>N>>M; int i,j; int x; //记录输入的苹果数目和蔬果数目 for(i=0;i<N;i++){ int temp=0; //中间变量,记录每个果树上面的蔬果数目 cin>>x; T+=x; for(j=.原创 2020-07-06 09:59:38 · 371 阅读 · 0 评论 -
csp考试20191202回收站选址
使用结构体来存储各点,访问次数最多的的函数就是Find函数,用来寻找结构体中是否有坐标分别和形参x和y相等,相等的话返回true,没有的话返回false。判断是否可以作为选址以及计算得分的时候都需要调用#include<iostream>#include<algorithm>using namespace std;typedef struct{ int x; int y;}Point; //使用结构体进行存储各点 Point point[1000];int .原创 2020-06-27 09:49:36 · 174 阅读 · 0 评论 -
csp考试20191201报数
#include<iostream>using namespace std;bool judge(int n) { if (n % 7 == 0) return true; else { while (n) { if (n % 10 == 7) return true; n /= 10; } } return false;}int...原创 2020-03-29 20:50:38 · 379 阅读 · 0 评论