Lights Time Limit: 8 Seconds Memory Limit: 131072 KB Now you have N lights in a line. Don't worry - the lights don't have color. The only status they have is on and off. And, each light has a value, too. There is a boring student in ZJU. He deci…
题意:实现一种数据结构,支持对一个数列的 6 种操作:第 x 个数到第 y 个数之间的数每个加 D:第 x 个数到第 y 个数之间全部数翻转:第 x 个数到第 y 个数之间的数,向后循环流动 c 次,即后面 c个数变成这段子序列的最前面 c 个,前面的被挤到后面.在第 x 个数后面插入一个数 P.删除第 x 个数.求第 x 个数到第 y 个数之间的最小数字. 题解: (待补) 代码先放上: (是真的长啊,我已经是比较压行的选手了,依然写了230行) 1.利用stack回收内存池 #include…
题目链接:https://www.nowcoder.com/acm/contest/141/C 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K Special Judge, 64bit IO Format: %lld 题目描述 Eddy likes to play cards game since there are always lots of randomness in the game. For most of the cards g…
Play with Chain Problem Description YaoYao is fond of playing his chains. He has a chain containing n diamonds on it. Diamonds are numbered from 1 to n.At first, the diamonds on the chain is a sequence: 1, 2, 3, …, n.He will perform two types of oper…
Looploop XXX gets a new toy named Looploop. The toy has N elements arranged in a loop, an arrow pointing to one of the elements, and two preset parameters k1 and k2. Every element has a number on it. The figure above shows a Looploop of 6 elments. Le…