自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Amo丶

更新一些自己做的题

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

原创 U盘文件乱码中病毒了,请教一下大家看看有没有办法解决。。。谢谢!!!

我先上图是变成了这样子,所有文件都锁住了,不能删除也不能格式化U盘,查杀了一下病毒没有查到,可以复制进去文件,复制进去的也可以复制出来。 发生的故事背景是这样的,我们团队去每个教室里招新,U盘里存着关于团队的文件和宣讲资料,大约去了十几个教室,回来之后没再用过,今天想找点东西,插上电脑之后,发现就已经挂掉了。 我真挺搞不懂我校的“傻逼同学们“这么有雅兴来做这种事...

2019-11-25 23:30:27 1594 1

原创 ICPC南昌邀请赛(B、G) 拉格朗日插值、 缩点

B:https://nanti.jisuanke.com/t/40254做两次插值,可以On得出a[n +1]的一项,然后前缀和,再做插值,针对每次查询,On处理ll a[maxn]; ll fac[maxn],invv[maxn],suf[maxn],pre[maxn] ;void Init(){ fac[0] = 1; fac[1] = 1; for(int i =...

2019-07-25 09:41:49 292

转载 Java虚拟机的总结(JYM)

看到了一篇很好的,先存上,慢慢看https://blog.csdn.net/qq_41701956/article/details/81664921

2019-06-12 17:35:58 666

原创 bzoj、codeforces、hdu等等的做题记录(更新中)

好久没写博客了,太菜了,先把最近写的题目记录放上来吧 ,马上省赛了也没办法写博客了近期所谓的难易程度都是根据自己的水平和对当前知识点的熟悉程度决定的,可能不太具有参考性?2019/5/29bzoj4240树状数组求逆序对 + 贪心(有个结论)(中)codeforces1167F 树状数组区间记录贡献 (难)codeforces1167E 双指针思维...

2019-06-05 16:54:35 187

原创 codeforces 1067F (Educational Codeforces Round 65 (Rated for Div. 2) F. Scalar Queries ) 树状数组计算贡献

F. Scalar Queriestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an arraya1,a2,…,ana1,a2,…,an. Allaiaiare pairw...

2019-05-29 12:17:22 179

原创 Avito Cool Challenge 2018 E. Missing Numbers(cf1081E)

E. Missing Numberstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputChouti is working on a strange math problem.There was a sequ...

2019-05-29 11:52:59 161

原创 Educational Codeforces Round 65 (Rated for Div. 2) E. Range Deleting (cf1067E)

E. Range Deletingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array consisting ofnnintegersa1,a2,…,ana1,a...

2019-05-29 11:36:55 194

原创 Codeforces Round #562 (Div. 2) ABCD

A. Circle Metrotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe circle line of the Roflanpolis subway hasnnstations.There ...

2019-05-27 03:21:04 498

原创 Codeforces Round #528 (Div. 2, based on Technocup 2019 Elimination Round 4) ABCD

A Right-Left Cipher standard input/output 1 s, 256 MB x5307 B Div Times Mod standard input/output 1 s, 256 MB x4423 C Connect Three standar...

2019-05-23 23:25:43 124

原创 hdu5418 Victor and World 状压最短路

Victor and WorldTime Limit: 4000/2000 MS (Java/Others)Memory Limit: 262144/131072 K (Java/Others)Total Submission(s): 2125Accepted Submission(s): 982Problem DescriptionAfter trying ha...

2019-05-23 23:11:29 174

原创 Codeforces Round #560 (Div. 3)ABCDEF1F2

今天下午总算把好久之前没打的div3开了一场vp,补掉了,全暴力,除了自己读题傻逼以外没什么好说的,,A Remainder standard input/output 1 s, 256 MB x3717 B Polycarp Training standard input/output 2 s, 256 MB ...

2019-05-23 00:48:44 177

原创 洛谷 P2473 [SCOI2008]奖励关 (概率dp&&状压)

题目背景08四川NOI省选题目描述你正在玩你最喜欢的电子游戏,并且刚刚进入一个奖励关。在这个奖励关里,系统将依次随机抛出k次宝物,每次你都可以选择吃或者不吃(必须在抛出下一个宝物之前做出选择,且现在决定不吃的宝物以后也不能再吃)。宝物一共有n种,系统每次抛出这n种宝物的概率都相同且相互独立。也就是说,即使前k-1 次系统都抛出宝物1(这种情况是有可能出现的,尽管概率非常小),第k次...

2019-05-23 00:32:16 156

原创 LightOJ - 1079 Just another Robbery(期望&概率DP)

As Harry Potter series is over, Harry has no job. Since he wants to make quick money, (he wants everything quick!) so he decided to rob banks. He wants to make a calculated risk, and grab as much mone...

2019-05-23 00:22:25 132

原创 LightOJ - 1038 Race to 1 Again(期望&概率DP)

Rimi learned a new thing about integers, which is - any positive integer greater than1can be divided by its divisors. So, he is now playing with this property. He selects a numberN. And he calls th...

2019-05-23 00:14:17 147

原创 LightOJ - 1030 Discovering Gold(期望&概率DP)

