自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

nike0good |Oier&ACMer | 熟能生巧

有所作为是生活中的最高境界。

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

原创 BZOJ 4668(冷战-并查集按秩合并)

1946 年 3 月 5 日,英国前首相温斯顿·丘吉尔在美国富尔顿发表“铁幕演说”,正式拉开了冷战序幕。美国和苏联同为世界上的“超级大国”,为了争夺世界霸权,两国及其盟国展开了数十年的斗争。在这段时期,虽然分歧和冲突严重,但双方都尽力避免世界范围的大规模战争(第三次世界大战)爆发,其对抗通常通过局部代理战争、科技和军备竞赛、太空竞争、外交竞争等“冷”方式进行,即“相互遏制,不动武力”,因此称之为“冷战”。

2016-08-31 16:00:09 685

原创 BZOJ 3293/1465/1045([Cqoi2011]分金币/糖果传递/[HAOI2008] 糖果传递-列方程)

圆桌上坐着n个人,每人有一定数量的金币,金币总数能被n整除。每个人可以给他左右相邻的人一些金币,最终使得每个人的金币数目相等。你的任务是求出被转手的金币数量的最小值。经典问题 设第一个人给第二个人x个金币, 具体参考:http://www.cnblogs.com/CtrlCV/p/5626194.html#include<bits/stdc++.h>using namespace std;#

2016-08-31 03:09:23 468

原创 BZOJ 4612([Wf2016]Forever Young-二分)

BZOJ 1452 JSOI2009CountBZOJ 4240 有趣的家庭菜园BZOJ 3155 Preprefix sumBZOJ 2762 JLOI2011不等式组BZOJ 1537 POI2005Aut- The BusBZOJ 1452 [JSOI2009]Count 对每个权值建一颗BIT#include<bits/stdc++.h>using namespace std;

2016-08-31 03:00:33 659

原创 小鸡腿U R III 杭州2013

UVALive 6454 Lights Against DudelyUVALive 6455 Stealing Harry Potters PreciousUVALive 6456 Zhuge Liangs PasswordUVALive 6460 AntsUVALive 6454 Lights Against Dudely题目中能往4个方向转的灯只有一盏!!英语

2016-08-29 00:59:51 617

原创 BZOJ 4650([Noi2016]优秀的拆分-SA)

Description如果一个字符串可以被拆分为 AABBAABB 的形式,其中 AA 和 BB 是任意非空字符串,则我们称该字符串的这种拆 分是优秀的。例如,对于字符串 aabaabaa,如果令 A=aabA=aab,B=aB=a,我们就找到了这个字符串拆分成 AABBA ABB 的一种方式。一个字符串可能没有优秀的拆分,也可能存在不止一种优秀的拆分。比如我们令 A=aA=a,B=baa B

2016-08-27 18:24:18 1557

原创 小鸡腿U R I Dhaka2010

UVALive 4853 Emoogle BalanceUVALive 4854 A Digital Satire of Digital AgeUVALive 4855 Hyper BoxUVALive 4856 OmniGravityUVALive 4858 Digital MatrixUVALive 4859 Knockout TournamentsUVALive 4

2016-08-26 19:09:34 754

原创 小鸡腿U T10 Tokyo2014

[toc] 题目在这:http://judge.u-aizu.ac.jp/onlinejudge/contest/ICPCOOC2014/G.pdfUVALive 6832 Bit String Reordering#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional

2016-08-25 21:38:41 547

原创 小鸡腿U T9 Dhaka2015

Sum of MSLCMNumbered CardsThe Hypnotic SpiralsSum of MSLCM#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream>#include<cmath>#include<cct

2016-08-25 02:46:23 635

原创 小鸡腿U T8 CERC2015

ASCII AdditionBook BordersDigit DivisionHovering HornetKernel KnightsASCII Addition#include<bits/stdc++.h>using namespace std;#define For(i,n) for(int i=1;i<=n;i++)#define Fork(i,k,n) for(int i=

2016-08-23 21:36:07 944

原创 小鸡腿U T7 NEERC2011

[TOC] 题目:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=527ASCII Area#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional

2016-08-23 01:47:25 686

原创 Codeforces Round #368 (Div. 2) 题解

