- 博客(4)
- 收藏
- 关注
原创 2020牛客暑期多校训练营(第二场)Just Shuffle
题目这道题在打的时候没做出来(废话)然后补题时看了一点paper再看了别人的标程过了代码#include<bits/stdc++.h>#define ll long longusing namespace std;ll n,m,i,j,k,l,o,p,a[100005],v[100005],ans[100005],x,y,t;void egcd(ll x,ll y,ll &a,ll &b){ if(!y) { a=1; b=0
2020-07-15 16:34:42 292
原创 2020牛客暑期多校训练营(第二场)Boundary
题目描述一个很容易想到的思路:枚举两个点,算圆心,再枚举有几个点在圆上。明显超时。然后想了想,发现枚举两个点,把每个圆心坐标出现次数存起来,最大值+1就是ans代码#include<bits/stdc++.h>#define ll long longusing namespace std;typedef long double ld;typedef pair<ld,ld>P;P yx(ld x1,ld y1,ld x2,ld y2,ld x3,ld y3)
2020-07-14 16:26:39 265
原创 2020牛客暑假多校训练营(第二场)Fake Maxpooling
题目描述看这数据量5000*5000,一般的暴力就不行,于是就想到单调队列然后打了,在60分的时候报MLE,然后查了好久,把long long改int才过代码#include<bits/stdc++.h>#define ll long longusing namespace std;int g[5005][5005],Lcm[5005][5005],n,m,i,j,k,l,r,ans;struct node{ int c,i;};int gcd(int x,int y)
2020-07-14 14:31:45 250
原创 2020牛客暑期多校训练营(第二场)Cover the Tree
题目描述Given an unrooted tree, you should choose the minimum number of chains that all edges in the tree are covered by at least one chain. Print the minimum number and one solution. If there are multiple solutions, print any of them.输入描述:输出描述:连线的话最好是两个叶
2020-07-14 13:02:39 172
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人