码迷,mamicode.com
首页 >  
搜索关键字:simulation    ( 195个结果
hdu 4973 A simple simulation problem.(线段树)
http://acm.hdu.edu.cn/showproblem.php?pid=4973 有两种操作 D l r 将【l,r】区间翻倍 Q l r询问[l,r]中相同数字出现的最多次数 比赛的时候脑子太乱了,没有想到怎么做。发现每次翻倍序列的长度都在变化,区间对应的数也在变,没有思路。 但是静下心来想一想,思路还是挺清晰的。 无论怎么翻倍,序列中的数都是连续的,范围...
分类:其他好文   时间:2014-08-22 23:52:49    阅读次数:500
POJ--4973--A simple simulation problem.【线段树】
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4973 题意:有一段数字,长度n,数字为1~n,有两种操作,第一种是使区间[l,r]内的所有数字变成两个,长度n随之增大,第二种操作是查询区间[l,r]中相同的数字最多有多少个。 思路:比赛时扫了一眼,看区间要扩大,没有细想就觉得线段树做不了,而且当时没有人交这道题就没管了,然后看解题报告居然真...
分类:其他好文   时间:2014-08-22 16:28:39    阅读次数:183
HDU4973A simple simulation problem.(线段树,区间更新)
A simple simulation problem. Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 330    Accepted Submission(s): 132 Problem Description Th...
分类:其他好文   时间:2014-08-22 16:17:29    阅读次数:235
HDU 4973 A simple simulation problem 线段树
比赛的时候写跪了……赛后拿数据对比才发现,一个地方的判断条件的顺序写反了…… 真是结结实实的坑了队友一把。当时我可以全程都在想这个题,并且有十足的把握想法是对的。题意: 最开始有n种不同细胞各一个排成一排。有两种操作: 1. 使区间[l, r]里面的细胞加倍,并相应往后移动。 2. 求...
分类:其他好文   时间:2014-08-22 01:31:45    阅读次数:234
HDU 4973 A simple simulation problem. 线段树
题意: 给定n长的序列 m个操作 序列默认为 1, 2, 3···n 操作1:D [l,r] 把[l,r]区间增长 :( 1,2,3,4 进行 D [1,3]变成 1,1,2,2,3,3,4 ) 操作2:Q [l,r] 问区间[l,r] 上出现最多次数的数 的次数 线段树,维护每个区间的size 和叶子节点中最大的size 开始二分查找size的前缀和,逗了一场。。其实直接dfs就好了...
分类:其他好文   时间:2014-08-21 21:17:44    阅读次数:345
Light OJ 1080 - Binary Simulation - (线段树区间更新 单点查询)
Description Given a binary number, we are about to do some operations on the number. Two types of operations can be here. 'I i j'    which means invert the bit from i to j (inclusive) 'Q i'    a...
分类:其他好文   时间:2014-08-14 14:10:59    阅读次数:215
HDU-4924-Football Manager(DFS+DP)
Problem Description Football Manager is a series of football management simulation games developed by Sports Interactive and published by Sega. In this game, you will play a role of a football club m...
分类:其他好文   时间:2014-08-11 00:31:01    阅读次数:400
【DataStructure】One of queue usage: Simulation System
Statements: This blog was written by me, but most of content  is quoted from book【Data Structure with Java Hubbard】  【Description】 This simulationillustrates objectoriented programming...
分类:其他好文   时间:2014-08-10 21:42:20    阅读次数:450
CubieTech Will Promote A80 Highperformance Mini PC
(These are 3D simulation pictures of CC-A80. These are not real photoes!!!) We have always had a dream to spread the open source Linux system to millions of households. Closed Apple system and Wind...
分类:其他好文   时间:2014-08-07 19:28:40    阅读次数:357
LeetCode "Jump Game"
A simulation problem. We simple walk through all reachable items until we cannot proceed.class Solution {public: bool canJump(int A[], int n) { ...
分类:其他好文   时间:2014-08-01 13:16:01    阅读次数:180
195条   上一页 1 ... 17 18 19 20 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!