http://acm.hdu.edu.cn/showproblem.php?pid=2114 Problem Description Calculate S(n). S(n)=13+23 +33 +......+n3 . Input Each line will contain one integer N(1 < n < 1000000000). Process to end of file. Output For each case, output the last four dig…
题目;http://acm.hdu.edu.cn/showproblem.php?pid=5455 题意就是找出所给字符串有多少个满足题目所给条件的子串,重复的也算,坑点是如果有c,f以外的字符也是不满足条件的,还有我被坑了的地方就是当输入很多f的时候,我尽然脑抽的 认为这是不满足条件的,注意这两点就行了,直接暴力 #include<cstdio> #include<cstring> using namespace std; int main() { int t,i,j,x,y,k…
Number Sequence Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 39408 Accepted Submission(s): 16269 Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1],…
Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Yuta has a non-direct graph with n vertices and m edges. The length of each edge . Now…
Rotation Lock Puzzle Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 290 Accepted Submission(s): 60 Problem Description Alice was felling into a cave. She found a strange door with a number s…
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) 看到这个时间,我懵逼了... 果然,Java就是打表,都不能AC,因为Java的输入是流,需要的时间比C真的长好多.... Problem Description You just need to calculate the sum of the formula: 1^2+3^2+5^2+--+ n ^2. Input In each…