![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ccf
翱翔&天际
学知不足,业精于勤
展开
-
csp 回收站选址
//个人思路:根据题目描述先筛选出满足适合做垃圾站的坐标,然后再从这些垃圾站中判断每个垃圾站右上右下左上左下是否存在垃圾点(注意是垃圾点),每有一个加一分即可,根据题意即可。(详情见代码注释) //回收站选址 #include<iostream> using namespace std; #define max 1005 typedef struct { int x, y; int grbgBinFlag; //垃圾回收站标记,标记0代表不是站点 }GrbgPon;//垃...原创 2020-07-19 15:15:07 · 504 阅读 · 0 评论 -
csp 报数
//csp报数 #include <bits/stdc++.h> using namespace std; bool judge_seven(int a); int main() { int n; cin >> n; int sum[4] = {0}; int num = 0; while(n) { num += 1; if(judge_seven(num)) { sum[num % 4] += 1; continue; //...原创 2020-07-06 20:28:39 · 744 阅读 · 1 评论 -
csp 小明种苹果
题目链接 http://118.190.20.162/view.page?gpid=T94 //小明种树 #include <iostream> #include<cmath> #include <algorithm> using namespace std; const int n = 10001; //注意数据量的边界值 const int m =...原创 2020-03-22 21:10:41 · 248 阅读 · 0 评论 -
csp 小中大
题目链接 http://118.190.20.162/view.page?gpid=T89 //小中大 #include <iostream> #include <iomanip> #include<cmath> using namespace std; //#define Max 10000000 const int Max = 100005; i...原创 2020-03-22 21:03:24 · 126 阅读 · 0 评论 -
ccf买菜个人经验分享
试题名称: 买菜 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 小H和小W来到了一条街上,两人分开买菜,他们买菜的过程可以描述为,去店里买一些菜然后去旁边的一个广场把菜装上车,两人都要买n种菜,所以也都要装n次车。具体的,对于小H来说有n个不相交的时间段[a1,b1],[a2,b2]...[an,bn]在装车...原创 2019-03-06 15:27:18 · 898 阅读 · 2 评论