随笔分类 -  hdu ACM Steps

hdu 1.3.2 Moving Tables
摘要:这道题比较简单,就是用数组存取其路径。如101和102是对门,其过道号可以记为51. 1和2之间的为1. 今早突然收到操作系统停课的通知,哈哈 回来就做一下水题,开心 1 #include 2 #include 3 int main() 4 { 5 //freopen("input.txt"... 阅读全文
posted @ 2014-04-29 09:13 lpt 阅读(133) 评论(0) 推荐(0)
hdu 1.3.1 FatMouse' Trade
摘要:贪心的运用,主要看其比值,取最大值实现贪心... 1 #include 2 #include 3 #include 4 using namespace std; 5 6 struct room 7 { 8 int j; 9 int f;10 bool operator (f... 阅读全文
posted @ 2014-04-20 10:23 lpt 阅读(150) 评论(0) 推荐(0)
hdu 1.2.8
摘要:1 #include 2 #include 3 using namespace std; 4 5 int pow(int a,int b) 6 { 7 int ans = 1; 8 while(b--) 9 {10 ans *= a;11 }12 ... 阅读全文
posted @ 2014-04-20 10:21 lpt 阅读(208) 评论(0) 推荐(0)
hdu 1.2.7
摘要:1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 //freopen("input.txt","r",stdin); 8 int a,b; 9 char op;10 int T;11... 阅读全文
posted @ 2014-04-20 10:20 lpt 阅读(174) 评论(0) 推荐(0)
hdu 1.2.6
摘要:勾股定理... 1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 //freopen("input.txt","r",stdin); 8 int s[3]; 9 int T;10 in... 阅读全文
posted @ 2014-04-20 10:18 lpt 阅读(145) 评论(0) 推荐(0)
hdu 1.2.5
摘要:1 #include 2 #include 3 int main() 4 { 5 //freopen("input.txt","r",stdin); 6 int i; 7 char a[1000]; 8 while(gets(a)) 9 {10 ... 阅读全文
posted @ 2014-04-20 10:17 lpt 阅读(175) 评论(0) 推荐(0)
hdu 1.2.4
摘要:采用异或... 1 #include 2 int main() 3 { 4 //freopen("input.txt","r",stdin); 5 int n,s,a; 6 while(scanf("%d",&n),n) 7 { 8 s = 0; 9 ... 阅读全文
posted @ 2014-04-20 10:15 lpt 阅读(111) 评论(0) 推荐(0)
hdu 1.2.3
摘要:很简单的算法基础题...闰年判断以及计算 1 #include 2 #include 3 using namespace std; 4 int main() 5 { 6 //freopen("input.txt","r",stdin); 7 int year,n; 8 int... 阅读全文
posted @ 2014-04-20 10:13 lpt 阅读(161) 评论(0) 推荐(0)