Problem Description 青年歌手大奖赛中,评委会给参赛选手打分.选手得分规则为去掉一个最高分和一个最低分,然后计算平均得分,请编程输出某选手的得分. Input 输入数据有多组,每组占一行,每行的第一个数是n(2 import java.util.Scanner; class Main{ public static void main(String args[]){ Scanner sc= new Scanner(System.in); while(sc.hasNext()){…
青年歌手大奖赛_评委会打分 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56915 Accepted Submission(s): 28404 Problem Description 青年歌手大奖赛中,评委会给参赛选手打分.选手得分规则为去掉一个最高分和一个最低分,然后计算平均得分,请编程输出某选手的得分. Input 输入数…
偶然发现TI官网有新闻报道大奖赛,还有沈洁女士给我们颁奖的照片.纪念一下. 第六届TI DSP及嵌入式大奖赛决赛暨颁奖典礼在厦门大学成功举行 Frances Han 2013-2014 TI DSP及嵌入式大奖赛决赛暨颁奖典礼于4月24日.25日在有着中国最美校园之称的厦门大学成功举行. 本次竞赛经过8个月的激烈角逐,共同拥有37个參赛队在全国上百个參赛队中脱颖而出,进入了决赛阶段.參加颁奖典礼的人员除了来自全国的25所重点高校,200多名參赛学生和指导老师之外.还有厦门大学的领导,德州仪器公…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2014 题目大意:给你 n 个数,去掉 max 和 min ,求平均数 解题思路: 很水,边记录分数,边记录最边值 代码: #include<iostream> #include<cmath> #include<iomanip> #include<algorithm> using namespace std; int num; int main() { int n…
题意:就是给你 n 个数,代表n个星球的位置,每一个星球的重量都为 1 ! 开始的时候每一个星球都绕着质心转动,那么质心的位置就是所有的星球的位置之和 / 星球的个数 现在让你移动 k 个星球到任意位置(多个星球可以在同一个位置并且所有的星球在同一直线上) 移动之后那么它们质心的位置就可能发生变化,求 I = sum(di^2) di (表示第i个星球到达质心的距离)最小! 设d为n-k个星球的质心位置,如果I值最小,那么移动的k个星球一定都放在另外n-k个星球的质心上, 并且这n-k个星球一定…
第一次做三维的题,这题跑g++超时了,c++过了. #include<iostream> #include<cstdio> #include<queue> using namespace std; #define N 52 int map[N][N][N],visit[N][N][N],a,b,ttime,c; struct Node { int i,j,k; int time; }; int dir[][3]={{1,0,0},{0,1,0},{0,0,1},{-1,…
Problem Description Noting is more interesting than rotation! Your little sister likes to rotate things. To put it easier to analyze, your sister makes n rotations. In the i-th time, she makes everything in the plane rotate counter-clockwisely around…
/* 注意两点 1.从后往前找互补的,刚开始我找的是相邻的但是这个例子就不行101 110 2.因为时累加所以sum可能会超出int范围,这个很重要. */ #include<stdio.h> #define N 110000 #include<string.h> int a[N]; int vis[N]; int power(int u) { int k=0; while(u) { u/=2; k++; } return k; } int main() { int n,i,aa,…
Description Given any integer 0 <= n <= 10000 not divisible by 2 or 5, some multiple of n is a number which in decimal notation is a sequence of 1's. How many digits are in the smallest such a multiple of n? Input Each line contains a number n. …