自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 2020 ICPC Universidad Nacional 题解

文章目录E - Enter to the best problem of this contest!G - Great dinnerK - Katastrophic sortM - Magic spellsA -A -A -题目链接 2020 ICPC Universidad Nacional de Colombia Programming ContestE - Enter to the best problem of this contest!题意分析代码G - Great di

2020-10-11 22:34:58 337 1

原创 2019 ICPC Malaysia National 题解

文章目录A - Mental Rotation [模拟]B - SpongeBob SquarePants [签到]C - I Don't Want To Pay For The Late Jar! [签到]D - Ali The Multi-billionaire 1E - Optimal SlotsA -A -A -A -A -A -题目链接 2019 ICPC Malaysia NationalA - Mental Rotation [模拟]题意对于 N×MN \times MN×M 的矩

2020-10-09 09:26:53 862 2

原创 2018浙江省省赛 题解

文章目录A - PeakB - King of KaraokeC - 1D - 1E - 1F - Now Loading!!! [前缀和][二分]G - JUMPin' JUMP UP!!! 1H - Game on a Tree 1I - Magic Points 1J - CONTINUE...?K - Mahjong Sorting 1L - Doki Doki Literature ClubM - Lucky 7题目链接 2018浙江省省赛A - Peak题意判断这个序列是否为山

2020-10-09 09:26:25 398

