逻辑思维
文章平均质量分 79
FFOYeah
这个作者很懒,什么都没留下…
展开
-
#递推# HDU 2047 阿牛的EOF牛肉串
HDU 2047今年的ACM暑期集训队一共有18人,分为6支队伍。其中有一个叫做EOF的队伍,由04级的阿牛、XC以及05级的COY组成。在共同的集训生活中,大家建立了深厚的友谊,阿牛准备做点什么来纪念这段激情燃烧的岁月,想了一想,阿牛从家里拿来了一块上等的牛肉干,准备在上面刻下一个长度为n的只由”E” “O” “F”三种字符组成的字符串(可以只有其中一种或两种字符,但绝对不能有其他字符),阿原创 2018-02-05 00:19:04 · 255 阅读 · 0 评论 -
【数论】【DP】【LCM】2018 USP-ICMC【待补】
比赛传送门A. Nicoleta and the circle of kidsDescription每个人可以连边,最远连到第(i+k)%n 个人,边权为两个人之间的距离,求最大生成树Range1 ≤ K < N ≤ 1e9Solution方案一:LCM如果每个人都选取最优的连边策略,假设在人数可以无限扩大的前提下,那么每个人都可以向接下来的第k个人连边,很容易得出一个循环节...原创 2019-04-15 01:28:54 · 515 阅读 · 6 评论 -
2018 Multi-University Training Contest 1 1004. Distinct Values
Problem DescriptionChiaki has an array of n positive integers. You are told some facts about the array: for every two elements ai and aj in the subarray al..r (l≤i<j≤r), ai≠ajholds.Chiaki would ...原创 2018-08-14 19:29:51 · 193 阅读 · 0 评论 -
Codeforces Round #501 (Div. 3) E2. Stars Drawing (Hard Edition)
题目链接A star is a figure of the following type: an asterisk character '*' in the center of the figure and four rays (to the left, right, top, bottom) of the same positive length. The size of a star is...原创 2018-08-04 23:57:50 · 517 阅读 · 0 评论 -
AtCoder Beginner Contest 086 C - Traveling
AtCoder 086 CBeginner Concest 086CProblem Statement AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0,0) at time 0, then for each i between 1 and N (i原创 2018-01-29 00:30:26 · 552 阅读 · 0 评论 -
Codeforces Round #276 (Div. 1) A. Bits
Codeforces Round #276 ALet's denote as the number of bits set ('1' bits) in the binary representation of the non-negative integerx.You are given multiple queries consisting of pairs of integers l...原创 2018-01-21 18:34:54 · 406 阅读 · 0 评论 -
#二分、二叉树# 一节左神公开课的题解
题目1:二分查找局部最小值 Description:定义局部最小的概念。arr 长度为1时,arr[0] 是局部最小。arr的长度为 N(N > 1) 时,如果 arr[0] < arr[1],那么 arr[0] 是局部最小;如果 arr[N-1] < arr[N-2],那么 arr[N-1] 是局部最小;如果 0 < i< N-1,既有 arr[i] &...原创 2018-08-25 23:23:17 · 290 阅读 · 0 评论 -
Codeforces911 D. Inversion Counting(逆序数)
题目链接:http://codeforces.com/problemset/problem/911/DD. Inversion CountingA permutation of size n is an array of size n such that each integer from 1 to n occurs exactly once in this array. An inver...原创 2018-08-25 23:08:30 · 330 阅读 · 0 评论 -
J-强迫症的序列 第13届景驰-埃森哲杯广东工业大学ACM程序设计大赛
题目链接:https://www.nowcoder.com/acm/contest/90/J题目描述 牛客网是IT求职神器,提供海量C++、JAVA、前端等职业笔试题库,在线进行百度阿里腾讯网易等互联网名企笔试面试模拟考试练习,和牛人一起讨论经典试题,全面提升你的编程。作为acmer的小A,牛客网是他首选的题库。 小A是一个中度强迫症患者,每次做数组有关的题目都异常难受,他十分希望数组的...原创 2018-08-09 21:37:02 · 283 阅读 · 0 评论 -
Codeforces Round #430 (Div. 2) C. Ilya And The Tree
题目链接C. Ilya And The Treetime limit per test 2 secondsmemory limit per test 256 megabytesIlya is very fond of graphs, especially trees. During his last trip to the forest Ilya found a very inte...原创 2018-07-19 02:54:29 · 182 阅读 · 0 评论 -
2018 Multi-University Training Contest 1
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6301 1001. Maximum MultipleTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 531 A...原创 2018-07-23 23:40:51 · 246 阅读 · 0 评论 -
#错排问题# 不容易系列之(4)——考新郎
题目链接Problem Description 国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做”考新郎”,具体的操作是这样的:首先,给每位新娘打扮得几乎一模一样,并盖上大大的红盖头随机坐成一排; 然后,让各位新郎寻找自己的新娘.每人只准找一个,并且不允许多人找一个. 最后,揭开盖头,如果找错了对象就要当众跪搓衣板…...原创 2019-09-10 21:04:31 · 397 阅读 · 0 评论 -
#最短路、gcd、DP# 2017杭州女生赛
C. Coprime Sequence题目链接Problem Description Do you know what is called Coprime Sequence”? That is a sequence consists of n positive integers, and the GCD (Greatest Common Divisor) of them is equ...原创 2018-05-15 20:18:18 · 425 阅读 · 0 评论 -
2018浙江省赛(ACM) The 15th Zhejiang Provincial Collegiate Programming Contest Sponsored by TuSimple
比赛链接F. Now Loading!!!Time Limit: 1 Second Memory Limit: 131072 KB DreamGrid has integers . DreamGrid also has queries, and each time he would like to know the value of for a given numbe...原创 2018-05-05 00:06:47 · 1325 阅读 · 0 评论 -
2017 Benelux Algorithm Programming Contest (BAPC 17) K. King of the Waves
题目链接K King of the Waves Picture by JD Lasica via Flickr. You are organising a king of the hill tournament, the Buenos Aires Paddleboarding Competition (BAPC), with n participants. In a king of t...原创 2018-05-17 12:59:07 · 882 阅读 · 0 评论 -
Asia-Tsukuba 2017
Problem C Medical Checkup题目链接 Students of the university have to go for a medical checkup, consisting of lots of checkup items, numbered 1, 2, 3, and so on.Students are now forming a long queue,...原创 2018-04-25 18:41:26 · 415 阅读 · 0 评论 -
#尺取法# 尺取法总结和经典例题
题目链接:POJ3061题目链接:codeforces 660 C题目链接:UVA11572POJ3061Description A sequence of N positive integers (10 &amp;amp;lt; N &amp;amp;lt; 100 000), each of them less than or equal 10000, and a positive integer S (S &amp;amp;lt; 100 000 00原创 2018-02-05 00:04:53 · 910 阅读 · 0 评论 -
【异或】HDU - 4810 Wall Painting
Wall PaintingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3857 Accepted Submission(s): 1278Problem DescriptionMs.Fang loves painting very much. She paints GFW(Great Funny Wall) every day.原创 2018-08-09 14:57:39 · 233 阅读 · 0 评论