![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
acm
文章平均质量分 71
Jimmy_Lee
这个作者很懒,什么都没留下…
展开
-
(HDU)1228 A+B
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1228ps:代码不为原创,不过自己觉得这种思路非常好,就转来(转自HDU id:口翼)与大家分享。#include #include charnum[10][6]={"zero","one","two","three","four","five","six","seven","eight","n原创 2013-09-16 19:33:00 · 612 阅读 · 0 评论 -
(HDU)1005 Number Sequence
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1005 1 1 100 //前100项1 1 2 3 5 1 6 0 6 6 5 4 2 6 1 0 //16 1 1 2 3 5 1 6 0 6 6 5 4 2 6 1 0 1 1 2 3 5 1 6 0 6 6 5 4 2 6 1 0 1 1 2 3 5 1 6 0 6 6 5 4 2原创 2013-09-16 19:32:57 · 633 阅读 · 0 评论 -
【HDU】 1466 计算直线交点…
原文地址:1466 计算直线交点数">【HDU】 1466 计算直线交点数作者:frenzydevil问题描述平面上有n条直线,且无三线共点,问这些直线能有多少种不同交点数。比如,如果n=2,则可能的交点数量为0(平行)或者1(不平行)。Input输入数据包含多个测试实例,每个测试实例占一行,每行包含一个正整数n(nOutput每个测试实例对应一行输出,从小到大列出所有相交方案,转载 2013-09-16 19:33:06 · 659 阅读 · 0 评论 -
(HDU)1213 How Many Tables
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1213//代码转自:(hdu id: hncu1106101-王志盼 )#include#define max 1005int father[max];void liantong(int i,int j);int main(){ intt,n,m,i,j,count; s原创 2013-09-16 19:33:25 · 564 阅读 · 0 评论 -
(hdu) 1201 18岁生日&&…
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1201#includeint leap(int year){ if((year%4==0&&year0!=0)||(year@0==0)) return1; else return0;}int main(){ intn,i,year,month,day原创 2013-09-16 19:33:36 · 650 阅读 · 0 评论 -
(hdu)1710 Binary Tre…
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1710#include#include#define N 1001using namespace std;stackS;//存放父节点int pre[N],ino[N];//先序数组和后序数组int n,i;void make(int l1,int r1,int l2,intr2)//原创 2013-09-16 19:33:55 · 592 阅读 · 0 评论 -
(HDU) 3999 The or…
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=3999#include#includestruct ha{ intleft,right,num; }b[100005];int ii;void insert(int x,int root);void dfs(int root);int main(){原创 2013-09-16 19:33:53 · 582 阅读 · 0 评论 -
(HDU)1862 EXCEL排序
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1862#include#include#includestruct record{//学生记录数据结构定义; char id[7]; char name[10]; int score;}rec[100001];int cmp1(const v原创 2013-09-16 19:33:34 · 688 阅读 · 0 评论 -
(HDU)2527 Safe Or&nbsp…
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2527//ps:算法跟hdu 1053类似#include#include#include#includeusing namespace std;struct node{ intkey; int f; intlson,rson; booloperat原创 2013-09-16 19:33:21 · 646 阅读 · 0 评论 -
(HDU)1053 Entropy (哈夫曼树)
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1053#include#include#include#includeusing namespace std;struct node{ intkey; int f; intlson,rson; booloperator { r原创 2013-09-16 19:33:19 · 591 阅读 · 0 评论 -
(HDU) 3791 二叉搜索树
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=3791#include#includeint main(){ int i,j,t; char s[22]; int tree[530]; int tree1[530]; while(scanf("%d",&t),t) { scanf("%s",s); memset(t原创 2013-09-16 19:33:17 · 684 阅读 · 0 评论 -
(HDU)1022 Train Problem I
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=1022#include#include#includeusing namespace std;int main(){ int n,i,j,c,d[18];//j记录字符串b的下标,d[]记录数据的入栈、出栈顺序 string a,b; while(c原创 2013-09-16 19:33:15 · 625 阅读 · 0 评论 -
A simple puzzle game
Sam and Joy like play games. They often play some puzzlegame. Today , they have a lots of coins, so theydecide to make all coins into manypiles. After that, they agreed that one of them can move on原创 2013-09-16 19:33:59 · 696 阅读 · 0 评论