Description Long time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that troubled her is the typhoon. When the typhoon came, everything is terrible. It kept blowing and raining for a long t…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2124 Ac code : #include<stdio.h> #include<stdlib.h> int cmp(const void *a,const void *b) { return *(int *)b-*(int *)a; } int main() { int L, N, i; int a[601], sum, len; while(scanf("%d",…
http://acm.hdu.edu.cn/showproblem.php?pid=2124 Problem Description Long time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that troubled her is the typhoon. When the typhoon came, everythin…
Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.The warehouse has N rooms. The i-th room contains J[i] pounds of JavaBeans and requires F[i] pounds…
Repair the Wall http://acm.hdu.edu.cn/showproblem.php?pid=2124 Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6833 Accepted Submission(s): 3174 Problem Description Long time ago , Kitty live…
Long time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that troubled her is the typhoon. When the typhoon came, everything is terrible. It kept blowing and raining for a long time. And wha…
Problem Description Long time ago , Kitty lived in a small village. The air was fresh and the scenery was very beautiful. The only thing that troubled her is the typhoon. When the typhoon came, everything is terrible. It kept blowing and raining for…
专注于C语言编程 C Programming Practice Problems (Programming Challenges) 杭电ACM题目分类 基础题: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.…
最近在尝试做acm试题,刚刚是1001题就把我困住了,这是题目: Problem Description In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n. Input The input will consist of a series of integers n, one integer per line Output For each case, output SUM(n) in one…
#include <stdio.h> #include <algorithm> using namespace std; int main () { int a[110],b[110],c[110]; int m,n; int i,j,k; int flag; scanf("%d%d",&m,&n); while (m!=0||n!=0) { k = 0; flag = 0; for (i=0;i<m;i++) scanf("%d…
杭电ACM(1002)大数相加 A + B Problem II Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. InputThe first line of the input contains an integer T(1<=T<=20) which means the number…
http://acm.hdu.edu.cn/showproblem.php?pid=2500 做一个正气的杭电人 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6088 Accepted Submission(s): 4927 Problem Description 做人要有一身正气,杭电学子都应该如此.比如我们今天的考试就应该…
阿牛的EOF牛肉串 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 20247 Accepted Submission(s): 9495 Problem Description 今年的ACM暑期集训队一共同拥有18人.分为6支队伍.当中有一个叫做EOF的队伍,由04级的阿牛.XC以及05级的COY组成.在共同的集训生活中,大家建立…
做一个正气的杭电人 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9069 Accepted Submission(s): 7254 Problem Description 做人要有一身正气,杭电学子都应该如此.比如我们今天的考试就应该做到“诚信”为上.每次考试的第一个题目总是很简单,今天也不例外,本题是要求输出指定大小的"HDU…
异或^符号,在平时的学习时可能遇到的不多,不过有时使用得当可以发挥意想不到的结果. 值得注意的是,异或运算是建立在二进制基础上的,所有运算过程都是按位异或(即相同为0,不同为1,也称模二加),得到最终结果. 特点:任何数和0异或都等于它本身;两个相同的数异或后的结果是0: 举例如下: int a = 4 =100(二进制) int b = 3 =011(二进制) int c = a^b = 111 = 7: 下面就^常用应用做个介绍: 1. 在一排数中找到独一无二的一个数 本例启发来自于杭电oj…
这道题是我学了并查集过后做的第三个题,教我们的学姐说这是并查集的基础题,所以有必要牢牢掌握. 下面就我做这道题的经验,给大家一些建议吧!当然,我的建议不是最好的,还请各位大神指出我的错误来,我也好改正. 1.题目概览 这道题是杭电1272,POJ 1308如果写好了代码可以试一试. 小希的迷宫 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s…
Quoit Design Problem Description Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded. In the field of Cyberground, the position of each toy is fixed, and the ri…