• 2024-10-31WebMagic动态页面爬取
    动态页面爬虫前的准备:https://www.cnblogs.com/maohuidong/p/18517953一:javamaven添加依赖:<dependency><groupId>us.codecraft</groupId><artifactId>webmagic-core</artifactId><version>0.7.4</version></dependency>&
  • 2024-05-25使用网络爬虫爬取省市区县的经纬度
    我们从阿里云的数字可视化平台获取数据 http://datav.aliyun.com/tools/atlas爬取的链接如下:湖北省(不包含子区域):https://geo.datav.aliyun.com/areas_v3/bound/420000.json湖北地级市(包含子区域):https://geo.datav.aliyun.com/areas_v3/bound/420100_full.json(武汉市为例)湖北
  • 2024-04-25Codeforces Round 940 (Div. 2) and CodeCraft-23 题解
    CodeforcesRound940(Div.2)andCodeCraft-23题解题目链接A.Stickogon贪心#include<bits/stdc++.h>usingnamespacestd;#definefffirst#definesssecond#definepbpush_back#defineall(u)u.begin(),u.end()#defineendl'\n'#definedebu
  • 2024-04-23Codeforces Round 940 (Div. 2) and CodeCraft-23
    A.Stickogon#include<bits/stdc++.h>usingnamespacestd;usingi32=int32_t;usingi64=longlong;#defineinti64usingvi=vector<int>;constintN=3e5,mod=1e9+7;voidsolve(){ vicnt(101); intn; cin>>n; for(i
  • 2024-04-23Codeforces Round 940 (Div. 2) and CodeCraft-23
    CodeforcesRound940(Div.2)andCodeCraft-23前四题难度适中,总体还算不错,我想想都能做。E题考察威尔逊和质数筛前缀和算贡献。F题是数据结构,据说很版,还没补。A题:题意:给出n个木棍,最多组成多少个多边形Solution:统计各长度木棍的数量,全部贪心成三角形voidsolve(){ cin>>n;
  • 2024-04-22Codeforces Round 940 (Div. 2) and CodeCraft-23 (补题中的小白)
    A.Stickogon思路:Code:#include<bits/stdc++.h>usingnamespacestd;voidsolve(){intn;cin>>n;map<int,int>mp;for(inti=1,x;i<=n;i++){cin>>x;mp[x]++;}intans=0;f
  • 2024-04-22Codeforces Round 940 (Div. 2) and CodeCraft-23
    目录写在前面ABCDE写在最后写在前面比赛地址:https://codeforces.com/contest/1957。大病场妈的A签到。尽可能凑三角形。///*By:Luckyblock*/#include<bits/stdc++.h>#defineLLlonglong//=============================================================//======