自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 【HDU 1695】GCD(莫比乌斯反演)

GCDTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 16412 Accepted Submission(s): 6314Problem DescriptionGiven 5 integers: a, b, c, d, k, ...

2018-09-28 17:30:09 216

原创 【数学技巧】整除分块

在对于求解∑i=1n⌊ni⌋\sum_{i=1}^{n} \lfloor\frac{n}{i}\rfloor∑i=1n​⌊in​⌋的时候,一般暴力跑的话需要O(n)O(n)O(n)的复杂度。但是很神奇的事情是有一段的⌊ni⌋\lfloor\frac{n}{i}\rfloor⌊in​⌋是相等的,这样对于每一段我们只需要计算一次即可。因此我们的代码可以这样写for(int l=1,r;l&lt...

2018-09-27 10:44:19 1797

原创 【codeforces Div2】Technocup 2019 - Elimination Round 1(A,B,C)

Technocup 2019 - Elimination Round 1比赛迟到了15分钟。(A)大水题就不说了,有1输出HARD,否则输出NO;#include<bits/stdc++.h>using namespace std;const int maxn = 1e6+10;const int INF = 0x3f3f3f3f;typedef long long ...

2018-09-24 15:24:55 348

原创 【2018 ICPC北京网赛】 A Saving Tang Monk II(BFS)

《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Cheng’en during the Ming Dynasty. In this novel, Monkey King Sun Wukong, pig ...

2018-09-22 17:52:34 326

原创 【BZOJ 1211】HNOI2004]树的计数(组合数学+Purfer序列)

1211: [HNOI2004]树的计数Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 3149 Solved: 1181[Submit][Status][Discuss]Description一个有n个结点的树,设它的结点分别为v1, v2, …, vn,已知第i个结点vi的度数为di,问满足这样的条件的不同的树有多少棵。给定n,d1,...

2018-09-21 18:29:35 219

原创 【杜教BM模板】焦作网赛L

杜教BM线性递推模板,黑科技啊 可以通过已知的前几项推出递推式ORZ#include <cstdio>#include <cstring>#include <cmath>#include <algorithm>#include <vector>#include <string>#include <m...

2018-09-17 08:36:02 349 2

原创 如何将代码上传到github

摸索了一番发现其实很简单, 1、首先我们需要申请一个github账号。 2、下载git bash 链接:点击进入官网 下载后打开是这个页面 3(绑定个人账号)、 输入:git config --global user.name +"用户名"git config --global user.email + "注册邮箱"//引号必须加上4、生成ssh keyss...

2018-09-12 22:05:56 351

原创 【codeforces 1036C】Classy Numbers(数位dp)

C. Classy Numbers time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputstandard output Let’s call some positive integer classy if its decimal representation c...

2018-09-12 21:21:34 489

原创 【POJ 3252】Round Numbers(数位dp)

Round Numbers Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 16160 Accepted: 6650DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play S...

2018-09-11 18:09:34 133

原创 【HDU 3555】Bomb(数位dp)

Bomb Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others) Total Submission(s): 23401 Accepted Submission(s): 8811Problem Description The counter-terrorists foun...

2018-09-11 17:05:34 106

原创 【牛客练习赛26 B】烟花(dp)

链接:https://www.nowcoder.com/acm/contest/180/B 来源:牛客网小a有个烟花,每个烟花代表着互不相同的颜色,对于第个烟花,它有的概率点燃,现在小a要去点燃它们,他想知道产生颜色的期望个数 及 产生恰好产生种颜色的概率输入描述: 第一行两个整数 接下来一行个数,第个数表示第个烟花被点燃的概率 输出描述: 输出有两行 第一行表示产生不同颜色的...

2018-09-09 10:48:36 246

原创 【Codeforces Round #508div2】(A,B,C,D)

A. Equality time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output You are given a string s of length n , which consists only of the firs...

2018-09-07 07:51:07 609

转载 BZOJ刷题指南

http://lbn187.is-programmer.com/posts/103404.html

2018-09-05 21:05:00 1519

原创 2013GCPC C题 Chess(BFS+路径打印)

https://www.jisuanke.com/contest/1546/100748 基础的BFS和路径输出,方向开多一点就好了。#include<bits/stdc++.h>using namespace std;const int maxn = 100050;struct point{ int x,y; int pre; int step...

2018-09-04 15:50:30 193

原创 【HDU 1104】Remainder (BFS+数论)

Remainder Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4720 Accepted Submission(s): 1192Problem Description Coco is a clever boy, wh...

2018-09-04 09:25:59 183

原创 【POJ 3522】Slim Span(生成树+暴力枚举)

Slim Span Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 9841 Accepted: 5196DescriptionGiven an undirected weighted graph G, you should find one of spanning trees specified ...

2018-09-03 20:31:08 194

原创 【HDU 3926】Hand in Hand(并查集+同构图)

Hand in Hand Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 122768/62768 K (Java/Others) Total Submission(s): 2757 Accepted Submission(s): 943Problem Description In order to get rid o...

2018-09-03 20:09:45 242

原创 【BZOJ 2763】[JLOI2011]飞行路线(分层图+最短路)

2763: [JLOI2011]飞行路线 Time Limit: 10 Sec Memory Limit: 128 MB Submit: 4862 Solved: 1913 [Submit][Status][Discuss] Description Alice和Bob现在要乘飞机旅行,他们选择了一家相对便宜的航空公司。该航空公司一共在n个城市设有业务,设这些城市分别标记为0到n-1,...

2018-09-02 16:23:04 252

空空如也

空空如也

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

TA关注的人

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