代码菜鸡之CSP真题
文章平均质量分 78
xxatz
这个作者很懒,什么都没留下…
展开
-
2019-03 CSP真题
2019-03 CSP真题1. 小中大思路:#include<bits/stdc++.h>using namespace std;#define rep(i, a, b) for(int i = (a); i <= (b); i++)#define per(i, a, b) for(int i = (a); i >= (b); i--)#define ll long long#define db double#define VI vector<int>原创 2021-11-30 00:32:36 · 110 阅读 · 0 评论 -
2020-12 CSP真题
2020-12 CSP真题1. 期末预测之安全指数思路:#include<bits/stdc++.h>using namespace std;#define maxn 100005int n, w[maxn], s[maxn], sum = 0;int main(){ cin >> n; for(int i = 1; i <= n; i++){ cin >> w[i] >> s[i]; s原创 2021-11-30 00:30:02 · 201 阅读 · 0 评论 -
2021-09 CSP真题
2021-09 CSP真题1. 数组推导思路:#include<bits/stdc++.h>using namespace std;#define rep(i, a, b) for(int i = (a); i <= (b); i++)#define per(i, a, b) for(int i = (a); i >= (b); i--)#define ll long long#define db double#define VI vector<int&g原创 2021-11-30 00:20:09 · 1705 阅读 · 0 评论 -
2021-04 CSP真题
2021-04 CSP真题1. 灰度直方图思路:#include <iostream>#include <cstdio>#include <cmath>#include <cstring>#include <cstdlib>#include <vector>#define fora(i, a, b) for(int i = a; i <= b; i++)#define fors(i, a, b) for(i原创 2021-11-30 00:19:36 · 264 阅读 · 0 评论 -
2020-09 CSP真题
2020-09 CSP真题1. 检测点查询思路:#include<bits/stdc++.h>using namespace std;int n, xx, yy;struct AC{ int x, y, num, dis2;}note[205];bool cmp(AC a, AC b){ if(a.dis2 == b.dis2) return a.num < b.num; return a.dis2 < b.dis2;}int mai原创 2021-11-30 00:17:39 · 576 阅读 · 0 评论 -
2020-06 CSP真题
2020-06 CSP真题1. 线性分类器思路:#include<bits/stdc++.h>using namespace std;#define rep(i, a, b) for(int i = (a); i <= (b); i++)#define per(i, a, b) for(int i = (a); i >= (b); i--)#define ll long long#define db double#define VI vector<int&原创 2021-11-30 00:16:45 · 566 阅读 · 0 评论