自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

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

转载 Pursuing the Happiness

http://codeforces.com/gym/101341/problem/BProblemB. Pursuing the HappinessInput file: standard inputOutput file: standard outputTime limit: 2 secondsMemory limit: 256 megabytes Mike wants to ...

2019-09-20 19:32:00 256

转载 Jumps(裴蜀定理)

http://codeforces.com/gym/101341/problem/D A frog lives in a one-dimensional world in the point with the coordinate0. He needs to get to the point with the coordinatex. For some reason he can...

2019-09-20 19:27:00 252

转载 Digit sum-----The Preliminary Contest for ICPC Asia Shanghai 2019

A digit sumS_b(n)Sb​(n)is a sum of the base-bbdigits ofnn. Such asS_{10}(233) = 2 + 3 + 3 = 8S10​(233)=2+3+3=8,S_{2}(8)=1 + 0 + 0 = 1S2​(8)=1+0+0=1,S_{2}(7)=1 + 1 + 1 = 3S2​(7)=1+1+1=3....

2019-09-16 18:24:00 148

转载 Light bulbs------The Preliminary Contest for ICPC Asia Shanghai 2019

There areNNlight bulbs indexed from00toN-1N−1. Initially, all of them are off.A FLIP operation switches the state of a contiguous subset of bulbs.FLIP(L, R)FLIP(L,R)means to flip all b...

2019-09-16 18:21:00 116

转载 Chip Factory ---- UVALive - 7192

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5204John is a manager of a CPU chip factory, the factory produces lots of chip...

2019-09-10 20:11:00 260

转载 Almost Sorted Array ---- UVALive - 7188

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=5200We are all familiar with sorting algorithms: quick sort, merge sort, heap ...

2019-09-10 19:34:00 180

转载 Daydreaming Stockbroker----Gym - 101550D

http://codeforces.com/gym/101550/attachments Gina Reed, the famous stockbroker, is having a slow day at work, and between rounds of solitaire she is daydreaming. Foretelling the future is hard,...

2019-09-03 10:37:00 169

转载 可以关闭博客园广告的代码

<style> #cnblogs_c1, #cnblogs_c2, #ad_t2, #opt_under_post { display: none !important; } .itnews, .c_ad...

2019-09-01 19:10:00 260

转载 清除浏览器某些默认样式

