01 2016 档案

POJ Wormholes 最短路径 ballman_ ford 有负环
摘要:1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 #include <iostream> 5 #include <queue> 6 #define MAX 9999999 7 8 using namespace std 阅读全文

posted @ 2016-01-30 23:18 青春的梦想付诸行动 阅读(376) 评论(0) 推荐(0) 编辑

上帝造题五分钟
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int main() 6 { 7 int str[2000],tmp[2000]; 8 int n,q,l,r,j; 9 while(~scanf("%d%d... 阅读全文

posted @ 2016-01-26 23:35 青春的梦想付诸行动 阅读(157) 评论(0) 推荐(0) 编辑

算法提高 新建Microsoft Word文档
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const char s2[15] ="Successful"; 7 const char s3[15] ="Failed"; 8 int main() 9 {... 阅读全文

posted @ 2016-01-26 23:10 青春的梦想付诸行动 阅读(299) 评论(0) 推荐(0) 编辑

算法训练 最短路
摘要:1 #include<cstdio> 2 #include<cstring> 3 #include<queue> 4 #include<iostream> 5 #include<algorithm> 6 #include<cmath> 7 using namespace std; 8 #define 阅读全文

posted @ 2016-01-26 20:46 青春的梦想付诸行动 阅读(185) 评论(0) 推荐(0) 编辑

最短路径 Dijkstra && Bellman_ford
摘要:1 #include<cstdio> 2 #include<iostream> 3 #include<algorithm> 4 #include<queue> 5 #include<cstring> 6 #define MAX 9999999 7 8 using namespace std; 9 1 阅读全文

posted @ 2016-01-26 19:43 青春的梦想付诸行动 阅读(200) 评论(0) 推荐(0) 编辑

数字三角形
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 int s[100][100]; 8 int dp[100][100]; 9 int max(int a,int b)10 {11 if(... 阅读全文

posted @ 2016-01-25 23:08 青春的梦想付诸行动 阅读(180) 评论(0) 推荐(0) 编辑

算法提高 快乐司机
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 struct node{ 6 int g,p; 7 double ave; 8 } s[10010]; 9 10 int main()11 {12 int n... 阅读全文

posted @ 2016-01-25 23:06 青春的梦想付诸行动 阅读(193) 评论(0) 推荐(0) 编辑

算法提高 身份证号码升级
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 char s[20]; 6 const char s1[11]={'1','0','x','9','8','7','6','5','4','3','2'}; 7 const int ... 阅读全文

posted @ 2016-01-25 21:58 青春的梦想付诸行动 阅读(203) 评论(0) 推荐(0) 编辑

枚举排列
摘要:无重复的全排列,0~n-1 1 void print_permutition(int n,int *a,int cur) 2 { 3 if(n==cur) 4 { 5 for(int i=0;ic1)25 {26 ... 阅读全文

posted @ 2016-01-22 22:13 青春的梦想付诸行动 阅读(152) 评论(0) 推荐(0) 编辑

排列数
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 long long sum=0; 6 void print_permutation(int n,int s,int *a,int cur);//n为输出的,s为元素个数,a为数组,c... 阅读全文

posted @ 2016-01-22 21:06 青春的梦想付诸行动 阅读(168) 评论(0) 推荐(0) 编辑

算法训练 K好数
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxn=150; 7 const int mod=1000000007; 8 int dp[maxn][maxn]; 9 10 i... 阅读全文

posted @ 2016-01-22 19:48 青春的梦想付诸行动 阅读(259) 评论(0) 推荐(0) 编辑

算法训练 前缀表达式
摘要:1 #include 2 using namespace std; 3 int main() 4 { 5 6 char c; 7 int a,b; 8 scanf("%c%d%d",&c,&a,&b); 9 if(c=='+')10 pr... 阅读全文

posted @ 2016-01-22 13:20 青春的梦想付诸行动 阅读(282) 评论(0) 推荐(0) 编辑

算法训练 区间k大数查询
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int main() 6 { 7 int a[1010],b[1010]; 8 int n,m,l,r,k,i,j; 9 while(~scanf("%d",... 阅读全文

posted @ 2016-01-21 23:24 青春的梦想付诸行动 阅读(149) 评论(0) 推荐(0) 编辑

最大最小公倍数
摘要:1 #include 2 #include 3 using namespace std; 4 int main() 5 { 6 7 long long ans,n; 8 while(~scanf("%lld",&n)) 9 {10 if(n=n-3。别人的... 阅读全文

posted @ 2016-01-20 22:49 青春的梦想付诸行动 阅读(275) 评论(0) 推荐(0) 编辑

Anagrams问题
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 map s0,s1; 8 char str0[90],str1[90]; 9 10 void zh(char str0[],in... 阅读全文

posted @ 2016-01-19 22:52 青春的梦想付诸行动 阅读(105) 评论(0) 推荐(0) 编辑

基础练习 十六进制转换八进制
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 char str[100010]; 8 int a[5000000]; 9 10 int main()11 {12 int i,k,j,n... 阅读全文

posted @ 2016-01-18 23:11 青春的梦想付诸行动 阅读(349) 评论(0) 推荐(0) 编辑

算法训练 关联矩阵
摘要:1 #include 2 3 using namespace std; 4 5 int main() 6 { 7 int s[110][1010]; 8 int n,m,a,b,i,j; 9 while(~scanf("%d%d",&n,&m))10 {11 ... 阅读全文

posted @ 2016-01-18 22:55 青春的梦想付诸行动 阅读(158) 评论(0) 推荐(0) 编辑

寻找数组中最大值
摘要:1 #include 2 3 using namespace std; 4 5 int main() 6 { 7 int s[101]; 8 int max,i,n,c; 9 while(~scanf("%d",&n))10 {11 for(i... 阅读全文

posted @ 2016-01-18 22:21 青春的梦想付诸行动 阅读(186) 评论(0) 推荐(0) 编辑

Torry的困惑(基本型)
摘要:1 #include 2 3 #include 4 using namespace std; 5 6 bool isprime(int x) 7 { 8 int i; 9 for(i=2;i<=sqrt((double)x);i++)10 {11 i... 阅读全文

posted @ 2016-01-18 22:16 青春的梦想付诸行动 阅读(126) 评论(0) 推荐(0) 编辑

最小乘积(基本型)
摘要:#include #include #include using namespace std;int main(){ int s[10000],str[10000]; int n,i,j,c,sum,t; scanf("%d",&t); while(t--) { ... 阅读全文

posted @ 2016-01-17 21:46 青春的梦想付诸行动 阅读(190) 评论(0) 推荐(0) 编辑

矩阵乘法
摘要:1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 int main() 9 {10 int s1[200][200];11 int str[200][200];12 ... 阅读全文

posted @ 2016-01-17 20:18 青春的梦想付诸行动 阅读(205) 评论(0) 推荐(0) 编辑

导航

点击右上角即可分享
微信分享提示