自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (2)
  • 收藏
  • 关注

原创 莫比乌斯反演

其中μ()函数是莫比乌斯函数,定义是:如果d=1 , μ(d)=1如果dd为互异质1p2p2…pk的乘积,则μ(d)=(−1)k否则,μ(d)=0所以线性筛莫比乌斯函数往后看,几乎每段代码里都有。bool is[maxn];int pri[maxn],miu[maxn];void init(){//首先把莫比乌斯函数筛出来 miu[1]=1; for(in...

2018-11-30 17:36:20 83 1

原创 Alice and Bob are on Bikes URAL - 2105

Alice and Bob, after played enough and completely figured out the game with colored strip, decided to ride bikes around the fountain on a circular path of length L. Alice rides with a speed v A, Bob —...

2018-11-30 16:00:40 141

原创 Coffee Break Gym - 101911A

Recently Monocarp got a job. His working day lasts exactly mm minutes. During work, Monocarp wants to drink coffee at certain moments: there are nn minutes a1,a2,…,ana1,a2,…,an, when he is able and wi...

2018-11-30 15:59:07 239

原创 Tourism on Mars URAL - 2109 (LCA,线段树)

LCA博客  https://blog.csdn.net/sdut_jk17_zhangming/article/details/84592285  Few people know, but a long time ago a developed state existed on Mars. It consisted of n cities, numbered by integers ...

2018-11-28 21:45:05 161

原创 倍增LCA

#include<cstdio>#include<vector>#include <bits/stdc++.h>using namespace std;struct node{ int v,next;}e[5000005]; //存边int n;int cnt;int head[200005]; int dep[200005]; ...

2018-11-28 20:53:03 109 1

原创 擂台赛出题

1 家里有矿命题人:7989知识点:难度:2时间限制:1000ms内存限制:65536KiB 描述   作为ACM队里的女装大佬,小P家里非常有钱,不仅有矿,还有好多个,这不小P正在为矿场的事烦恼,事情是这样的:小P想给矿场围着围栏,可他不知道需要多长的围栏才能把所有的矿场围在一起(注意,围栏为平行于坐标轴的正方形)。如果你能帮他解决这个问题,他会送你一件女装作为感...

2018-11-21 21:22:20 197

原创 Debate CodeForces - 1070F

Elections in Berland are coming. There are only two candidates — Alice and Bob.The main Berland TV channel plans to show political debates. There arennpeople who want to take part in the debate as...

2018-11-21 21:18:58 280

原创 BerOS File Suggestion CodeForces - 1070H

Polycarp is working on a new operating system called BerOS. He asks you to help with implementation of a file suggestion feature.There are nn files on hard drive and their names are f1,f2,…,fnf1,f2,...

2018-11-21 21:15:33 196

原创 Frog and Portal HihoCoder - 1873

A small frog wants to get to the other side of a river. The frog is initially located at one bank of the river (position 0) and wants to get to the other bank (position 200). Luckily, there are 199 le...

2018-11-21 21:12:14 166

原创 Halloween Costumes LightOJ - 1422 (区间Dp)

Gappu has a very busy weekend ahead of him. Because, next weekend is Halloween, and he is planning to attend as many parties as he can. Since it's Halloween, these parties are all costume parties, Gap...

2018-11-09 17:03:11 158

原创 Pangu and Stones HihoCoder - 1636 (区间dp)

In Chinese mythology, Pangu is the first living being and the creator of the sky and the earth. He woke up from an egg and split the egg into two parts: the sky and the earth.At the beginning, there...

2018-11-07 11:35:20 185

原创 Divisors CodeForces - 448E

Bizon the Champion isn't just friendly, he also is a rigorous coder.Let's define function f(a), where a is a sequence of integers. Function f(a) returns the following sequence: first all divisors of...

2018-11-06 11:01:52 235

原创 齿轮 HYSBZ - 4602

现有一个传动系统,包含了N个组合齿轮和M个链条。每一个链条连接了两个组合齿轮u和v,并提供了一个传动比x : y。即如果只考虑这两个组合齿轮,编号为u的齿轮转动x圈,编号为v的齿轮会转动y圈。传动比为正表示若编号为u的齿轮顺时针转动,则编号为v的齿轮也顺时针转动。传动比为负表示若编号为u的齿轮顺时针转动,则编号为v的齿轮会逆时针转动。若不同链条的传动比不相容,则有些齿轮无法转动。我们希...

2018-11-06 11:01:09 257

原创 最小生成树 (prim)

void prim(int n){ int i,j,pos,min,sum=0; for(i = 1;i <= n;i++) { dist[i] = map[1][i]; } book[1] = 1; for(i = 2;i <= n;i++) { pos = i; min = ...

2018-11-05 15:28:57 125

原创 Colonial Mansions Gym - 101962I (线段树+二分)

After a year of hard work, Mano finally had a month off. He decided to take his grandmother to Soteropolis during this time. As soon as they arrived at the airport, Mano bought one of these "10 things...

2018-11-02 15:24:45 338

原创 Press the Button ZOJ - 4056

BaoBao and DreamGrid are playing a game using a strange button. This button is attached to an LED light (the light is initially off), a counter and a timer and functions as follows: When the button...

2018-11-01 10:17:01 266

ACM国际大学生程序设计竞赛:知识与入门 俞勇

acm国际大学生程序设计竞赛(acm-icpc)是国际上公认的水平最高、规模最大、影响最深的计算机专业竞赛,目前全球参与人数达20多万。本书作者将16年的教练经验与积累撰写成本系列丛书,全面、深入而系统地将acm-icpc展现给读者。本系列丛书包括《acm国际大学生程序设计竞赛:知识与入门》、《acm国际大学生程序设计竞赛:算法与实现》、《acm国际大学生程序设计竞赛:题目与解读》、《acm国际大学生程序设计竞赛:比赛与思考》等4册,其中《acm国际大学生程序设计竞赛:知识与入门》介绍了acm-icpc的知识及其分类、进阶与角色、在线评测系统;《acm国际大学生程序设计竞赛:算法与实现》介绍了acm-icpc算法分类、实现及索引;《acm国际大学生程序设计竞赛:题目与解读》为各类算法配备经典例题及题库,并提供解题思路;《acm国际大学生程序设计竞赛:比赛与思考》介绍了上海交通大学acm-icpc的训练及比赛,包括训练札记、赛场风云、赛季纵横、冠军之路、峥嵘岁月。

2018-08-29

ACM国际大学生程序设计竞赛:算法与实现 俞勇

acm国际大学生程序设计竞赛(acm-icpc)是国际上公认的水平最高、规模最大、影响最深的计算机专业竞赛,目前全球参与人数达20多万。本书作者将16年的教练经验与积累撰写成本系列丛书,全面、深入而系统地将acm-icpc展现给读者。本系列丛书包括《acm国际大学生程序设计竞赛:知识与入门》、《acm国际大学生程序设计竞赛:算法与实现》、《acm国际大学生程序设计竞赛:题目与解读》、《acm国际大学生程序设计竞赛:比赛与思考》等4册,其中《acm国际大学生程序设计竞赛:知识与入门》介绍了acm-icpc的知识及其分类、进阶与角色、在线评测系统;《acm国际大学生程序设计竞赛:算法与实现》介绍了acm-icpc算法分类、实现及索引;《acm国际大学生程序设计竞赛:题目与解读》为各类算法配备经典例题及题库,并提供解题思路;《acm国际大学生程序设计竞赛:比赛与思考》介绍了上海交通大学acm-icpc的训练及比赛,包括训练札记、赛场风云、赛季纵横、冠军之路、峥嵘岁月。

2018-08-23

空空如也

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

TA关注的人

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