这代码还是刚学前端的时候,从学长(DaLao)那里抄来的,单独写成common.css,用的时候直接引很方便 1 body,dl,dt,dd,p,h1,h2,h3,h4,h5,h6,ul,ol{margin:0;padding:0;} 2 ol,ul{list-style:none;} 3 em,i{ font-style:normal;} 4 strong,b{ f...

2019-08-30 17:13:00 120

转载 滚动到界面,元素缓慢滑出(jquery / css)

万能的jquery: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta name="viewport" content="width=device-width, initial...

2019-08-30 16:48:00 1228

转载 Interesting Integers Gym - 101512I

Undoubtedly you know of the Fibonacci numbers. Starting with F1 = 1 and F2 = 1, every next number is the sum of the two previous ones. This results in the sequence 1, 1, 2, 3, 5, 8, 13, . . .. ...

2019-08-30 16:16:00 154

转载 Gym 101190A------- Abbreviation(字符串 模拟)

http://codeforces.com/gym/101190/attachmentsProblem A.AbbreviationInput file: abbreviation.inOutput file: abbreviation.out An abbreviation (from Latin brevis, meaning short) is a short...

2019-08-23 10:26:00 226

转载 Gym - 101190H------Hard Refactoring(字符串 模拟)

http://codeforces.com/gym/101190/attachmentsInput file:hard.in Output file:hard.out Helen had come upon a piece of code that uses a lot of “magical constants”. She found a logical...

2019-08-23 10:06:00 139

转载 Abbreviation-----ACM ICPC 2016–2017, Northeastern European Regional Contest(字符串 模拟)

http://codeforces.com/gym/101190/attachments题意:第一位大写,剩下小写的不小于两位的单词,连续若干(大于等于两个)这样的单词连续(用空格间隔)可以把他们的首写字母提出来再来个空格加个括号把单词放括号里,其余不变,输出出来就行了这字符串模拟乍一看挺简单的,坑也不少,细细体会吧QWQ亮出丑爆的代码: 1 #...

2019-08-22 20:26:00 186

转载 Sobytiynyy Proyekt Casino Gym - 102299I

传送门:http://codeforces.com/gym/102299/problem/ISobytiynyy Proyekt Casino is located in San Petersburg, one of the most beautiful cities in Russia, known (besides being where ITMO is located) b...

2019-08-21 20:41:00 191

转载 Course recommendation Gym - 102299H(模拟)

 One of the biggest challenges in an online course platform is to recommend to a student one of its over 800 courses. For instance, João took courses on Java and Java for the Web, with grades 1...

2019-08-21 19:31:00 205

转载 Poor Folk Gym - 102299K(思维题)

 Russian writers are known worldwide. One of the main Russian authors is Fyódor Dostoyévskiy. The influence of his works outgrew literature itself and reached other areas such as Philosophy, Psyc...

2019-08-21 19:23:00 384

转载 How far away? (HDU - 2586)(LCA Tarjan)

 There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want to go from house A to house B"? Usually it h...

2019-08-20 20:37:00 112

转载 BAPC 2016 ----Brexit (BFS + vector)

听说这道题和vector更配哦~用vector存放盟友,这道题就非常简单了题意:一个由C个国家组成的联盟,有一天L离开了,对于任意国家,只要盟友少于之前的一半,他也会离开,问X会不会离开思路:用vector记录与当前国家相连的国家,num数组记录开始各个国家的盟友数目,lost记录离开联盟的盟友个数,BFS把离开的国家跑一遍答案就出来了...

2019-08-20 15:32:00 204

转载 Simpsons’ Hidden Talents(扩展KMP)

Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had.Marge: Yeah, what is it?Homer: Take me for example. I want to find out if I have a talent in polit...

2019-08-19 10:51:00 116

转载 POJ 1611 ---The Suspects(并查集)

Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is...

2019-08-19 08:58:00 113

转载 Lweb and String HDU - 5842(2016中国大学生程序设计竞赛 - 网络选拔赛)

一水题Lweb has a stringS.Oneday, he decided to transform this string to a new sequence.You need help him determine this transformation to get a sequence which has the longest LIS(Strictly...

2019-08-17 20:08:00 88

转载 A water problem HDU - 5832(大数)(2016中国大学生程序设计竞赛 - 网络选拔赛)

 Two planets named Haha and Xixi in the universe and they were created with the universe beginning. There is73days in Xixi a year and137days in Haha a year. Now you know the daysNafter Bi...

2019-08-17 19:54:00 101

转载 还是畅通工程(最小生成树 Kruskal)

 某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input 测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( < 100 );随后的N(N-1)/2行对应村庄间的距离...

2019-08-16 09:02:00 137

转载 Dream Team(最小生成树)

Input file: dream.inOutput file: standard outputBalloon Color: PinkBefore the World Cup, we would like to form the ultimate dream team. The team that will win against all teams. We have a b...

2019-08-15 17:22:00 190

转载 带权并查集

就说两比较有代表性的题。食物链 POJ 1182动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是"2 X Y",表示X吃Y。此人对N...

2019-08-15 10:20:00 78

转载 HDU 1495 非常可乐(BFS)

大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S<101)毫升 (正好装满一瓶) ,它们三个之间可以相互倒可乐 (都是没有刻度的,且 S==N+M,1...

2019-08-15 10:17:00 132

转载 I Hate It(线段树+更新)

 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。 这让很多学生很反感。 不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input 本题目包含多组测试,请处理到文件结束。 在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<M&lt...

2019-08-15 10:15:00 83

转载 Just a Hook(线段树+区间更新)

 In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length. Now ...

2019-08-15 10:12:00 62

转载 不要62(数位DP)

 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。不吉利的数字为所有含有4或62的号码。例如: 62315 73418 88914都属于不吉利号码。但是,61152虽然含有6和2,但不是62连号,所以不属于不吉...

2019-08-15 09:34:00 54

转载 Buffcraft——ACM ICPC 2014–2015, NEERC, Northern Subregional Contest-B(模拟)

Input file: buffcraft.inOutput file: buffcraft.outTime limit: 2 secondsMemory limit: 256 megabytes Brenda enjoys a new role-playing game Buffcraft. Shields, swords, books and other car...

2019-08-14 19:50:00 160

转载 Alarm Clock ACM ICPC 2014–2015, NEERC, Northern Subregional Contest-A(模拟)

纯模拟即可 1 #include <stdio.h> 2 #include <string.h> 3 4 int a[10] = {6, 2, 5, 5, 4, 5, 6, 3, 7, 6}; 5 int num[1000]; 6 int main() 7 { 8 freopen("alarm.in", "r", ...

2019-08-14 19:10:00 169

转载 Planet Communcation Gym - 101466C (模拟+GCD)

 Lately the communication between planets has been an important issue, which is why the Earth has made many efforts to be connected to every other planet in the universe. The Universal Network ...

2019-08-13 16:35:00 206

转载 Jeronimo's List(模拟+计数排序||桶排)

 Jeronimo the bear loves numbers and he is planning to writennumbers in his notebook. After writing the firstmnumbers, Jeronimo felt that he was spending a lot of time thinking new numbers,...

2019-08-13 14:47:00 144

转载 Polygon Triangles

A polygon is a plane figure that is bounded by a finite amount of straight line segments closing in a loop to form a closed polygonal chain. The segments are called its edges, and the points wher...

2019-08-13 14:21:00 421

转载 Double it(水题模拟+逆向思维)

Alex has two magic machines A and B. Machine A will give you2x + 1coins if you insertxcoins in it, machine B will give you2x + 2. Alex has no coins and wants to get exactlyncoins in order ...

2019-08-13 14:14:00 381

转载 Sphenic numbers(素数筛)

Schoolboy Vasya is interested in the problem of distinguishing prime numbers. He has decided to develop his own testing method for it. Unfortunately, the new algorithm has one deficiency – it yie...

2019-08-12 20:53:00 185

转载 Desktop(模拟)2016-2017 ACM Central Region of Russia Quarterfinal Programming Contest

Vasily is a college student who likes to keep everything in order. One of his hobbies is software. Yesterday he installed a new operating system Windows 999999. The key difference between the new...

2019-08-12 18:30:00 129

转载 Weather Station(基础DP)2016-2017 ACM Central Region of Russia Quarterfinal Programming Contest

Albert is a well-known inventor. He’s the one who designed an electronic weather station that periodically track all kinds of weather parameters and records the results of its measurements. While...

2019-08-12 17:35:00 150

转载 找零钱(经典DP)

面值有1, 2, 5, 10, 20, 50, 100,输入n(n<=100),求凑成n的种数 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 int a[] = {1, 2, 5, 10, 20, 50, 100}; 6 7 void solve(int n)...

2019-08-12 09:46:00 349

空空如也

空空如也

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

TA关注的人

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