HDU--2015】的更多相关文章

http://acm.hdu.edu.cn/showproblem.php?pid=2015 Problem Description 有一个长度为n(n<=100)的数列,该数列定义为从2开始的递增有序偶数,现在要求你按照顺序每m个数求出一个平均值,如果最后不足m个,则以实际数量求平均值.编程输出该平均值序列.   Input 输入数据有多组,每组占一行,包含两个正整数n和m,n和m的含义如上所述.   Output 对于每组输入数据,输出一个平均值序列,每组输出占一行.   Sample In…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2015 题目大意:给你个长度为n(n<=100)的数列,该数列定义为从2开始的递增有序偶数,让你按顺序每m个数求出一个平均值,如果最后不足m个,则以实际数量求平均值 解题思路: 记录 n = 100 的数列的 100 个 前 n(n为1 ~ 100) 项和,一个长度为 n 的 “滑动窗口”, 从头滑动到尾,过程中每次停滞都做一次除以 n 的操作并输出,注意格式,最后判断有没有剩下的了,有就输出来 PS…
Dual horsetail Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 500    Accepted Submission(s): 189 Problem Description   Nanaya's favorite Dual horsetail robot has run out of power!  As a best fr…
下面继续给出HDU 2014~2032的AC程序,供大家参考.2014~2032这19道题就被归结为“C语言程序设计练习(三) ”~“C语言程序设计练习(五) ”. HDU 2014:青年歌手大奖赛_评委会打分 用max保存最高分,min保存最低分,sum表示总分,则最后平均分为(sum-max-min)/(n-2). #include <stdio.h> int main() { int n,i,score,min,max,sum; while (scanf("%d",&…
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5475 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, X = 1. This calculator only supports two types…
pid=5288">http://acm.hdu.edu.cn/showproblem.php?pid=5288 Problem Description OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there's no j(l<=j<=r,j<>i) satisfy ai mod aj=0,now…
http://acm.hdu.edu.cn/showproblem.php?pid=5441 Travel Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2061    Accepted Submission(s): 711 Problem Description Jack likes to travel around the wo…
http://acm.hdu.edu.cn/showproblem.php?pid=5444 Elven Postman Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 939    Accepted Submission(s): 520 Problem Description Elves are very peculiar crea…
2015 HDU 多校联赛 5363 Key Set 题目: http://acm.hdu.edu.cn/showproblem.php? pid=5363 依据前面给出的样例,得出求解公式 fn = 2^(n-1) - 1, 数据量大,实际就是求幂次方. 可用分治法求解.复杂度O(nlogn) // 分治法求高速幂 #include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; const int M…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5289 Problem Description Tom owns a company and he is the boss. There are n staffs which are numbered from 1 to n in this company, and every staff has a ability. Now, Tom is going to assign a special tas…