CCF 201912-2 回收站选址 #include <iostream> #include <bits/stdc++.h> #include <string> using namespace std; vector<Point> xy; int a=0,b=0,c=0,d=0,e=0; void isJudge(Point temp) { int sum=0; int sum1=0; for(int i=0; i<xy.size(); i++) { if(xy[i].x==temp.x)...
CCF 201912-2 回收站选址(100分)Java 题目还没公布,先贴代码import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().run(); } public void run() { Scanner sc = new Scanner(System.in); int...
回收站选址(201912-2/CCF)———附带思路和完整代码,文章目录0效果1题目2思路3代码0效果难点:明白评分标准数据结构的选用1题目2思路首先明白的题目的评分是怎么评的。评分标
进入后点击报名入口,注册or登录,然后右上角有个模拟考试,点击去会看到95道往届CCF CSP认证真题。以下题解按考试日期编号。由于官网题面给的是图片,这里就不放题面了。给出每个题的链接。 文章较长,推荐您按Ctrl+F输入题目名字以快速找到题目。 2019年12月CCF CSP认证 201912-1 报数 【分析】签到题,题目数据很...
CCF 201912-2 回收站选址 开发技术 - 其它di**ds 上传86KB 文件格式 pdf 题目 C++代码: #include #include using namespace std; class point{ public: point operator()(int a,int b){ point apt; apt.x=a; apt.y=b; return apt; } bool operator<(const point &apt) const{ if(x!=apt...
CCF 201912-2 回收站选址 ///因为这道题的键值很大所以用数组来实现hash是不现实的,这时我们就要用map<node, int> ///来实现hash #include <iostream> #include <stdio.h> #include <algorithm> #include <math.h> #include <string.h> #include #include <stack> #include <math.h> using namespace...
输出用五行,每行一个整数,依次表示得分为0、1、2、3和4的回收站选址个数。样例1输入7 1 2 2 1 0 0 1 1 1 0 2 0 0 1 样例1输出0 0 1 0 0 样例1解释样例2输入2 0 0 -100000 10 样例2输出0 0 0 0 0 样例2解释不存在可选地址
CCF201912-2 回收站选址 解题思路:这道题唬人的在于坐标有正有负哈,刚开始不知道怎么下爪,仔细思考过后,我可是会面向对象编程的啊哈哈哈哈,我可是最喜欢封装了哈哈哈哈。 1.首先可以把每个点用一个结构体来定义,包含他的x,y坐标,以及该点的得分情况。因为最大有1000个点,可以再定义一个点的数组来存放输入的...
CCF201912-2 回收站选址 解题思路:这道题唬人的在于坐标有正有负哈,刚开始不知道怎么下爪,仔细思考过后,我可是会面向对象编程的啊哈哈哈哈,我可是最喜欢封装了哈哈哈哈。 1.首先可以把每个点用一个结构体来定义,包含他的x,y坐标,以及该点的得分情况。因为最大有1000个点,可以再定义一个点的数组来存放输入的...
CCF--201912-2 回收站选址 #include<iostream>usingnamespacestd;structnode{intx;inty;intflag =0;intscore =0; }node;intmain(){intn; cin >> n;structnodearr[n];intscores[5] = {0,0,0,0,0};for(inti =0; i < n; i++){ cin >> arr[i].x >> arr[i].y;...