CCF-CSP
erdencimi
这个作者很懒,什么都没留下…
展开
-
CCF-CSP 2020-09-1 称检测点查询
#include<iostream>#include<vector>#include<algorithm>using namespace std;int main() { std::ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n, x, y; cin >> n >> x >> y; vector<pair&l.原创 2022-02-27 16:47:22 · 239 阅读 · 0 评论 -
CCF-CSP 202112-1 序列查询(C++)
#include<iostream>using namespace std;int main() { std::ios::sync_with_stdio(false); int n, N; cin >> n >> N; int sum = 0, preNum = 0; for (int i = 1; i <= n; ++i) { int num; cin >> num; sum += (num - preNum) * ...原创 2022-02-28 18:35:31 · 543 阅读 · 0 评论 -
CCF-CSP 2020-12-2期末预测之zui佳阈值
#include<iostream>#include<vector>#include<set>#include<unordered_map>#include<algorithm>using namespace std;const int MAX = 100005;unordered_map<int, pair<int, int>> arr;set<int> scores;int ans;.原创 2022-02-26 11:19:28 · 135 阅读 · 0 评论 -
CCF-CSP 2020-09-2 风险人群筛查
#include<iostream>using namespace std;int main() { std::ios::sync_with_stdio(false); int n, k, t, xl, xr, yd, yu; cin >> n >> k >> t >> xl >> yd >> xr >> yu; int passBy = 0, stay = 0; while (n--) {.原创 2022-02-27 17:15:03 · 132 阅读 · 0 评论 -
CCF-CSP 2019-12-2 回收站选址
原题链接#include<iostream>#include<map>using namespace std;map<pair<int, int>, int> points;int pos1[4][2] = { {-1, 0}, {1, 0}, {0, -1}, {0, 1} };int pos2[4][2] = { {-1, -1}, {-1, 1}, {1, -1}, {1, 1} };bool isRecycle(int x, i原创 2022-03-11 18:10:38 · 163 阅读 · 0 评论 -
CCF-CSP 2020-06-01 线性分类器
题目链接:线性分类器#include<iostream>#include<vector>using namespace std;struct TestNode { int x; int y; char type; TestNode(char c = ' '): x(0), y(0), type(c){}};//判断某一类点是否都在线段一侧bool isSameSide(vector<TestNode> points, int coef1,原创 2022-03-03 15:26:39 · 87 阅读 · 0 评论