Higher Math Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2219    Accepted Submission(s): 1219 Problem Description You are building a house. You’d prefer if all the walls have a precise right…
题意:给定三个边,判断是不是直角三角形. 析:水题,勾股定理... 代码如下: #include <iostream> #include <cstdio> #include <algorithm> #include <queue> #include <vector> #include <cstring> #include <map> using namespace std; const int maxn = 100; in…
#include <cstdio> #include <string> using namespace std; void swap(int& a,int& b) { int t; t=a; a=b; b=t; } int main() { int n; scanf("%d",&n); ; i<=n; i++) { printf("%s%d%s\n","Scenario #",i,"…
Higher Math Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2853    Accepted Submission(s): 1525 Problem Description You are building a house. You’d prefer if all the walls have a precise right…
题目链接:HDU - 5170GTY's math problem 题目描述 Description GTY is a GodBull who will get an Au in NOI . To have more time to learn algorithm knowledge, he never does his math homework. His math teacher is very unhappy for that, but she can't do anything beca…
Shape of HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4972    Accepted Submission(s): 2250 Problem Description 话说上回讲到海东集团推选老总的事情,最终的结果是XHD以微弱优势当选,从此以后,“徐队”的称呼逐渐被“徐总”所取代,海东集团(HDU)也算是名副其实了.…
题意 给出一个存钱罐里的钱币重量 给出可能的n种钱币重量以及价值 求存钱罐中钱币的最小价值 若不可能另有输出 在裸的完全背包上加了一点东西 即判断这个背包能否被装满 初始化 dp[0]=0 其余的都使用for循环设置成INF 以达到求min的目的 最后如果dp[v]还是那么大就说明它根本没有通过前面的方式被改变 即 不能被装满 #include<stdio.h> #include<string.h> #include<algorithm> #include<map…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1878 题目大意:欧拉回路是指不令笔离开纸面,可画过图中每条边仅一次,且可以回到起点的一条回路.现给定一个图,问是否存在欧拉回路? 解题思路:判断无向图是否存在欧拉回路,判断每个点的度数是否为偶数+并查集确认连通性. 代码: #include<iostream> #include<cstring> #include<cstdio> #define CLR(arr,val) m…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1217 题目大意:问你是否可以通过转换货币从中获利 如下面这组样例: USDollar 0.5 BritishPound BritishPound 10.0 FrenchFranc FrenchFranc 0.21 USDollar 可以通过US->Br->French->US这样转换,把1美元变成1*0.5*10*0.21=1.05美元赚取%5的利润. 解题思路:其实就相当于bellman-…
The Accomodation of Students Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5225    Accepted Submission(s): 2374 Problem Description There are a group of students. Some of them may know each ot…