hdu 1084 What Is Your Grade?】的更多相关文章

http://acm.hdu.edu.cn/showproblem.php?pid=1084 What Is Your Grade? Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9580    Accepted Submission(s): 2940 Problem Description “Point, point, life of…
题目在这里:1084 题目描述: “Point, point, life of student!” This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. How many points can you get? Now, I told you the rules which are used in this course. There are 5 probl…
Problem Description "Point, point, life of student!" This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. How many points can you get? Now, I told you the rules which are used in this course. There are…
What Is Your Grade? Problem Description “Point, point, life of student!” This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. How many points can you get? Now, I told you the rules which are used in this co…
题目不难,但是需要对数据进行处理,我的代码有些冗长,希望以后能改进... 主要思路是先算总的时间,然后进行对比,将做同样题数的前一半的人筛选出来. /状态:AC/ Description “Point, point, life of student!”        This is a ballad(歌谣)well known in colleges, and you must care about your score in this exam too. How many points can…
Description 题目描述 Ted is a employee of Always Cook Mushroom (ACM). His boss Matt gives him a pack of mushrooms and ask him to grade each mushroom according to its weight. Suppose the weight of a mushroom is w, then it’s grade s is s = 10000 - (100 - w…
http://acm.hdu.edu.cn/showproblem.php?pid=5038 模拟水题 求出现次数最多的grade.如果有多个grade出现的次数一样多,且还有其他的grade,则把这些出现次数最多的grade按升序输出:否则,输出"Bad Mushroom". #include <cstdio> #include <cstdlib> #include <cmath> #include <cstring> #include…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5038 解题报告:就是输入n个数w,定义s = 10000 - (100 - w)^2,问s出现频率最高的是哪些,当所有的不同的s出现频率相同时,输出Bad Mushroom,当s只有一种时,直接输出. #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> using n…
解题思路:这题最关键的是要读懂题意,If not all the value are the same but the frequencies of them are the same, there is no mode.这句话是至关重要 的一句.意思是:如果不是所有的值是相同的,并且他们的出现次数是相同的,那么就没有模型.如,1 1 2 2 3 3 ,它们并不是所有的数都是相同的的, 并且1出现2次,2出现2次,3出现2次,所以这组数据是没有模型的,同理,1 2 3 4 5 也是没有模型的,输…
题目大意 给出了一列数,要求通过修改某些值,使得最终这列数变成有序的序列,非增或者非减的,求最小的修改量. 分析 首先我们会发现,最终修改后,或者和前一个数字一样,或者和后一个数字一样,这样才能修改量最小. 我们先根据原数列排序,确定元素的大小关系,对应编号为p[i] dp[i][j] 表示考虑前i个元素,最后元素为序列中 第j小元素的最优解 dp[i][j] = MIN(dp[i-1][k]) + abs(a[i]-a[p[j]]), (0<k<=j)    刚开始以为是o(n^3)的复杂度…
题意:给 n 个数,输出众数,但是如果所有的频率都相同但数不同输出 Bad Mushroom. 析:直接记录个数直接暴力就,就是要注意只有一种频率的时候. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include…
HDU 模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 1049 1050 1057 1062 1063 1064 1070 1073 1075 1082 1083 1084 1088 1106 1107 1113 1117 1119 1128 1129 1144 1148 1157 1161 1170 1172 1177 1197 1200 1201…
http://acm.hdu.edu.cn/showproblem.php?pid=1560 仔细读题(!),则可发现这道题要求的是一个最短的字符串,该字符串的不连续子序列中包含题目所给的所有字符串 因为总共只有40个字符,可以尝试使用A*搜索 1.存储状态时直接存储40个字符,每个字符4种可能是肯定不行的. 因为要求的是包含不连续的子序列,所以只需记住当前字符串长度与每个子序列已经包含在当前字符串的长度, 比如题目中的输入样例 4 ACGT ATGC CGTT CAGT 可以这样存储一个序列…
转载来自:http://www.cppblog.com/acronix/archive/2010/09/24/127536.aspx 分类一: 基础题:1000.1001.1004.1005.1008.1012.1013.1014.1017.1019.1021.1028.1029.1032.1037.1040.1048.1056.1058.1061.1070.1076.1089.1090.1091.1092.1093.1094.1095.1096.1097.1098.1106.1108.1157…
模拟题, 枚举1002 1004 1013 1015 1017 1020 1022 1029 1031 1033 1034 1035 1036 1037 1039 1042 1047 1048 1049 1050 1057 1062 1063 1064 1070 1073 1075 1082 1083 1084 1088 1106 1107 1113 1117 1119 1128 1129 1144 1148 1157 1161 1170 1172 1177 1197 1200 1201 120…
HDU ACM-Steps RECORD Chapter 1 Section 1 暖手题 1.1.1 A+B for Input-Output Practice (I) #include <stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)==2) printf("%d\n",a+b); return 0; } 1.1.2 A+B for Input-Output Pract…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2686 思路:多线程dp,参考51Nod 1084:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1084 注:这道题用滚动数组优化反而WA,压到三维即可 代码: #include <bits/stdc++.h> using namespace std; ][],dp[][][]; int main() { int n;…
Level up Time Limit: 10000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3973    Accepted Submission(s): 1104 Problem Description Level up is the task of all online games. It's very boooooooooring. There is o…
题目链接:http://acm.hdu.edu.cn/showproblem.php? pid=1038 Biker's Trip Odometer Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5226    Accepted Submission(s): 3476 Problem Description Most bicycle…
http://acm.hdu.edu.cn/showproblem.php?pid=5038 就是求个众数  这个范围小 所以一个数组存是否存在的状态即可了 可是这句话真恶心  If not all the value are the same but the frequencies of them are the same, there is no mode. 事实上应该是这个意思: 当频率最高的有多个的时候. 假设 全部的grade出现的频率都是相等的,那么是没有mode的 否则依照升序 当…
题目链接: hdu:http://acm.hdu.edu.cn/showproblem.php?pid=5651 bc:http://bestcoder.hdu.edu.cn/contests/contest_showproblem.php?cid=682&pid=1002 xiaoxin juju needs help  Accepts: 150  Submissions: 966  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 6…
xiaoxin and his watermelon candy 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5654 Description During his six grade summer vacation, xiaoxin got lots of watermelon candies from his leader when he did his internship at Tencent. Each watermelon cand…
xiaoxin juju needs help 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5651 Description As we all known, xiaoxin is a brilliant coder. He knew palindromic strings when he was only a six grade student at elementry school. This summer he was working a…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5443 The Water Problem Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 1084    Accepted Submission(s): 863 Problem Description In Land waterless…
转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012.1013.1014.1017.1019.1021.1028.1029. 1032.1037.1040.1048.1056.1058.1061.1070.1076.1089.1090.1091.1092.1093. 1094.1095.1096.1097.1098.1106.1108.1157.116…
Shaolin Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 3191    Accepted Submission(s): 1350 Problem Description Shaolin temple is very famous for its Kongfu monks.A lot of young men go to Shao…
HDU分类 http://www.cnblogs.com/ACMan/archive/2012/05/26/2519550.html#2667329 努力A完.方便自己系统A题 不断更新中.................. 水题:1001 1004 简单题1005 找规律 (循环点,周期问题)1008 1012 1013 简单题(有个小陷阱,大数)1017 1018 简单数学题 1019 简单数学题 1020 简单的字符串处理 1021 找规律的数学题,周期81030 简单题,找规律的数学题1…
The Mussels Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 243964-bit integer IO format: %I64d      Java class name: Main   "To be or not to be, that is the question." Now FJ( Frank&John) faces a se…
Shaolin Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Submit cid=57992#status//C/0" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" style="font-family:Verdana,Arial,sans…
Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7194    Accepted Submission(s): 3345 Problem Description 话说上回讲到海东集团面临内外交困,公司的元老也只剩下XHD夫妇二人了.显然,作为多年拼搏的商人,XHD不会坐以待毙的.  一天,当他正在苦思冥想解困良策的…