码迷,mamicode.com
首页 >  
搜索关键字:stones    ( 236个结果
[ICPC 北京 2017 J题]HihoCoder 1636 Pangu and Stones
#1636 : Pangu and Stones #1636 : Pangu and Stones 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In Chinese mythology, Pangu is the first living being and the ...
分类:其他好文   时间:2019-03-08 12:50:04    阅读次数:177
[LeetCode] 1000. Minimum Cost to Merge Stones
There are N piles of stones arranged in a row. The i-th pile has stones[i] stones. A move consists of merging exactly K consecutive piles into one pil ...
分类:其他好文   时间:2019-03-04 09:25:03    阅读次数:149
[CF1110E]Magic Stones
题目大意:有一个长度为$n(n\leqslant10^5)$的数列$c$,问是否可以经过若干次变换变成数列$t$,一次变换为$c'_i=c_{i+1}+c_{i-1}-c_i$ 题解:思考一次变换的本质,对$c$做差分,原差分为$c_i-c_{i-1},c_{i+1},c_i$;对$c_i$做一次变 ...
分类:其他好文   时间:2019-02-10 17:44:48    阅读次数:110
「日常训练」Magic Stones(CodeForces-1110E)
题意 给定两个数组c和t,可以对c数组中的任何元素变换$c_i$?成$c_{i+1}+c_{i 1} c_i$?,问c数组在若干次变换后能否变换成t数组。 分析 这种魔法题目我是同样的没做过。Editorial里说用差分来能够看出思路。问题是,如何能够想到差分来做?因为它的变换就是相邻的数的加减法, ...
分类:其他好文   时间:2019-02-10 00:11:10    阅读次数:172
CF每日一练(2.9)
CF 1013 A. Piles With Stones 比较两个序列的和,因为只能拿走或者不拿,所以总数不能变大。 B. And 答案只有 1,0,1,2几种可能,所以对于每一种答案都暴力扫一次是可以的 或者对于每个 $a_i$ ,将$a_i$ 标记加一,如果$a_i \neq a_i\& x$ ...
分类:其他好文   时间:2019-02-09 20:51:40    阅读次数:190
CF-1013 (2019/02/09 补)
CF 1013 A. Piles With Stones 比较两个序列的和,因为只能拿走或者不拿,所以总数不能变大。 B. And 答案只有 1,0,1,2几种可能,所以对于每一种答案都暴力扫一次是可以的 或者对于每个 $a_i$ ,将$a_i$ 标记加一,如果$a_i \neq a_i\& x$ ...
分类:其他好文   时间:2019-02-09 20:49:35    阅读次数:201
【Codeforces Global Round 1 E】Magic Stones
【链接】 "我是链接,点我呀:)" 【题意】 你可以把c[i]改成c[i+1]+c[i 1] c[i] (2 【题解】 cpp import java.io. ; import java.util. ; //code start from here / d[i] = c[i+1] c[i]; (1 ...
分类:其他好文   时间:2019-02-09 17:56:44    阅读次数:180
E. Magic Stones CF 思维题
E. Magic Stones time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output E. Magic Stones time limi ...
分类:其他好文   时间:2019-02-09 13:26:35    阅读次数:247
CF 1110 E. Magic Stones
E. Magic Stones 链接 题意: 给定两个数组,每次可以对一个数组选一个位置i($2 \leq i \leq n - 1$),让a[i]=a[i-1]+a[i+1]-a[i],或者b[i]=b[i-1]+b[i+1]-b[i]。问进行一些操作后,a和b能否相同。 分析: 考虑一次操作会变 ...
分类:其他好文   时间:2019-02-09 11:55:42    阅读次数:174
Magic Stones CodeForces - 1110E (思维+差分)
E. Magic Stones time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output E. Magic Stones time limi ...
分类:其他好文   时间:2019-02-08 15:49:51    阅读次数:217
236条   上一页 1 ... 4 5 6 7 8 ... 24 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!