摘要: ClockTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4521 Accepted Submission(s): 1387Problem DescriptionThere is an analog clock with two hands: an hour hand and a minute hand. The two hands form an angle. The angle is measured as the small... 阅读全文
posted @ 2014-04-12 19:43 盒子先生★ 阅读(245) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionDo you remember a sentence "Accepted today?" Yes, the sentence is mentioned frequently in lcy's course "ACM Programming"!The contest is still in progress this moment. How excited it is! You, smart programmer, must have AC some problems today. "Can I ge 阅读全文
posted @ 2014-04-12 18:23 盒子先生★ 阅读(365) 评论(0) 推荐(0) 编辑
摘要: EuclidTime Limit: 1000MS Memory limit: 65536K题目描述输入输出示例输入0 0 5 0 0 5 3 2 7 2 0 41.3 2.6 12.1 4.5 8.1 13.7 2.2 0.1 9.8 6.6 1.9 6.70.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0示例输出5.000 0.800 0.000 0.80013.756 7.204 2.956 5.304#include#include#includeusing namespace std;struct Point{ double x,y;}... 阅读全文
posted @ 2014-04-10 22:27 盒子先生★ 阅读(199) 评论(0) 推荐(0) 编辑
摘要: HDU1263:水果分类:排序2013-05-31 11:12430人阅读评论(0)收藏举报ACM杭电解题报告结构体排序HDUProblem Description夏天来了~~好开心啊,呵呵,好多好多水果~~Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了.Input第一行正整数N(0#include #include using namespace std;struct Node{ char name[100]; char space[100]; int num;} f... 阅读全文
posted @ 2014-04-09 19:00 盒子先生★ 阅读(664) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;int main(){ char a[20],b[20]; int c; cin>>a>>b>>c; cout<<a<<" "<<b<<" "<<c<<endl; return 0; } 阅读全文
posted @ 2014-04-02 17:13 盒子先生★ 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 函数简介原型:extern int strcmp(const char *s1,const char * s2);所在头文件:string.h功能:比较字符串s1和s2。一般形式:strcmp(字符串1,字符串2)说明:当s1s2时,返回正数 一般是1即:两个字符串自左向右逐个字符相比(按ASCII值大小相比较),直到出现不同的字符或遇'\0'为止。如:"A""A" "computer">"compare"特别注意:strcmp(const char *s1,const char * s2)这 阅读全文
posted @ 2014-04-02 16:32 盒子先生★ 阅读(252) 评论(0) 推荐(0) 编辑
摘要: memset(a,0,sizeof(a))a是一个数组,这句话是把a这个数组的内容全都置为0,但是如果置为其他的就有可能会出现意外情况。 阅读全文
posted @ 2014-04-02 16:27 盒子先生★ 阅读(139) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;int main(){ int i; int bb[67]; int cc[67]; int dd[67]; int ee[67]; memset(cc,0,sizeof(cc)); memset(bb,0,sizeof(bb)); memset(dd,0,sizeof(dd)); memset(ee,0,sizeof(ee)); char array[250]={'A','B','C','D','E','F','G&# 阅读全文
posted @ 2014-04-02 16:21 盒子先生★ 阅读(441) 评论(0) 推荐(0) 编辑
摘要: 一种排序时间限制:3000ms | 内存限制:65535KB难度:3描述现在有很多长方形,每一个长方形都有一个编号,这个编号可以重复;还知道这个长方形的宽和长,编号、长、宽都是整数;现在要求按照一下方式排序(默认排序规则都是从小到大);1.按照编号从小到大排序2.对于编号相等的长方形,按照长方形的长排序;3.如果编号和长都相同,按照长方形的宽排序;4.如果编号、长、宽都相同,就只保留一个长方形用于排序,删除多余的长方形;最后排好序按照指定格式显示所有的长方形;输入第一行有一个整数 0#include#define N 1010using namespace std;struct SS{ ... 阅读全文
posted @ 2014-04-02 14:28 盒子先生★ 阅读(218) 评论(0) 推荐(0) 编辑