You are in a cave, a long cave! The cave can be represented by a1 x Ngrid. Each cell of the cave can contain any amount of gold.Initially you are in position1. Now each turn you throw a perfect6...

2019-05-23 00:09:39 107

原创 lightoj-1027Dangerous Maze(期望&概率DP)

You are in a maze; seeingndoors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all doors.If you choose theithdoor, it can either...

2019-05-23 00:03:33 204

原创 期望&概率DP-bzoj3063

具体链接不发了,因为涉及版权问题Description随着新版百度空间的下线,Blog宠物绿豆蛙完成了它的使命,去寻找它新的归宿。给出一个有向无环的连通图,起点为1终点为N,每条边都有一个长度。绿豆蛙从起点出发,走向终点。到达每一个顶点时,如果有K条离开该点的道路,绿豆蛙可以选择任意一条道路离开该点,并且走向每条路的概率为 1/K 。现在绿豆蛙想知道,从起点走到终点的所经过的路径总...

2019-05-21 20:43:53 212

原创 状压DP学习总结 (详解,适合没状压dp基础的人学习,还在更新中,,,,)

本次博客,主要是给学弟学妹们讲解一下状压dp,不适合有基础的同学观看,可能会浪费时间,因为偏基础先来最简单的一个吧 http://acm.hdu.edu.cn/showproblem.php?pid=1565hdu 1565方格取数(1)Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (...

2019-05-20 13:17:50 19549 5

原创 zoj4100 Vertices in the Pocket (浙江省赛A题,二分 + 线段树)