Brains PhotosBakeryPythagorean TriplesPersistent BookcaseGarlandsBrain’s Photos#include<bits/stdc++.h>using namespace std;#define For(i,n) for(int i=1;i<=n;i++)#define Fork(i,k,n) for(int i=k;i<

2016-08-22 10:48:08 316

原创 Codeforces Round #366 (Div. 1) 题解 (待补)

ThorAnt ManThor#include<bits/stdc++.h>using namespace std;#define For(i,n) for(int i=1;i<=n;i++)#define Fork(i,k,n) for(int i=k;i<=n;i++)#define Rep(i,n) for(int i=0;i<n;i++)#define ForD(i,n) for

2016-08-22 10:38:58 413

原创 小鸡腿U Extra 长春2015

Too RichCount a bDancing Stars on MeHouse BuildingToo Rich#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream>#include<cmath>#include<c

2016-08-21 21:36:53 420

原创 Codeforces Round #365 (Div. 2) 题解

Mishka and GameMishka and tripChris and RoadMishka and Interesting sumMishka and DivisorsMishka and Game#include<bits/stdc++.h>using namespace std;#define For(i,n) for(int i=1;i<=n;i++)#define F

2016-08-21 13:28:59 329

原创 小鸡腿U T6 2013FINAL

Self-AssemblyLow PowerPollution SolutionSelf-Assembly拆点连边,用拓扑排序判定有没有环#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream>#include<cmath>#

2016-08-21 11:05:51 420

原创 HDU 5519(Kykneion asma-NNT+CRT)

Kykneion asmaProblem Description On the last day before the famous mathematician Swan’s death, he left a problem to the world: Given integers n and ai for 0≤i≤4, calculate the number of n-digit intege

2016-08-19 19:17:12 1093

原创 小鸡腿U T4 福州2011

Alices mooncake shopMy World CupAlice’s mooncake shop#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream>#include<cmath>#include<cctype>#

2016-08-18 18:37:01 414

原创 小鸡腿U T3 成都2007

A Sequence of NumbersDavid ShoppingA Sequence of Numbers#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream>#include<cmath>#include<cctype

2016-08-18 18:33:15 360

原创 西安十五日游 day15 模拟赛

Gym 100524A Astronomy ProblemGym 100524G Game of Col on Bamboo ForestsGym 100512B Betting FastGym 100512D Dynamic LCAGym 100524A Astronomy Problem#include<cstdio>#include<cstrin

2016-08-16 14:32:41 619

原创 西安十五日游 day13 练习 【后缀自动机】

Lexicographical Substring SearchGlass Beadsstr2intAB StringNew Distinct SubstringsBoring countingLexicographical Substring Search给一个字符串,求第k大子串,经典题#include<cstdio>#include<cstring>#include<cstdli

2016-08-14 23:44:10 1063

原创 2016中国大学生程序设计竞赛 - 网络选拔赛 题解(待续)

HDU 5832 A water problemHDU 5833 Zhu and 772002HDU 5838 MountainHDU 5832 A water problem#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream

2016-08-14 23:29:49 566

原创 BZOJ 2669([cqoi2012]局部极小值-状态压缩+dp)

有一个n行m列的整数矩阵,其中1到nm之间的每个整数恰好出现一次。如果一个格子比所有相邻格子(相邻是指有公共边或公共顶点)都小,我们说这个格子是局部极小值。 给出所有局部极小值的位置,你的任务是判断有多少个可能的矩阵。(1<=n<=4, 1<=m<=7) 状压dp+容斥 容斥哪些X是此次DP的内容 dp[i][2^9] 表示该填i了 2^9表示哪些X被填了 首先dfs所有的X,看哪些X是

2016-08-14 23:23:58 593

原创 西安十五日游day8 模拟赛

UVALive 4493 That is Your QueueUVALive 4494 How Many Ones NeededUVALive 4495 Foot NotesUVALive 4496 A Match Making ProblemUVALive 4497 Games of BlockUVALive 4502 How Many basesUVALive 4493 T

2016-08-14 10:55:54 398

原创 西安十五日游 day12 练习 【AC 自动机】