原创 [Codeforces Round #668 (Div. 2)]1405

文章目录A - Permutation ForgeryB - Array CancellationC - Balanced Bitstring [思维]D - Tree Tag [博弈][dfs][树的直径] ★★E - Fixed Point Removal [线段树] ★★★竞赛首页 Codeforces Round #665 (Div. 2)A - Permutation Forgery题意找到一个另一个序列不同于给出的序列,使的该序列得到的所有 a[i−1]+a[i](i>1).

2020-09-29 15:10:29 805

原创 [Codeforces Round #669 (Div. 2)]1407

文章目录A - AhahahahahahahahaB - Big VovaC - Chocolate Bunny [思维]D - Discrete Centrifugal Jumps [单调队列优化dp]A -竞赛首页 Codeforces Round #669 (Div. 2)A - Ahahahahahahahaha题意给一个长度为 nnn 的数组,仅包含 0, 1现在最多可以删除 n/2n/2n/2 个字符,要求最后的串满足奇数位置上的数之和等于偶数位置上的数之和保证 nnn 为偶.

2020-09-13 20:20:31 87

原创 [Codeforces Round #665 (Div. 2)]1401

文章目录A - Distance and AxisA -A -A -A -竞赛首页 Codeforces Round #661 (Div. 3)A - Distance and Axis题意给出 xxx 轴上的点 AAA 的横坐标 nnn,问 AAA 至少需要移动多少才能存在点 BBB,使得 abs(∣OB∣−∣BA∣)=kabs(|OB|-|BA|)=kabs(∣OB∣−∣BA∣)=k分析如果 k>nk > nk>n,最小的移动应该是 nnn 移动到 kkk否则.

2020-09-11 13:27:56 121

原创 莫队练习

文章目录HDU-5145 NPY and girls [莫队][组合数][逆元]SPOJ-COT2 Count on a tree II [树上莫队]NBUT-1457 Sona [莫队]HDU-5213 Lucky [莫队][容斥]HDU-5145 NPY and girls [莫队][组合数][逆元]HDU-5145 NPY and girls题意每个女孩所在的班级为 a[i]a[i]a[i],NPY每次到一个班级只能拜访一个女孩,问NPY访问区间 [l,r][l,r][l,r] 里的女.

2020-09-04 11:20:43 120

原创 [Educational Codeforces Round 93]1398

文章目录A - Bad TriangleB - Substring Removal GameC - Good Subarrays [思维][前缀和] ★★D - Colored Rectangles [dp] ★E - Two Types of Spells [权值线段树][思维] ★★★Educational Codeforces Round 93 (Rated for Div. 2)A - Bad Triangle题意问是否存在三条边,无法组成三角形,如果不存在输出-1,存在输出这三条边.

2020-08-27 16:49:55 198

原创 [Codeforces Round #661 (Div. 3)]1399

文章目录A - Remove SmallestB - Gifts FixingC - Boats Competition [枚举]D - Binary String To Subsequences [队列]E1 - Weights Division (easy version) [贪心][拓扑]E2 - Weights Division (hard version)竞赛首页 Codeforces Round #661 (Div. 3)A - Remove Smallest题意对于 ∣ai−a.

2020-08-23 14:21:03 139

原创 [Codeforces Round #660 (Div. 2)]1388

文章目录A - Captain Flint and Crew Recruitment [思维]B - Captain Flint and a Long Voyage [思维]C - Uncle Bogdan and Country Happiness [dfs] ★★D - Captain Flint and Treasure [拓扑] ★★A -竞赛首页 Codeforces Round #660 (Div. 2)A - Captain Flint and Crew Recruitment [思.

2020-08-15 07:48:52 154

原创 [Codeforces Global Round 9]1375

文章目录A - Sign Flipping [思维]B - Neighbor Grid [构造]C - Element Extermination [思维★]D - Replace by MEX [暴力]E - Inversion SwapSort [逆序对]A - Sign Flipping [思维]目录题目传送门题意可以改变任意位置的数,使 a[i]=−a[i]a[i] = -a[i]a[i]=−a[i]最终要令长度为 nnn 的数组 a[]a[]a[] 中,(保证 nnn 为奇数)..

2020-08-02 17:21:36 116

原创 单调队列 & 单调栈 简单练习

文章目录HDU-3410 Passing the MessageHDU-4252 A Famous CityHDU-1506 Largest Rectangle in a HistogramZOJ-2642 Feel GoodHDU-6319 Problem A. Ascending RatingHDU-3530 SubsequencePOJ-2823 Sliding WindowPOJ-3250 Bad Hair DayHDU-6444 Neko's loopHDU-3410 Passing th.

2020-07-17 10:40:01 233

原创 [离散数学] 第五章 代数结构

文章目录代数系统引入概念运算代数系统运算及其性质一些运算交换律结合律分配律吸收律等幂律其他概念幺元零元逆元小结半群广群与半群独异点群与子群群的概念有限群和无限群群的性质置换等幂元子群源:离散数学-5代数系统引入概念代数也叫代数结构,是指定义有若干运算的集合例如:整数集合,在其上定义了加法、乘法,就构成了一个代数系统即 代数系统:由集合上定义若干个运算而组成的系统抽象代数不关心代数系统的具体集合是什么不关心集合的运算如何定义只根据假设这些运算的某些规则(如结合律、分配律等.

2020-07-16 15:39:35 996

原创 [Codeforces Round #649 (Div. 2)]1364

文章目录A - XXXXX [思维]B - Sign Flipping [思维]C - Sign Flipping [思维]A - XXXXX [思维]目录题目传送门题意有 nnn 个数的数组 a[]a[]a[],要使数组的总和%k!=0\% k != 0%k!=0可以选择删去开始的连续几个数或者删去末尾的连续几个数问这个数组满足条件的最长长度,不存在则输出 −1-1−1分析只要找到头尾最近的一个 %k!=0\% k != 0%k!=0 的数,然后扣掉这一整段的长度Code#i..

2020-07-07 14:16:38 245

原创 [Codeforces Round #653 (div3)]1374

文章目录A - Required Remainder [思维]B - Multiply by 2, divide by 6 [思维]C - Move Brackets [思维]D - Zero Remainder Array [思维]E1 - Reading Books (easy version) [思维]E2 - Reading Books (hard version) [思维]F - Cyclic Shifts Sorting [思维]A - Required Remainder [思维]..

2020-07-04 01:43:59 214

原创 学习笔记目录

算法整理目录数据结构图论几何

2020-06-12 18:24:37 177

原创 [Educational Codeforces Round 88 (div2)]1359E - Modular Stability[组合数][思维]

E - Modular Stability[组合数][思维]目录Time Limit Per TestMemory Limit Per Testinputoutput2 seconds512 megabytesstandard inputstandard output题意给定 n,kn, kn,k,从 1−n1 - n1−n 中取 kkk 个不同的数组成一个数组若该数组满足:任意调换数组值的位置xmod  a1mod  a2mod  ...mod  akx .

2020-06-10 16:58:28 157

原创 [Educational Codeforces Round 88 (div2)]1359

比赛主页A - Berland Poker[思维]B - New Theatre Square[思维]C - Mixing Water[数学]D - Yet Another Yet Another Task[枚举][区间最大值]E - Modular Stability[组合数][思维]F - RC Kaboom Show[ ]A - Berland Poker[思维]目录Time Limit Per TestMemory Limit Per Testinput..

2020-06-10 01:05:54 156

原创 [Educational Codeforces Round 88 (div2)]1359D - Yet Another Yet Another Task[枚举][区间最大值]

D - Yet Another Yet Another Task[枚举][区间最大值]目录Time Limit Per TestMemory Limit Per Testinputoutput1.5 seconds512 megabytesstandard inputstandard output题意可以选择一段连续的区间,这个区间的总价值为区间每个值的总和减去该区间值最大的一个找出区间总价值最大的值例如样例一[5 -2 10 -1 4]选择区间 [1,.

2020-06-10 01:03:59 157

原创 [Educational Codeforces Round 87 (div2)]1354F - Summoning Minions[dp][费用流]

参考博客 dpdpdp做法费用流做法1354F - Summoning Minions[dpdpdp][费用流]题意可以召唤 nnn 个奴才,战场上最多同时可以有 kkk 个奴才每个奴才权值为 a[i]a[i]a[i],召唤到场上后原先场上的奴才权值都可以加上 b[i]b[i]b[i]问要使得最后在场上的权值最大可以按什么样的顺序放奴才,最大的权值为多少做法要使得最后权值尽可能大,可以在场上有 k−1k-1k−1 个奴才的时候,把最后不要再场上的奴才都放场上,这样可以最大化 b[..

2020-06-06 15:07:33 146

原创 [Educational Codeforces Round 87 (div2)]1354

1354A - Alarm Clock[思维]1354B - Ternary String[思维]1354C1 - Ternary String[排序][ ]1354C2 - Not So Simple Polygon Embedding[思维][ ]1354D - Multiset[ ]1354E - Graph Coloring[ ]1354F - Summoning Minions[ ]1354G - Find a Gift[ ]目录1354A - Alarm Cloc..

2020-05-29 19:47:40 801

原创 [Educational Codeforces Round 87 (div2)]1354D - Multiset[二分][树状数组]

1354D - Multiset[二分]题意给一个长度为 nnn 的不降序数组,有 mmm 个操作如果 ki<0k_i < 0ki​<0,删除第 kik_iki​ 个数,保证不会超过当前数组的长度如果 ki>0k_i > 0ki​>0,插入 kik_iki​,这里还会保持不降序数组如果最后数组中还有数,输出数组中其中一个做法二分结果的值如果删除的序号比 ≤x\leq x≤x 的数还大,那么对 xxx 最后保留在数组中是没有影响的所以只需要记录 ..

2020-05-29 19:42:04 166

原创 [Educational Codeforces Round 87 (div2)]1354E - Graph Coloring[dp][01染色]

参考博客1354E - Graph Coloring[dpdpdp][01染色]题意总共有 nnn 个点,mmm 条边要使得任意边 (u,v)(u, v)(u,v) 中 abs(cnt[u]−cnt[v])=1abs(cnt[u] - cnt[v]) = 1abs(cnt[u]−cnt[v])=1, cnt[i]cnt[i]cnt[i] 表示 iii 点的编号每个点的编号为 1,2,31, 2, 31,2,3 其中一个保证边没有重边且没有自环且 111 的个数为 n1n1n1,222 的..

2020-05-29 19:40:45 155

原创 [Codeforces Round #644 (div3)]1360

1360A - Minimal Square[思维]1360B - Honest Coach[思维]1360C -Similar Pairs[思维]1360D - Buying Shovels[思维]1360E - Polygon[思维]1360F - Spy-string[思维]1360G - A/B Matrix[思维]1360H - Binary Median[思维]这场都是思维题,题目就不贴过来了感觉需要做点模拟题的样子。。想倒是能想到,实现起来老是有bug(虽然打一半就..

2020-05-27 17:19:55 326

原创 树状数组练习

文章目录敌兵布阵敌兵布阵不理解树状数组的可以看一下这两个博客树状数组详解夜深人静写算法(三)- 树状数组目录敌兵布阵题意敌人有 NNN 个工兵营地,第 iii 个工兵营地里开始时有 aia_iai​个人每行有一条命令,命令有4种形式:(1) Add i j,i和j为正整数,表示第i个营地增加j个人(j不超过30)(2)Sub i j ,i和j为正整数,表示第i个营地减少j个人(j不超过30);(3)Query i j ,i和j为正整数,i<=j,表示询问第i到第j个.

2020-05-22 23:49:18 231

原创 [Codeforces Round #635 (div2)]1348D - Phoenix and Sciences[思维][好题]

1348D - Phoenix and Sciences[思维][好题]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: Phoenix has decided to bec...

2020-05-12 13:38:38 162

原创 [Codeforces Round #635 (div2)]1348E - Phoenix and Berries[dp]

1348E - Phoenix and Berries[dpdpdp]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: Phoenix is picking berries ...

2020-05-12 13:29:35 196

原创 [Codeforces Round #638 (div2)]1348

1348A - Phoenix and Balance[思维]1348B - Phoenix and Beauty[思维]1348C - Phoenix and Distribution[排序][分类]1348D - Phoenix and Sciences[思维][好题]1348E - Phoenix and Berries[dpdpdp]1348F - Phoenix and M...

2020-05-12 12:45:10 221

原创 [Codeforces Round #640 (Div. 4)]1352G - Special Permutation[构造][思维]

1352G - Special Permutation[构造][思维]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: A permutation of length nnn is ana_nan​ array p=[p1,p2,…,pn]p=[p_1,p_2,…,p_n]p=[p1​,p

2020-05-12 12:40:04 200

原创 [Codeforces Round #634 (div3)]1335F - Robots on a Grid[拓扑排序][反向建图]

1335F - Robots on a Grid[拓扑排序][反向建图]time limit per testmemory limit per testinputoutput3 seconds256 megabytesstandard inputstandard outputDescription: There is a rectangular grid ...

2020-04-23 13:23:14 212

原创 [Codeforces Round #635 (div2)]1337E - Kaavi and Magic Spell[dp]

1337E - Kaavi and Magic Spell[dpdpdp]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: Kaavi, the mysterious fortu...

2020-04-21 13:16:30 424

原创 [Codeforces Round #635 (div2)]1337D - Xenia and Colorful Gems[二分][枚举]

1337C - Linova and Kingdom[dfsdfsdfs][贪心]time limit per testmemory limit per testinputoutput3 seconds256 megabytesstandard inputstandard outputDescription: Xenia is a girl being b...

2020-04-21 12:38:07 277

原创 [Codeforces Round #635 (div2)]1337C - Linova and Kingdom[dfs][贪心]

1337C - Linova and Kingdom[dfsdfsdfs][贪心]time limit per testmemory limit per testinputoutput2 seconds256 megabytesstandard inputstandard outputDescription: Writing light novels is...

2020-04-19 13:48:35 247

原创 [Codeforces Round #635 (div2)]1337

1337A - Ichihime and Triangle[思维]1337B - Kana and Dragon Quest game[思维]1337C - Linova and Kingdom[dfsdfsdfs][思维]1337D - Xenia and Colorful Gems[ ]1337E - Kaavi and Magic Spell[ ]1337F - Yui and...

2020-04-17 14:05:22 273

原创 [Codeforces Round #629]1328

1328A - Divisibility Problem[思维]1328B - K-th Beautiful String[思维]1328C - Ternary XOR[思维]1328D - Carousel[ ]1328E - Tree Queries[ ]1328F - Make k Equal[ ]目录1328A - Divisibility Problem[思维]...

2020-04-02 21:32:25 168

原创 [Educational Codeforces Round 84]1327

1327A - Sum of Odd Integers[思维]1325B - CopyCopyCopyCopyCopy[思维]1325C - Ehab and Path-etic MEXs[思维][图]1325D - Ehab the Xorcist[思维+异或]1325E - Ehab’s REAL Number Theory Problem[思维+最小环dfsdfsdfs]1325F...

2020-04-02 15:34:45 622

原创 [Codeforces Round #628]1325E - Ehab‘s REAL Number Theory Problem[最小环]

1325E - Ehab’s REAL Number Theory Problem[最小环]time limit per testmemory limit per testinputoutput3 seconds256 megabytesstandard inputstandard outputDescription: You are given an a...

2020-04-01 23:52:51 172

原创 [Codeforces Round #628]1325F - Ehab's Last Theorem[思维+dfs树]

1325F - Ehab’s Last Theorem[思维+dfsdfsdfs树]time limit per testmemory limit per testinputoutput1 seconds256 megabytesstandard inputstandard outputDescription: It’s the year 5555. Yo...

2020-03-26 14:51:24 242

原创 [Codeforces Round #628]1325

1325A - EhAb AnD gCd[思维]1325B - CopyCopyCopyCopyCopy[思维]1325C - Ehab and Path-etic MEXs[思维][图]1325D - Ehab the Xorcist[思维+异或][1325E - Ehab’s REAL Number Theory Problem[思维+最小环dfsdfsdfs]][1325F - E...

2020-03-26 13:59:19 213

原创 [Codeforces Round #628]1325D - Ehab the Xorcist[思维+异或]

1325C - Ehab and Path-etic MEXs[最小环]time limit per testmemory limit per testinputoutput1 seconds256 megabytesstandard inputstandard outputDescription: You are given a tree consis...

2020-03-26 13:48:13 131

空空如也

空空如也

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

TA关注的人

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