tf girl

路漫漫其修远兮,吾将上下而求索。

导航

2015年4月16日 #

csuOJ啊 1553

摘要: 题目地址:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1553#include #include #include using namespace std;int main(){ long long int a[10005],n,k; ... 阅读全文

posted @ 2015-04-16 20:11 tf girl 阅读(135) 评论(0) 推荐(0) 编辑

2015年1月25日 #

Codeforces 111B【看看自己和别人在代码能力上的差距!】

摘要: 我的:#include#includeusing namespace std;int x[100001],y[100001],d[100001];int i =1;int main(){ memset(d,-1,sizeof(d)); int n; cin>>n; while... 阅读全文

posted @ 2015-01-25 15:11 tf girl 阅读(423) 评论(0) 推荐(0) 编辑

2015年1月24日 #

hdu1849

摘要: Nim游戏#include int main(){ int m,n,a; while(scanf("%d", &m), m) { n = 0; while(m-- && scanf("%d", &a)) n ^= a; ... 阅读全文

posted @ 2015-01-24 15:15 tf girl 阅读(132) 评论(0) 推荐(0) 编辑

hdu 1847

摘要: #include using namespace std; int main() { int n; while(cin >>n){ if(n%3) ... 阅读全文

posted @ 2015-01-24 15:13 tf girl 阅读(121) 评论(0) 推荐(0) 编辑

2014年9月7日 #

校队训练赛,同时也是HDU4497(数论:素数分解+组合数学)

摘要: 一、题目http://acm.hdu.edu.cn/showproblem.php?pid=4497二、思路将满足条件的一组x,z,y都除以G,得到x‘,y',z',满足条件gcd(x',y',x') = 1,同时lcm(x',y',x') = G/L.特判,当G%L != 0 时,无解。然后素数分... 阅读全文

posted @ 2014-09-07 11:01 tf girl 阅读(332) 评论(0) 推荐(0) 编辑

2014年8月26日 #

POJ 2356 (抽屉原理)

摘要: 题目中说:随便输出一组。抽屉原理可以求出取出的数连续的情况。#include #includeusing namespace std;int a[10005],s[10005];int n,start,end,ok = 0;int main(){ while(scanf("%d",&n) !=... 阅读全文

posted @ 2014-08-26 17:20 tf girl 阅读(189) 评论(0) 推荐(0) 编辑

2014年8月11日 #

线段树总结一【转】

摘要: 数据结构:线段树 【转】http://blog.csdn.net/wypblog/article/details/8219727一、线段树基本概念 线段树是一种二叉搜索树,与区间树相似,它将一个区间划分成一些单元区间,每个单元区间对应线段树中的一个叶结点。对于线段树中的每一个非叶子节点[a,b],... 阅读全文

posted @ 2014-08-11 23:43 tf girl 阅读(136) 评论(0) 推荐(0) 编辑

训练赛(1---5)D

摘要: 一、题目DescriptionSometimes you have to try fighting even though you know that your enemy is very powerful than you. Your hero with initial health H is a... 阅读全文

posted @ 2014-08-11 17:10 tf girl 阅读(148) 评论(0) 推荐(0) 编辑

训练赛(1---5)A

摘要: 一、题目DescriptionTo get to the treasure,Jonesmust complete one more task. He comes across a table, where there are a number of wooden planks lying along... 阅读全文

posted @ 2014-08-11 16:37 tf girl 阅读(125) 评论(0) 推荐(0) 编辑

2014年8月8日 #

HDU1556 【树状数组】(改段求点)

摘要: #include#include#include#define maxn 100050using namespace std;int b[maxn];int n;int lowbit(int x){ return x&(-x);}void ADD(int x, int c) //向下查询... 阅读全文

posted @ 2014-08-08 16:13 tf girl 阅读(136) 评论(0) 推荐(0) 编辑