Keywords Search病毒侵袭病毒侵袭持续中Word Puzzles考研路茫茫单词情结Resource ArchiverKeywords Search版子题#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream>#

2016-08-14 10:44:53 362

原创 西安十五日游day10 分治

CodeForces 484E Sign on FenceUVALive 7469 Distance on TriangulationHDU 4812 D TreeCodeForces 97B SupersetOpenJ_POJ C15C Rabbits FestivalHDU 5721 PalaceHDU 5755 Gambler BoCodeForces 484E Sign on F

2016-08-14 10:25:07 714

原创 2016 Multi-University Training Contest 8 题解

HDU 5821 BallphysicsRikka with Parenthesis IIHDU 5821 Ball#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream>#include<cmath>#include<cct

2016-08-11 19:17:07 324

原创 西安十五日游day9 母函数计算

排列Blocks红色病毒问题分拆数 五边形定理PartitionInteger Partition组合Big Event in HDUIgnatius and the Princess IIISquare Coins排列现在有一长度为N的字符串,满足一下条件: (1) 字符串仅由A,B,C,D四个字母组成; (2) A出现偶数次(也可以不出现); (3) C出现偶数次(

2016-08-10 08:34:16 411

原创 西安十五日游day7 博弈专题

HDU 3863 No GamblingHDU 2176 取m堆石子游戏HDU 2177 取2堆石子游戏HDU 2486 A simple stone gameHDU 1404 Digital DeletionsHDU 1729 Stone GameHDU 1760 A New Tetris GameHDU 1907 JohnHDU 2234 无题IHDU 2368 Alfredo

2016-08-10 08:24:47 527

原创 网络流专题2

BZOJ 1497 最大获利BZOJ 1565 植物大战僵尸HDU 5457 Hold Your HandBZOJ 1497 最大获利新的技术正冲击着手机通讯市场,对于各大运营商来说,这既是机遇,更是挑战。THU集团旗下的CS&T通讯公司在新一代通讯技术血战的前夜,需要做太多的准备工作,仅就站址选择一项,就需要完成前期市场研究、站址勘测、最优化等项目。在前期市场调查和站址勘测之后,公司得到了一共

2016-08-07 13:19:01 577

原创 网络流专题

Chips ChallengePerspectiveSightseeing tourOmbrophobic BovinesThe Maximum Number of Strong KingsSmart Network AdministratorIntergalactic MapFast Maximum FlowChips Challenge填坑Perspective一个小组若干球队,已

2016-08-07 10:50:16 480

原创 HDU 4115(Eliminate the Conflict-石头剪刀布,经典2sat问题)

有向图双联通性与逻辑判定 - 石头剪刀布 • 玩剪刀石头布,n把 • 给了A这n把都出了什么,问你B能否会赢 • 其中A会限制B某些局数出的要相同 • 某些局数出的要不同 • 只要B满足他的限制,并且没没有输掉任何一把就算赢A每局有2个状态,赢和平 令xi表示第i局A是否赢 2sat分8种情况讨论#include<bits/stdc++.h>using namespace std;

2016-08-05 22:26:29 539

原创 POJ 3321(Apple Tree-dfs序)

维护2个操作,树上单点修改,子树求和,算出dfs序,子树变成区间#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream>#include<cmath>#include<cctype>#include<ctime>#includ

2016-08-05 02:00:12 298

原创 HDU 4866(Shooting-主席树)

离散化注意, 注意把栈开大。#include<cstdio>#include<cstring>#include<cstdlib>#include<iostream>#include<cmath>#include<cctype>#include<ctime>#include<iomanip> #include<vector>#include<string>#include<que

2016-08-04 23:10:06 445

原创 HDU 4286(Data Handler-支持翻转的list)

要求维护一个seq,有两个光标(左光标和右光标)。 要求维护:移动光标,在光标前后加字母/删除,翻转两个光标间的序列 n<=500000,保证操作合法,左光标总在右光标左边至少一个字母前。如果没有翻转就是普通链表, 我们考虑将序列拆成左,光标之间,右三段 发现只需要考虑中间那段是否翻转过即可,如果翻转,则变头为尾,向链表一样维护#include<cstdio>#include<cstrin

2016-08-04 22:06:42 553

空空如也

空空如也

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

TA关注的人

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