Vertices in the PocketTime Limit:2 Seconds Memory Limit:65536 KBDreamGrid has just found an undirected simple graph withvertices and no edges (that's to say, it's a graph withisolated v...

2019-05-09 13:58:04 340

原创 2019年湘潭大学程序设计竞赛(重现赛)H题 前缀和+分组背包

链接:https://ac.nowcoder.com/acm/contest/893/H来源:牛客网Chat时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述在Casya生活的世界里,一天由m个小时组成。最近Casya的女神终于答应在接下来的n天中与Casya聊天,Casya...

2019-05-05 14:58:49 335

原创 leetcode1004. Max Consecutive Ones III

1004.Max Consecutive Ones IIIMedium1806FavoriteShareGiven an arrayAof 0s and 1s, we may change up toKvalues from 0 to 1.Return the length of the longest (contiguous) subarray that contain...

2019-05-05 12:17:51 177

原创 2019年ICPC浙江省省赛 (solve9/13)

A题看博客链接:https://blog.csdn.net/qq_38185591/article/details/90031185B: Element Swapping (数学 + 思维)Time Limit:1 Second Memory Limit:65536 KBDreamGrid has an integer sequenceand he likes it ...

2019-05-02 20:11:32 335

原创 Codeforces Round #317 [AimFund Thanks-Round] (Div. 2) C. Lengthening Sticks 组合数学

C. Lengthening Stickstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given three sticks with positive integer lengths of...

2019-05-01 20:07:29 291

原创 Codeforces Round #500 (Div. 2) [based on EJOI] A B C D(思维 数学)

A:判断sum大小即可 (从a序列变成b序列,每个位置只能移走,或者交换) code略B:n个数,和一个x,现在有一个操作,a_i不变,或者变为a_i & x,问你最少几个操作可以使得a_i == a_i && i != j显然只有0,1,2,-1这几种答案 (我写的比较麻烦了,其实就是模拟判断一下)int a[maxn];int b[maxn];stri...

2019-04-23 04:07:17 183

原创 Educational Codeforces Round 63 (Rated for Div. 2) A B C D (贪心 + 思维 + dp)

A. Reverse a Substringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a stringssconsisting ofnnlowercase Latin...

2019-04-23 03:57:28 380

原创 Codeforces Round #492 (Div. 2) [Thanks, uDebug!] ABCDE (模拟 + 贪心 + 思维 + 随机化)

A:有5,20,,,,的金币,然后怎么怎么样,略B:有n个数,每次走一步,每个数都会减少1,当减少到0的时候就不会改变了,问你最少多少步可以走到是0的数上ll a[maxn];int main() { ios::sync_with_stdio(false); while(cin >> n){ for(int i = 1;i <= n;i...

2019-04-23 03:43:58 153

原创 2019年南昌ICPC邀请赛网络赛

A:直接跑一下printf("6\n28\n496\n8128\n33550336\n");K:跑一下会出来类似下面的规律然后四个作为一个循环节,推一下J:树剖加主席树模板I:单调栈跑一下两边最小值的问题,然后st表预处理前缀和,接着枚举最小值,找到最远做贡献的区间后,分类讨论如果是正数,那就后面区间的最大值-前面区间的最小值,如果是负数的话,就...

2019-04-20 17:28:33 791

原创 Codeforces Round #553 (Div. 2) AB DE(思维专场)

A:Maxim and BiologyB:Dima and a Bad XORD:Stas and the Queue at the BuffetE:Number of ComponentsA给一个字符串问你可以最少多少次操作可以让里面出现一个“ACTG”。操作就是字符+1或者-1。‘Z'+1='A'反之同理直接每隔4个跑一下,然后取个min就好了B(上...

2019-04-19 02:57:45 114

原创 bzoj2038 [2009国家集训队]小Z的袜子(hose) (简单莫队)

Description作为一个生活散漫的人,小Z每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z再也无法忍受这恼人的找袜子过程,于是他决定听天由命……具体来说,小Z把这N只袜子从1到N编号,然后从编号L到R(L尽管小Z并不在意两只袜子是不是完整的一双,甚至不在意两只袜子是否一左一右,他却很在意袜子的颜色,毕竟穿两只不同色的袜子会很尴尬。你的任务便是告诉小Z,他有多...

2019-04-18 17:48:12 105

原创 Codeforces Round #340 (Div. 2) E. XOR and Favorite Number (莫队暴力)

E. XOR and Favorite Numbertime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob has a favorite numberkandaiof lengthn. Now he...

2019-04-18 17:43:37 92

原创 Codeforces Round #552 (Div. 3) A B C D E F G (暴力,dp,模拟)

题目链接:https://codeforces.com/contest/1154A:Restoring Three NumbersB:Make Them EqualC:Gourmet CatD:Walking RobotE:Two TeamsF:Shovels ShopG:Minimum Possible LCMA:给定b-a、a+c、b+c、a+b+c的值求ab...

2019-04-17 03:02:22 273

原创 Codeforces Round #551 (Div. 2) E. Serval and Snake

E. Serval and Snaketime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is an interactive problem.Now Serval is a senior high s...

2019-04-16 19:52:06 353

原创 Codeforces Round #551 (Div. 2) D. Serval and Rooted Tree (思维 + dp)

传送门:https://codeforces.com/contest/1153/problem/DD. Serval and Rooted Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNow ...

2019-04-16 16:52:35 215

原创 牛客网删括号

链接:https://ac.nowcoder.com/acm/problem/21303来源:牛客网删括号时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 524288K,其他语言1048576K64bit IO Format: %lld题目描述给你一个合法的括号序列s1,每次你可以删除一个"()"你可以删除0个或者多个"()"求能否删成另一个括号序列s2...

2019-04-15 20:10:29 912

原创 2019年华南理工大学程序设计竞赛(春季赛)H Parco_Love_GCD (思维 + 数论 + 前缀和)

链接:https://ac.nowcoder.com/acm/contest/625/H来源:牛客网Parco_Love_GCD时间限制:C/C++ 3秒,其他语言6秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述众所周知,在算法竞赛中,出题人对他出的题的难度往往存在错误的估计。比如出题人本想出个中等题,没想...

2019-04-15 18:05:46 267

原创 桂林电子科技大学第三届ACM程序设计竞赛(LCA、dp、树形dp、后缀数组、贪心)

链接:https://ac.nowcoder.com/acm/contest/558#questionA:后缀数组模板题B:map标记一下C:链接:https://ac.nowcoder.com/acm/contest/558/C来源:牛客网题目描述小猫在研究二元组。小猫在研究最大值。给定N个二元组(a1,b1),(a2,b2),…,(aN,bN),请你从中选出恰...

2019-04-15 15:06:33 684

原创 小白月赛13 F:小A的最短路(LCA + dfs)

链接:https://ac.nowcoder.com/acm/contest/549/F来源:牛客网题目描述小A这次来到一个景区去旅游,景区里面有N个景点,景点之间有N-1条路径。小A从当前的一个景点移动到下一个景点需要消耗一点的体力值。但是景区里面有两个景点比较特殊,它们之间是可以直接坐观光缆车通过,不需要消耗体力值。而小A不想走太多的路,所以他希望你能够告诉它,从当前的位置出发到...

2019-04-13 00:37:57 188

原创 2018年 ICPC四川省省赛 I题  2812: Island (水题)

2812:IslandTime Limit:1000 MSMemory Limit:1048576 KBTotal Submit:91Accepted:17Page View:161SubmitStatusDiscussDescriptionRinne dreads sunlight, so she wants to find a refuge with t...

2019-04-12 09:25:18 359

原创 2018年四川ICPC省赛J题  2813: JoJo’s Bizarre Adventure (思维 + STL)

2813:JoJo’s Bizarre AdventureTime Limit:1000 MSMemory Limit:1048576 KBTotal Submit:60Accepted:12Page View:187SubmitStatusDiscussDescriptionDio and JoJo are playing a game.At the ...

2019-04-12 09:20:08 470

原创 洛谷 P1364 医院设置

题目描述设有一棵二叉树,如图:其中,圈中的数字表示结点中居民的人口。圈边上数字表示结点编号,现在要求在某个结点上建立一个医院,使所有居民所走的路程之和为最小,同时约定,相邻接点之间的距离为1。如上图中,若医院建在1 处,则距离和=4+12+2*20+2*40=136;若医院建在3 处,则距离和=4*2+13+20+40=81……输入输出格式输入格式:第一行一个整数...

2019-04-12 00:37:44 222

空空如也

空空如也

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

TA关注的人

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