![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
思维
LSC__lsc
这个作者很懒,什么都没留下…
展开
-
2617 小O与小X的比赛(二)
Description在又一次失败后,小O深刻反省了自己本身,他感到自己是十分的菜,他想要自己的水平能够迅速提高起来,于是他向小X求助,小X在听了他的诉说后,决定先考考小O的水平如何,于是说道: “我有n个数字,我可以知道任意区间内任意两个数字异或和的和,你可以吗?”小O苦思冥想之后给出了答案。你能知道他是怎样解答的吗?Input先输入一个整数组数T,表示数据的组数,每组数据输入一个n,m表...原创 2019-06-13 19:59:15 · 369 阅读 · 0 评论 -
牛客小白月赛16 D小阳买水果(思维+二分)
题目链接题意: 有n个水果,每个水果有相应的满意度,需要买连续的水果,并且买到的水果满意度要大于零。思路: 是一个比较有趣的二分,刚开始想到的二分是先求他前缀和,然后再二分。但是后来想了一下,这样的前缀和不是一个单调的序列,没法二分。比赛结束后才明白,原来是这样子二分的,涨知识了。对于当前水果的满意度ai,如果说0~i的前缀和为si,那么我只需要找到0 ~ i中,前缀和小于si的即可。所以...原创 2019-07-13 14:07:39 · 257 阅读 · 0 评论 -
nbuoj 1587 最大乘积
Description一个正整数一般可以分为几个互不相同的自然数的和,如3=1+2,4=1+3,5=1+4=2+3,6=1+5=2+4,。。。。现在你的任务是将指定的正整数n分解成互不相同的自然数和,且使这些自然数的乘积最大。Input只一个正整数n,(3<=n<=10 000)。Output第一行是分解的方案,相邻两数用一个空格分开,并且按从小到大的顺序。第二行是最大的...原创 2019-07-04 19:24:45 · 477 阅读 · 0 评论 -
Codeforces Round #579 (Div. 3) D Remove the Substring(思维)
You are given a string s and a string t, both consisting only of lowercase Latin letters. It is guaranteed that t can be obtained from s by removing some (possibly, zero) number of characters (not nec...原创 2019-08-27 10:31:54 · 156 阅读 · 0 评论 -
HDU 5573 Binary Tree (思维+构造)
Problem DescriptionThe Old Frog King lives on the root of an infinite tree. According to the law, each node should connect to exactly two nodes on the next level, forming a full binary tree.Since th...原创 2019-09-04 13:06:03 · 172 阅读 · 0 评论 -
Codeforces Round #583 E Petya and Construction (构造)
It’s Petya’s birthday party and his friends have presented him a brand new “Electrician-n” construction set, which they are sure he will enjoy as he always does with weird puzzles they give him.Const...原创 2019-09-06 18:58:14 · 306 阅读 · 0 评论 -
Educational Codeforces Round 72 (Rated for Div. 2) C. The Number Of Good Substrings(思维)
You are given a binary string s (recall that a string is binary if each character is either 0 or 1).Let f(t) be the decimal representation of integer t written in binary form (possibly with leading z...原创 2019-09-10 09:17:15 · 179 阅读 · 0 评论 -
E. Middle-Out(思维)
The problem was inspired by Pied Piper story. After a challenge from Hooli’s compression competitor Nucleus, Richard pulled an all-nighter to invent a new approach to compression: middle-out.You are ...原创 2019-10-01 15:59:58 · 295 阅读 · 0 评论