- 博客(11)
- 收藏
- 关注
原创 51nod 1101 DP
N元钱换为零钱,有多少不同的换法?币值包括1 2 5分,1 2 5角,1 2 5 10 20 50 100元。例如:5分钱换为零钱,有以下4种换法:1、5个1分2、1个2分3个1分3、2个2分1个1分4、1个5分(由于结果可能会很大,输出Mod 10^9 + 7的结果)Input输入1个数N,N = 100表示1元钱。(1 Outpu
2017-11-03 17:42:08
163
原创 Dijkstra HDU 3790
#include#include#include#include#includeusing namespace std;#define inf 1int used[1005];struct node{int x;int d;int p;node(){}node(int a, int b, int c) { x = a; d = b; p =
2017-10-18 20:09:37
158
原创 Dijkstra HDU 1874
#include#includeusing namespace std;/*Dijkstra的算法思想:在所有没有访问过的结点中选出dis(s,x)值最小的x对从x出发的所有边(x,y),更新dis(s,y)=min(dis(s,y),dis(s,x)+dis(x,y))*/#include #include #include using names
2017-10-16 19:15:39
167
原创 HDU 1016
#include#includeint isprime[40] = { 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0 };int path[40];int vis[40];int n;
2017-09-29 14:57:50
158
原创 HDU 1003
#include#include#includeusing namespace std;int dp[100005];int a[100005];int num = 1;int main(){ int t; scanf("%d", &t); while (t--) { memset(dp, 0, sizeof
2017-09-28 20:37:15
201
原创 POJ 3660
#include#includeint n, m;int mp[105][105];void floyd(){for (int k = 1; k for (int j = 1; j for (int i = 1; i mp[i][j] = mp[i][j] || (mp[i][k] && mp[k][j]);}int main(){while (
2017-09-26 22:33:20
227
原创 POJ 2586
Y2K Accounting BugTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15946 Accepted: 7997DescriptionAccounting for Computer Machinists (ACM) has sufferred
2017-09-18 19:54:36
340
原创 HDU 2054
A == B ?Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 109296 Accepted Submission(s): 17488Problem DescriptionGive you two numbe
2017-09-16 12:57:38
241
原创 POJ 1753
Flip GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 46827 Accepted: 20042DescriptionFlip game is played on a rectangular 4x4 field with two-sided p
2017-09-14 18:14:24
160
空空如也
sample_uavtrack.gpx
2023-09-04
TA创建的收藏夹 TA关注的收藏夹
TA关注的人