自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Codeforces_1140E_有想法的分类讨论DP

Codeforces 1140E——有想法的分类讨论DP题目大意给一个长度为n的序列,其中-1的位置可被任意[1,k]的整数代替。要求是序列中的任意奇数长度子串不是回文串。问有多少种填充方案(不同序列)。思路首先转换题意,序列中的任意奇数长度子串不是回文串,可通过 a[i]≠a[i+2]a[i] \neq a[i+2]a[i]̸​=a[i+2] 条件满足,因为只要长度为3不满足,即可没...

2019-07-26 17:19:00 236

原创 Codeforces_1187D 居然是线段树

Codeforces 1187D——居然是线段树题目大意给n个数的序列a和b,对序列a可以选择子序列排序,问a能否变成b。思路对a序列的每个出现的数字,用队列来存储每次出现的位置。对于b序列中每个数字,对应的那个数字到当前位进行操作,且影响最小,就是两两排序,将那个位置的数交换过来,前提是,当前位置到应该在该位置的数的位置间的数字都不小于当前所需数字。即,我们需要知道,区间(当前位置,...

2019-07-26 10:47:29 202

原创 Codeforces 1138B——如何优雅地暴力

Codeforces 1138B——如何优雅地暴力题目大意马戏团有nnn(偶数)个艺术家,我们可知道,每个艺术家是否可以作为小丑表演,是否可以作为杂技演员表演。现需将其分成2个表演节目,每个表演节目的人数相等都为n/2n/2n/2,且要求第一个表演节目中能演小丑的人数与第二个表演节目中能演杂技演员的人数相等。输出一种方案。思路即艺术家们有4种:00,01,10,11。根据他们之间要求...

2019-07-25 17:08:50 206

原创 Codeforces gym101933 I 大数(Java&C++) 超递增背包

I. Intergalactic Biddingtime limit per test2.0 smemory limit per test256 MBinputstandard inputoutputstandard outputToday the Intergalactic Council of Pebble Coins (ICPC) conducted an...

2019-03-31 11:01:58 393

原创 FFT&容斥原理 HDU4609

3-idiotsTime Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8695    Accepted Submission(s): 3010 Problem DescriptionKing OMeGa catched thre...

2019-01-24 21:33:54 263

原创 Kattis aplusb A+B Problem FFT

A+B ProblemGiven NN integers in the range [−50000,50000][−50000,50000], how many ways are there to pick three integers aiai, ajaj, akak, such that ii, jj, kk are pairwise distinct and ai+aj=ak? Two ...

2019-01-24 20:11:43 224

原创 HDU1402 FFT大数乘法

A * B Problem PlusTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 28421    Accepted Submission(s): 7712 Problem DescriptionCalculate A *...

2019-01-24 18:44:37 268

原创 Codeforces Round #533 (Div. 2) C递推 D有趣有毒的BFS

第一次还是第二次打CF,太有趣了!切水题的能力太弱,暴力过题,暴力是美丽的艺术~AB暴力过,想的太慢。 C递归递推莽就完了,然而我一直在想数学统计的方法orz…C. Ayoub and Lost Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard ...

2019-01-21 21:25:08 306

原创 贪心&STL Codeforces1061D

D. TV Showstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn TV shows you want to watch. Suppose the whole time is sp...

2019-01-21 21:11:38 223

原创 ZOJ4029 预处理&二分&思路

 Now Loading!!! ZOJ - 4029  题目大意:对于每次问询求那个公式的结果,最后输出每次问询*第几次的和。记得之前组队训练时遇到过一次,当时同队的学姐提出了log的预处理,我想到了log的范围只有1~30,但是没再想下去。顺着上面的想法,我们就会想到预处理出a数组在每个log情况下的前缀和。对于每次问询,处理p的每个次方段里的a数组,每段里分母一样,...

2019-01-21 20:46:47 227

原创 左偏树 HYSBZ2809

2809: [Apio2012]dispatchingTime Limit: 10 Sec  Memory Limit: 128 MBSubmit: 5551  Solved: 2887[Submit][Status][Discuss]Description在一个忍者的帮派里,一些忍者们被选中派遣给顾客,然后依据自己的工作获取报偿。在这个帮派里,有一名忍者被称之为 Master。除...

2019-01-21 20:28:23 173

原创 HDU6109 并查集&set

数据分割Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2255    Accepted Submission(s): 666 Problem Description小w来到百度之星的赛场上,准备开始实现一个程序自动分析系统...

2019-01-21 19:59:46 252 1

原创 启发式合并 Codeforces1009F

F. Dominant Indicestime limit per test4.5 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given a rooted undirected tree consisting of nn ver...

2019-01-21 19:47:00 238

原创 启发式合并 Codeforces600E

E. Lomsat gelraltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rooted tree with root in vertex 1. Each vertex i...

2019-01-21 19:16:30 252

原创 计算几何 CSU1986 矩形相交问题

1986: 玄学Submit Page    Summary    Time Limit: 1 Sec     Memory Limit: 128 Mb     Submitted: 96     Solved: 16    Description阴阳师子浩君,最近从《初等数论》,《线性代数》,《组合数学》三大玄学宝典中,取得了玄学的精髓,发现,当画出两个矩形组成的样子的图案时候,就很...

2018-12-12 21:57:47 745

原创 组合数学 CSU2049 象棋

2049: 象棋Submit Page    Summary    Time Limit: 1 Sec     Memory Limit: 128 Mb     Submitted: 188     Solved: 48    Description車是中国象棋中的一种棋子,它能攻击同一行或同一列中没有其他棋子阻隔的棋子。一天,小度在棋盘上摆起了许多車……他想知道,在一共N×M个点的矩...

2018-12-12 16:40:53 337

原创 博弈论 (入门)CSU2209 记忆化搜索

2209: GameSubmit Page    Summary    Time Limit: 1 Sec     Memory Limit: 256 Mb     Submitted: 10     Solved: 5    Descriptionxrdog有一个有趣的算式 a^X+b*Y^2≥C现给定a,b和c,且初始的时候X=Y=0,xrdog和小砖准备玩一个游戏。游戏规则是...

2018-12-09 16:00:04 323

原创 贪心&公式推导 思路

MoneySubmit Page    Time Limit: 1 Sec     Memory Limit: 128 Mb     Submitted: 11     Solved: 8    DescriptionZJ开公司,年年荣登315晚会。315当天,一大帮员工来ZJ公司讨工资。(显然又欠工资了囧)。员工们围成一个圈,把ZJ围在中间,打算用暴力手段讨取工资。机智如...

2018-12-09 15:18:55 397 2

原创 组合数学 HDU1808 鸽笼原理

太久没写题了菜的一匹。哭辽。Halloween treatsTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1383    Accepted Submission(s): 572Special Judge Problem D...

2018-12-01 20:30:07 409

原创 二分图 板题 HDU2444 判断是否为二分图&求二分图最大匹配

The Accomodation of StudentsTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9512    Accepted Submission(s): 4176 Problem DescriptionTher...

2018-11-16 17:23:21 201

原创 UVALive 7040 F Color 容斥&组合数&快速幂&阶乘逆元

Recently, Mr. Big recieved n owers from his fans. He wants to recolor those owers with m colors. The owers are put in a line. It is not allowed to color any adjacent owers with the same color. Flowers...

2018-10-24 16:57:29 246

原创 UVALive 7261 A Xiongnu's Land 二分&思路

Wei Qing (died 106 BC) was a military general of the Western Han dynasty whose campaigns against the Xiongnu earned him great acclaim. He was a relative of Emperor Wu because he was the younger half-b...

2018-10-24 16:32:33 221

原创 2016亚洲区域赛北京赛区K JiLi Number

Driver Ji likes the digit “1”. He has an accumulator which shows the sum of input number. He lists all of positive number no more than N and starts counting from one, two, three . . . Every time he co...

2018-10-24 16:13:07 355

转载 码 博弈 UVALive-7725 Game of Taking Stones 大数 Java

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5747Two people face two piles of stones and make a game. They take turns to take st...

2018-10-02 18:45:43 177

原创 数论 UVALive-7728 Detachment 阶乘逆元

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5750In a highly developed alien society, the habitats are almost infinite dimension...

2018-10-02 18:42:02 324

原创 数论 UVALive-7726 A Simple Math Problem

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5748Given two positive integers a and b, find suitableX and Y to meet the conditi...

2018-10-02 18:21:42 207

转载 博弈 Nim游戏

Nim游戏转载自:https://blog.csdn.net/summer__show_/article/details/70185470?utm_source=copyNim游戏是博弈论中最经典的模型,它又有着十分简单的规则和无比优美的结论。Nim游戏是组合游戏(Combinatorial Games)的一种,准确来说,属于“Impartial Combinatorial Games...

2018-09-23 21:16:37 1172

原创 ACM-ICPC 2018 焦作赛区网络预赛 L Poor God Water 矩阵快速幂

Poor God Water 1000ms  65536KGod Water likes to eat meat, fish and chocolate very much, but unfortunately, the doctor tells him that some sequence of eating will make them poisonous.Every hour, ...

2018-09-15 21:59:16 542

转载 BM线性递推杜教模板 //ACM-ICPC 2018 焦作赛区网络预赛 L 为什么大家都会 留下了菜鸡的泪水

#include <bits/stdc++.h>using namespace std;#define rep(i,a,n) for (long long i=a;i<n;i++)#define per(i,a,n) for (long long i=n-1;i>=a;i--)#define pb push_back#define mp make_pair#...

2018-09-15 17:29:45 277

原创 二分 POJ3104 最小化最大值 水题 注意细节

DryingTime Limit: 2000MS   Memory Limit: 65536K Total Submissions: 22433   Accepted: 5676 DescriptionIt is very hard to wash and especially to dry clothes in winter. But Jane is a ...

2018-09-06 20:36:59 221

原创 ACM-ICPC 2018 南京赛区网络预赛 The_writing_on_the_wall 单调栈 思路

The writing on the wall 2000ms  262144KFeeling hungry, a cute hamster decides to order some take-away food (like fried chicken for only 30 Yuan).However, his owner CXY thinks that take-away food...

2018-09-04 19:35:53 222

原创 ACM-ICPC 2018 南京赛区网络预赛 签到水题

A An Olympian Math Problem 1000ms  65536KAlice, a student of grade 6, is thinking about an Olympian Math problem, but she feels so despair that she cries. And her classmate, Bob, has no idea about...

2018-09-01 23:22:01 205

原创 最短路 Dijkstra ACM-ICPC 2018 南京赛区网络预赛 K Magical Girl Haze

K Magical Girl HazeThere are N cities in the country, and M directional roads from u to v(1≤u,v≤n). Every road has a distance ci​. Haze is a Magical Girl that lives in City 1, she can choose no more...

2018-09-01 22:52:55 321

原创 CSU2089 状压BFS / 模拟&贪心

2089: Bit String ReorderingSubmit Page    Summary    Time Limit: 1 Sec     Memory Limit: 512 Mb     Submitted: 178     Solved: 83    DescriptionYou have to reorder a given bit string as specifie...

2018-08-29 17:52:49 225

原创 数论 CSU2021 降幂公式 NCPC2016

2021: ExponialSubmit Page    Summary    Time Limit: 1 Sec     Memory Limit: 512 Mb     Submitted: 243     Solved: 98    DescriptionEverybody loves big numbers (if you do not, you might want to s...

2018-08-29 13:38:26 305

原创 数论 2018CCPC网络选拔赛签到题1004

Find IntegerTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 6597    Accepted Submission(s): 1999Special JudgeProblem Descriptionpeople in...

2018-08-27 16:06:01 392 2

原创 数论 HihoCoder1195 高斯消元

#1195 : 高斯消元·一时间限制:10000ms单点时限:1000ms内存限制:256MB描述小Ho:喂不得了啦,那边便利店的薯片半价了!小Hi:啥?!小Ho:那边的便利店在打折促销啊。小Hi:走走走,赶紧去看看=v=于是小Hi和小Ho来到了便利店。老板为了促销,推出了组合包的形式,将不同数量的各类商品打包成一个组合,顾客可以选择组合进行购买。比如2袋薯...

2018-08-23 18:48:50 176

原创 数论 POJ1061 扩展欧几里德

青蛙的约会Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 128770   Accepted: 28142 Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前...

2018-08-21 20:36:04 156

原创 数论 HDU4990 快速幂模板

Reading comprehensionTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3106    Accepted Submission(s): 1218 Problem DescriptionRead the pr...

2018-08-21 16:19:37 217

原创 数论 51Nod1079 中国剩余定理

1079 中国剩余定理基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题一个正整数K,给出K Mod 一些质数的结果,求符合条件的最小的K。例如,K % 2 = 1, K % 3 = 2, K % 5 = 3。符合条件的最小的K = 23。Input第1行:1个数N表示后面输入的质数及模的数量。(2 <= N <= 10)第2 - N + 1...

2018-08-21 12:34:27 197

空空如也

空空如也

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

TA关注的人

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