随笔分类 - 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"...
阅读全文
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...
阅读全文
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 ...
阅读全文
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...
阅读全文
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...
阅读全文
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 ...
阅读全文
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 ...
阅读全文
浙公网安备 33010602011771号