- 博客(12)
- 资源 (4)
- 收藏
- 关注
原创 字符串
#include using namespace std; int book[50][50]; int book1[50]; char c[50][50]; char str[2000]; int main() { int cn=1; while(scanf("%s",str+1)!=EOF) { memset(book,0,sizeof(book));
2017-04-19 11:59:33 271
原创 debug
#include //#include #include #include #include using namespace std; char str[15][70]; int main() { int t; scanf("%d",&t); while(t--) { int n; scanf("%d",&n);
2017-04-19 11:39:33 229
原创 hdu1242
#include//代码写时主要注意了有多个r能到a输出它们最快到的那个时间,, //开始没做转换,,对每个r都进行广搜,,为保证正确性做了如下处理 #define inf 9999999//对每个r进行广搜,,标记它达到每个点的时间(即book数组标记到此点的最小时间),, using namespace std;//book标记数组每次搜索不清空,,这样保证了最小时间 const in
2017-04-15 00:12:16 251
原创 nyistoj_表达式求值
#include using namespace std; char str[1000]; int oper(int x,char ch,int y) { if(ch=='+') return x+y; if(ch=='*') return x*y; } char cmp(char ch1,char ch2) { if(ch1=='('){if(ch2=='('||ch2=
2017-04-13 01:02:10 486
原创 stl-map-pair
#include //#include #include #include #include #include #include using namespace std; typedef long long LL; struct node { LL x,y; }; map,LL>pq;//用来一对一 map >to;//用来一对一 vector >c; pairp1,p2,st,st1;
2017-04-13 00:31:36 351
原创 非迷宫图bfs-wr,dfs-tl
#include//连着两次搞错了关系,dfs->bfs->归正途->找解.跟头连翻两次,下次记得。 #include//保存完整路径,可解之途 #include #include #include using namespace std; const int inf=999999999; mappq; double a[50][50]; int book[50],flag; void dfs(i
2017-04-09 20:58:19 440
原创 递归二叉树知先中序求后序遍历
#include #include #include #include #include using namespace std; char str1[30],str2[30]; struct node { char ch; node *l,*r; }; node* build(char ch,node *l,node *r) { node *p=(struct node
2017-04-09 00:42:10 364
原创 广搜暴力
#include #include #include #include #include #include using namespace std; int a[250][2],temp,n,c[55000]; int jud(int x,int y,int xx,int yy) { return ((x-xx)*(x-xx)+(y-yy)*(y-yy))<=temp?1:0; } que
2017-04-07 17:16:06 265
原创 (n*m地图)从一点无顺序到到多点最小步
#include #include #include #include #include #include #include using namespace std; typedef long long ll; const int inf=9999999; int n,m,knum; char a[120][120]; int book[120][120][2][2][2][2],c[4][2];
2017-04-07 16:09:26 730
原创 test-6-H
#include//最优解是从1-n依次把之前的数移到后面去。 #include using namespace std; typedef long long ll; const int N=1e6; int a[N+100],b[N+100]; int main() { int t,cas=1; scanf("%d",&t); while(t--) {
2017-04-05 00:44:00 358
《具体数学计算机科学基础》 第二版
2018-06-28
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人