HDU
chan_yeol
这个作者很懒,什么都没留下…
展开
-
CA Loves Stick
Problem Description CA loves to play with sticks. One day he receives four pieces of sticks, he wants to know these sticks can spell a quadrilateral. (What is quadrilateral? Click here: https://en.w原创 2016-04-05 19:29:00 · 254 阅读 · 0 评论 -
骨牌铺方格
骨牌铺方格 在2×n的一个长方形方格中,用一个1× 2的骨牌铺满方格,输入n ,输出铺放方案的总数. 例如n=3时,为2× 3方格,骨牌的铺放方案有三种,如下图:(图略) Input 输入数据由多行组成,每行包含一个整数n,表示该测试实例的长方形方格的规格是2×n (0#include<iostream> #include<cstdio> #include<cstring> using na原创 2016-03-29 08:47:38 · 288 阅读 · 0 评论 -
find the nth digit
find the nth digit Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 10711 Accepted Submission(s): 3144Problem Description 假设: S1 = 1 S2 =原创 2016-03-28 17:51:58 · 329 阅读 · 0 评论 -
Problem Description
Rescue 借鉴了大神的思路Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the原创 2016-03-27 15:46:47 · 443 阅读 · 0 评论 -
HDU Today 2112
最短路径问题,城市名字可用map标记一下 #include #include #include #include #include using namespace std; map m; int a[155][155]; int vis[155],dis[155],N; string s,e; int dij(int n){ int ss=m[s]; vis[ss]=1; int nex原创 2016-05-26 19:42:54 · 431 阅读 · 0 评论 -
最大报销额 HDU 1864
//用dfs做的,但是正解似乎是dp //http://acm.hdu.edu.cn/showproblem.php?pid=1864 #include #include #include #include using namespace std; vector v; double ans,price; int n; void dfs(double sum,int t); int main(){原创 2016-05-14 16:08:21 · 258 阅读 · 0 评论 -
哈密顿绕行世界问题 HDU 2181
dfs 题目http://acm.hdu.edu.cn/showproblem.php?pid=2181#include #include #include using namespace std; int G[30][30]; int vis[30]; int rr[30],count=1,s; void dfs(int m,int cnt){ // cout<<m<<endl; vis[原创 2016-05-14 16:16:48 · 288 阅读 · 0 评论 -
还是畅通工程 HDU 1233
http://acm.hdu.edu.cn/showproblem.php?pid=1233 最小生成树 #include #include #include #include using namespace std; int G[105][105],dis[105],vis[105]; int dist=0; int n; void prim(){ vis[1]=1; int m;原创 2016-05-14 16:31:23 · 275 阅读 · 0 评论