自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

张洪基

keep hungry and calm

  • 博客(17)
  • 收藏
  • 关注

原创 Codeforces Round #528 (Div. 2, based on Technocup 2019 Elimination Round 4) D. Minimum Diameter Tree

题意:已知n个点,总和为s的边加权,让你分配边权使得构成树的的直径最大和最小不用考虑构造树 每次分配的时候要考虑两边边权均等,一边增加减小都会影响另一边,找边度为1的两个点找最短路径就能满足直接对s进行均分*2#include <bits/stdc++.h>using namespace std;int du[100005] = {0};int main(){...

2020-02-27 17:10:07 103

原创 Codeforces Round #580 (Div. 2) C. Almost Equal (思维+数学)

题意:给定n,在一个2n多边形内满足相邻三条边x,a,b,y满足x+a+b=a+b+y+1或者x+a+b=a+b+y-1n为奇数的时候可以满足,为偶数的时候不满足输出NOtypedef long long ll;const ll maxn=2e5+10;ll n,a[maxn];int main() { scanf("%lld",&n); if(n&amp...

2020-02-26 22:18:30 208

原创 Codeforces Round #580 (Div. 2) D. Shortest Cycle (floyd求最小环)

You are given n integer numbers a1,a2,…,an. Consider graph on n nodes, in which nodes i, j (i≠j) are connected if and only if, ai AND aj≠0, where AND denotes the bitwise AND operation.Find the length...

2020-02-26 21:09:12 109

原创 Codeforces Round #623 (Div. 2, based on VK Cup 2019-2020 - Elimina F. Moving Points (树状数组)

F. Moving Pointstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n points on a coordinate axis OX. The i-th point is located at the ...

2020-02-26 01:09:54 176

原创 Codeforces Round #624 (Div. 3) E. Construct the Binary Tree(模拟二叉树)

Description:You are given two integers nnn and ddd. You need to construct a rooted binary tree consisting of n vertices with a root at the vertex 111 and the sum of depths of all vertices equals to d...

2020-02-25 22:32:58 288

原创 Codeforces Round #623 (Div. 2, based on VK Cup 2019-2020 - Elimina D. Recommendations(并查集)

time limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputVK news recommendation system daily selects interesting publications of one of n disjoint cate...

2020-02-24 16:29:14 407

原创 Codeforces Round #575 (Div. 3) D2. RGB Substring (hard version)

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe only difference between easy and hard versions is the size of the input.You are given...

2020-02-23 15:47:57 226

原创 Codeforces Round #544 (Div. 3) E. K Balanced Teams(DP)

time limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are a coach at your local university. There are n students under your supervision, the pro...

2020-02-22 21:53:51 168

原创 Codeforces Round #545 (Div. 2) D. Camp Schedule(KMP next数组使用)

time limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputThe new camp by widely-known over the country Spring Programming Camp is going to start soon. H...

2020-02-22 19:45:05 121

原创 Codeforces Round #620 (Div. 2) C. Air Conditioner

DiscriptionGildong owns a bulgogi restaurant. The restaurant has a lot of customers, so many of them like to make a reservation before visiting it.Gildong tries so hard to satisfy the customers that...

2020-02-16 22:46:28 285

原创 2020/2/15日志

这一周cf比赛很频繁,中间掉了两次,之后赶上来了昨天情人节那场估计都在陪npy过节吧hhh,出的三道题都没有难的算法,单身狗的上分夜~今晚的比赛还是关于思维,不过当时在交第一题的时候交错题目一直wawawa,最后搞到头铁心态都崩了明天补题...

2020-02-15 22:47:52 92

原创 2020/2/13日志

最近cf很频繁昨晚教育div2 今晚还有一场div2思维冲冲冲然后vj上经常交不上不知道为什么冲冲冲

2020-02-13 11:16:03 94

转载 数论——佩尔方程变量分解

最小解,记作(x1,y1),则所有的解(xi,yi)由以下的递回关系式得到:各个变量的通项公式:

2020-02-11 23:54:39 158

原创 Codeforces Round 1300 D Aerodynamic(思维+中学数学)

#include<bits/stdc++.h>using namespace std;#define ll long longconst int maxnn=1e5+50;ll x[maxnn],y[maxnn];int n;int judge(){ for(int i=1;i<=n/2;i++) { int j=i+n/2; ...

2020-02-10 22:30:59 247

原创 2020/2/9日志

前不久刚刚复习了01字典树,然后今天cf的c题就出了一道异或函数最大值计算序列,然后不知道怎么想的就按思路敲了半个小时…其实还是找规律,找到最大的之后根本无需考虑接下来的数列,f(a,b)函数看起来很麻烦实际简化了二进制每次末尾判断的运算,然后就转化为二进制串的处理问题就有很明显了,早该想到cf题目应该不会直接这么裸的算法,但也发现自己写生疏算法的时候还是不够果断,明天早起看看以前写的博客吧...

2020-02-10 01:16:52 100

原创 2020/2/5日志

刚刚知道div3在1600之上几乎全是1A(爬,明明尽在咫尺结果又掉分早知道就手快读慢点打了,这次div3的e1e2也能做,但是敲完前四道就只剩下十分钟了,也就只读完题碰了碰运气。之后分析了分析如果每道题加快5min的出题速度e1也是有希望的。最近一直在研究cf的题目,数论练习没有特别刻意的刷过,依旧保持着原来的速度。斗志上继续加把劲。好像有些嗜睡,可能是家里过于舒服了?总感觉罪恶感挺深的。...

2020-02-05 23:51:56 134

原创 2020/2/2日志

前天div2题目思路比较绕题目出的很慢,c题快结束前才调出来,如果没有延长半小时可能就是掉分场了,今天还有一场div3思维,打算报上继续锻炼手速思维,最近专题做起来心有余而力不足,一道题分析半天出来一交就wa很很无奈,两边都要更加努力阿,加油...

2020-02-04 09:53:52 116

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除