![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
瞎搞呗
文章平均质量分 73
莫比乌斯灯泡
力争把题解写的好懂,错误之处请评论。
展开
-
F - An express train to reveries CodeForces - 814B (简单思维)
Sengoku still remembers the mysterious "colourful meteoroids" she discovered with Lala-chan when they were little. In particular, one of the nights impressed her deeply, giving her the illusion that a原创 2017-08-25 19:00:41 · 210 阅读 · 0 评论 -
E - Toda 2 CodeForces - 730A(简单思维和处理技巧)
A group of n friends enjoys playing popular video game Toda 2. There is a rating system describing skill level of each player, initially the rating of the i-th friend is ri.The friends decided to ta原创 2017-08-26 11:04:26 · 314 阅读 · 0 评论 -
D - Naming Company CodeForces - 794C贪心
Oleg the client and Igor the analyst are good friends. However, sometimes they argue over little things. Recently, they started a new company, but they are having trouble finding a name for the compan原创 2017-09-05 19:18:20 · 286 阅读 · 0 评论 -
poj 1065 Wooden Sticks (求最长非降子序列的个数)
点击打开链接题意:n根木材长l_i重w_i,前一根木材大于后一根的话要浪费一分钟准备机器,求最省方案?思路:首先会想到求得是最长非降子序列的个数,那么如何实现,似乎没有足够巧妙地方案,细心观察数据就能得出这样的结论:先对l按从小到大的顺序 排序,然后得到的序列中w的最长递减子序列的长度就是答案。 #include#include#include#include#inclu原创 2017-10-08 09:41:55 · 279 阅读 · 0 评论 -
Basic Data Structure(HDU 5929 2016东北地区CCPC)
题意:对0,1序列进行四种操作:压进栈,弹出栈,转置,查询所有数的nand;思路:首先我们发现暴力会超时,压栈好写,弹出也好写,但是查询怎么搞,转置怎么搞,后来可以发现,从栈的底部往上第一个0的位置以上如果还有元素,那么该位置的nand结果就是1,如果没有就是0,那么我们只需要知道距离栈低最近的0的位置就好,至于转置,我们可以用deque可以在前端插入值这个良好的性质,没有转置时候我们从前往后原创 2017-10-14 21:19:35 · 178 阅读 · 0 评论 -
Codeforces 897C(递归)
点击打开链接扎心题,当时想法完全正确,姿势不对(思维不够细腻)没过。题意:给出四个字符串x,y,f0,z,并且给出递推公式:fi=x+fi-1+y+fi-1+z,对于每次询问,输入两个数n和k,表示fn的第k个字符。思路:k表示第fn的第k个字符,既然fn是由递推公式得来,那么k同样可以通过由递推公式得到,那么我们就可以由已知的k,通过递推公式往回推n次,这样就会得到fn中第k个对原创 2017-12-03 20:55:51 · 781 阅读 · 4 评论 -
牛客网wannafly 4,b题(小AA的数列
点击打开链接思路:计算出最终结果每一位上有多少个1是在符合条件的亦或过程中产生的,然后加权求和就可以。#includeusing namespace std;typedef long long LL;const LL mod=1e9+7;int a[100005];int xorsum[100005];int dp[2][2];//i为下标奇偶,j为在此位前缀和有多少个奇原创 2017-11-25 21:50:24 · 247 阅读 · 0 评论 -
http://codeforces.com/contest/915/problem/C
传送门 题意:给出两个数a,b将a的每一位打乱重组成一个比b小最大的数。 思路:从小到大对a排序,选取这样的数的每一位,设置一个中间字符串t,把当前位和后面更大的位交换,若交换后,任然满足条件,则让a也执行同样的交换,否则,a不执行任何操作。#include#include#includeusing namespace std;int main(){ long long原创 2018-01-16 14:08:16 · 210 阅读 · 0 评论