算法设计
文章平均质量分 63
a779812560
喜欢交朋友,喜欢编程
展开
-
1002
Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer原创 2012-05-07 10:44:29 · 282 阅读 · 0 评论 -
1000
Problem Description Calculate A + B. Input Each line will contain two integers A and B. Process to end of file. Output For each case, output A + B in one line.原创 2012-05-07 09:11:12 · 316 阅读 · 0 评论 -
1001
Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge). In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n. Input The input will co原创 2012-05-07 09:39:43 · 420 阅读 · 0 评论 -
1003
Problem Description Given a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5原创 2012-05-07 21:00:50 · 290 阅读 · 0 评论 -
1005
Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of f(n).原创 2012-05-08 12:02:04 · 285 阅读 · 0 评论 -
1004
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest原创 2012-05-08 09:08:35 · 341 阅读 · 0 评论 -
1078
Problem Description FatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q < n. At e原创 2012-05-08 16:44:00 · 662 阅读 · 0 评论