随笔分类 -  HDU

Phone List --字典树
摘要:题目 刚开始定义node 变量,之后删除时出现run error ,之后问了别人, 知道 delete 只能删除堆的内存,所以定义了node *root=new node ,AC了。 注:new 和delete 只能用堆里的内存 即new 的内存 再就是注意建完一次树之后就删了建的树。要不内存超出。 阅读全文

posted @ 2016-05-17 13:47 青春的梦想付诸行动 阅读(151) 评论(0) 推荐(0)

String 尺取法
摘要:1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 char s[1000010]; 6 int vis[300]; 7 int main() 8 { 9 int tt,k,ss,t; //ss 表示低的指针 t代表 阅读全文

posted @ 2016-04-29 16:06 青春的梦想付诸行动 阅读(186) 评论(0) 推荐(0)

BestCoder Round #81 (div.2) Matrix
摘要:1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 int s[1001][1001]; 6 7 int main() 8 { 9 int t,m,n,q,a,x,y; 10 scanf("%d",&t); 11 w 阅读全文

posted @ 2016-04-22 21:14 青春的梦想付诸行动 阅读(160) 评论(0) 推荐(0)

BestCoder Round #81 (div.2)Machine
摘要:1 #include <iostream> 2 #include <cstring> 3 #include <cstdio> 4 using namespace std; 5 6 char s[31]; 7 char arr[3]={'R','G','B'}; 8 long long ans[31] 阅读全文

posted @ 2016-04-22 21:13 青春的梦想付诸行动 阅读(121) 评论(0) 推荐(0)

Keywords Search
摘要:1 #include <cstdio> 2 #include <cstring> 3 #include <algorithm> 4 #include <iostream> 5 using namespace std; 6 7 const int kind=26; 8 9 struct node { 阅读全文

posted @ 2016-04-22 17:52 青春的梦想付诸行动 阅读(151) 评论(0) 推荐(0)

Max Sum
摘要:1 #include <cstdio> 2 #include <algorithm> 3 using namespace std; 4 5 int main() 6 { 7 int t,temp,n,ans,j,x,z,sum,cc=0; //sum存放最大数值 x代表下表最小 z代表最大下表 cc 阅读全文

posted @ 2016-04-14 17:59 青春的梦想付诸行动 阅读(158) 评论(0) 推荐(0)

BestCoder Round #79 jrMz and angles
摘要:1 #include <iostream> 2 #include <cstdio> 3 #include <cmath> 4 5 using namespace std; 6 7 int main() 8 { 9 int n,m,t,flag; 10 double a,b; 11 scanf("%d 阅读全文

posted @ 2016-04-09 20:27 青春的梦想付诸行动 阅读(200) 评论(0) 推荐(0)

导航