Portal Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 931 Accepted Submission(s): 466 Problem Description ZLGG found a magic theory that the bigger banana the bigger banana peel .This import…
Portal Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2027 Accepted Submission(s): 998 Problem Description ZLGG found a magic theory that the bigger banana the bigger banana peel .This impor…
The Number of Palindromes Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2465 Accepted Submission(s): 841 Problem Description Now, you are given a string S. We want to know how many distin…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4031 Problem Description Today is the 10th Annual of “September 11 attacks”, the Al Qaeda is about to attack American again. However, American is protected by a high wall this time, which can be treating…
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5875 Function Time Limit: 7000/3500 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others) 问题描述 The shorter, the simpler. With this problem, you should be convinced of this truth. You are given an…
The Number of Palindromes Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)http://acm.hdu.edu.cn/showproblem.php?pid=3948 Problem Description Now, you are given a string S. We want to know how many distinct substri…
Portal Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1312 Accepted Submission(s): 656 Problem Description ZLGG found a magic theory that the bigger banana the bigger banana peel .This impo…
An easy problem Time Limit: 8000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description One day, a useless calculator was being built by Kuros. Let's assume that number X is showed on the screen of calculator. At first…
所谓的数据离线处理,就是将所有的输入数据全部读入后,在进行统一的操作,这样当然有好处,比如让你算好多数的阶层,但是输入的每个数是没有顺序的,其实跟可以线性的解决,但是由于没有顺序的输入,这样处理的话复杂度就很高,若将输入的这些数据全部先存起来,再排序,然后按从小到大的顺序处理. f(n)=(∏i=1nin−i+1)%1000000007 You are expected to write a program to calculate f(n) when a certain n is given.…
把数值和查询放在一起从小到大排序,纪录每个数值的位置,当遇到数值时就更新到树状数组中,遇到查询就直接查询该区间和. #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> using namespace std; ; struct node { int id; int L, R; int val; } qq[MAXN]; int N, Q; int cntQ;…
传送门 Trees Accepts: 156 Submissions: 533 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description Today CodeFamer is going to cut trees.There are N trees standing in a line. They are numbered from 1 to N…
Group Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 546 Accepted Submission(s): 299 Problem Description There are n men ,every man has an ID(1..n).their ID is unique. Whose ID is i and i-1…