Perform this exercise two rounds.These examples of simple exercises that can be performed in a large bag. Always remember to keep your hands on traini...
分类:
其他好文 时间:
2014-08-08 12:06:45
阅读次数:
298
解题报告
题意:
略
思路:
单点更新,区间乘积。
#include
#include
#include
#define LL long long
using namespace std;
LL mul[501000];
void update(int root,int l,int r,int p,int v)
{
int mid=(l+r)/2;
if(l==r)...
分类:
其他好文 时间:
2014-08-08 08:29:05
阅读次数:
239
单实例模式一直是常用的设计模式,对于python的单实例模式,其实其本身就有实现http://stackoverflow.com/questions/31875/is-there-a-simple-elegant-way-to-define-singletons-in-python/31887#31...
分类:
编程语言 时间:
2014-08-08 01:56:35
阅读次数:
241
Jump Game IIGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents...
分类:
其他好文 时间:
2014-08-08 01:51:45
阅读次数:
214
Fighting the LandlordsProblem DescriptionFighting the Landlords is a card game which has been a heat for years in China. The game goes with the 54 pok...
分类:
其他好文 时间:
2014-08-07 21:47:30
阅读次数:
408
create() ->mnesia:create_table(?ID_TABLE, [{disc_copies, [node()]}, {attributes, record_info(fields, unique_id)}]),Fun = fun(Old) ->#game_server_data{...
分类:
数据库 时间:
2014-08-07 21:43:30
阅读次数:
241
import java.util.Scanner;public class Game { public static void main(String[] args){ int r; r = (int) (Math.random()*2 + 1); S...
分类:
其他好文 时间:
2014-08-07 18:10:10
阅读次数:
159
题意:你有N个整数,A1,A2,…,一个。你需要处理两种类型的操作。一种类型的操作是添加了一些给定的数字,每个数字在一个给定的时间间隔。另一种是在给定的时间间隔要求数量的总和。
难点:主要是lazy标记,不好弄懂, 其实lazy标记就是当前改变的值不全部更新,等到用的时候再更新,这样就节省了好多时间。
题目链接:http://poj.org/problem?id=3468
代码:
#i...
分类:
其他好文 时间:
2014-08-07 13:24:40
阅读次数:
209
A Multiplication GameTime Limit: 5000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3691Accepted Submission(s): 2...
分类:
其他好文 时间:
2014-08-07 12:44:19
阅读次数:
166
题目链接题意:只有这两种操作Cabc" means addingcto each ofAa,Aa+1, ... ,Ab. -10000 ≤c≤ 10000."Qab" means querying the sum ofAa,Aa+1, ... ,Ab.分析:自己写的有点麻烦了,写的时候手残+脑残,改...
分类:
其他好文 时间:
2014-08-07 12:16:09
阅读次数:
261