• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
HaibaraAi
博客园    首页    新随笔    联系   管理    订阅  订阅
09 2013 档案
ZOJ Goldbach 素数去重(2013 ACM/ICPC Asia Regional Changsha Online G)

摘要:GoldbachTime Limit: 8 Seconds Memory Limit: 32768 KBFancy is learning mathematics recently. He's already mastered the use of multiplication and addition days before, so today he's going to learn prime number.After reading the learning material, he's been asked to complete a simple test. 阅读全文
posted @ 2013-09-27 10:36 HaibaraAi 阅读(96) 评论(0) 推荐(0)
HDU 4738 Caocao's Bridges 桥(2013 ACM/ICPC Asia Regional Chengdu Online 1002)

摘要:彩笔请多指教!转载请注明出处__谢谢!http://www.cnblogs.com/HaibaraAi/articles/3340115.htmlby---HaibaraAi 求认识大神(ˇ^ˇ),目前只会水题- -#~~~!题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4738 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 #define maxn 1001 7 #define INF 0x7fffffff 8 struct Edge{ 9 ... 阅读全文
posted @ 2013-09-26 08:59 HaibaraAi 阅读(156) 评论(0) 推荐(0)
HDU 4739 Zhuge Liang's Mines 预处理排序点(2013 ACM/ICPC Asia Regional Chengdu Online 1003)

摘要:彩笔请多指教!转载请注明出处__谢谢!http://www.cnblogs.com/HaibaraAi/articles/3340109.htmlby---HaibaraAi 求认识大神(ˇ^ˇ),目前只会水题- -#~~~!题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4739 1 #include 2 #include 3 #include 4 using namespace std; 5 #define maxn 101 6 struct point{ 7 int x,y; 8 bool operatorn||val+... 阅读全文
posted @ 2013-09-26 08:51 HaibaraAi 阅读(114) 评论(0) 推荐(0)
HDU 4745 Two Rabbits 单环最长回文子序列(2013 ACM/ICPC Asia Regional Hangzhou Online 1008)

摘要:彩笔请多指教!转载请注明出处__谢谢!http://www.cnblogs.com/HaibaraAi/articles/3340098.htmlby---HaibaraAi 求认识大神(ˇ^ˇ),目前只会水题- -#~~~!题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4745 1 #include 2 #include 3 #include 4 using namespace std; 5 #define maxn 1001 6 int dp[maxn][maxn]; 7 int a[maxn]; 8 int main(){ 9 ... 阅读全文
posted @ 2013-09-26 08:42 HaibaraAi 阅读(80) 评论(0) 推荐(0)
HDU 4747 Mex 维护(2013 ACM/ICPC Asia Regional Hangzhou Online 1010)

摘要:彩笔请多指教!转载请注明出处__谢谢!http://www.cnblogs.com/HaibaraAi/articles/3340092.htmlby---HaibaraAi 求认识大神(ˇ^ˇ),目前只会水题- -#~~~!题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4747 1 #include 2 #include 3 #include 4 using namespace std; 5 #define maxn 200005 6 #define ll __int64 7 int p[maxn]; 8 int mp[maxn]; 9 ... 阅读全文
posted @ 2013-09-26 08:33 HaibaraAi 阅读(101) 评论(0) 推荐(0)
ZOJ Candies 观察分析(2013 ACM/ICPC Asia Regional Changsha Online J)

摘要:CandiesTime Limit: 1 Second Memory Limit: 32768 KBAs we know, the majority of students in the world-class university like candy and game so much. With some candies, the students are playing a guessing game with you.These students are standing in a line. Every student has some candies in the hand. (. 阅读全文
posted @ 2013-09-25 23:59 HaibaraAi 阅读(127) 评论(0) 推荐(0)
练习赛 上课 动态规划

摘要:上课Time Limit : 3000/1000ms (Java/Other)Memory Limit : 65535/65535K (Java/Other)Total Submission(s) : 12Accepted Submission(s) : 5Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description在大二时候,T个专业的C门课程都是一样的。为了鼓励学习兴趣,同一课程同时开课(也就是有T个教室同时上第一门课程),学生可以任选教室听课。为了保证这一点,所有教室同时上第一门课程,然后是同时第二们 阅读全文
posted @ 2013-09-25 18:48 HaibaraAi 阅读(122) 评论(0) 推荐(0)
练习赛 Alice and Bob 博弈论

摘要:Alice and BobTime Limit : 3000/1000ms (Java/Other)Memory Limit : 65535/32768K (Java/Other)Total Submission(s) : 23Accepted Submission(s) : 6Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description二人玩游戏,轮流进行,Alice先行。游戏是这样的,排成一行的N个硬币,有些正面朝上,有些反面朝上。每一次玩家都可以把任意S个连续的硬币翻转(1 2 #include 3. 阅读全文
posted @ 2013-09-25 17:26 HaibaraAi 阅读(218) 评论(0) 推荐(0)
练习赛 又是质数 dfs

摘要:又是质数Time Limit : 3000/1000ms (Java/Other)Memory Limit : 65535/32768K (Java/Other)Total Submission(s) : 74Accepted Submission(s) : 8Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description给定若干质数。输出满足条件的所有整数,这些整数仅能由这些质数的乘积构成(不能使用其他质数)。注意1总是符合规则的,因为它不依赖于任何质数。Input输入包含多组数据。每组数据的第一行是整数N 阅读全文
posted @ 2013-09-25 12:02 HaibaraAi 阅读(132) 评论(0) 推荐(0)
STL 优先队列、队列、栈的使用

摘要:STL 中优先队列的使用方法(priority_queu)基本操作:empty() 如果队列为空返回真pop() 删除对顶元素push() 加入一个元素size() 返回优先队列中拥有的元素个数top() 返回优先队列对顶元素在默认的优先队列中,优先级高的先出队。在默认的int型中先出队的为较大的数。使用方法:头文件:#include声明方式:1、普通方法:priority_queueq;//通过操作,按照元素从大到小的顺序出队2、自定义优先级: structcmp{operatorbool()(intx,inty){return x>y;//x小的优先级高//也可以写成其他方式,如:r 阅读全文
posted @ 2013-09-25 10:13 HaibaraAi 阅读(183) 评论(0) 推荐(0)
练习赛 XOR 优先级队列

摘要:XORTime Limit : 3000/1000ms (Java/Other)Memory Limit : 65535/65535K (Java/Other)Total Submission(s) : 105Accepted Submission(s) : 21Font: Times New Roman | Verdana | GeorgiaFont Size: ← →Problem Description给出Q个指令,指令有两类(1)"insert N",将N插入表L,N是非负整数小于2^31(2)"print", 输出表L中最大的K个元素的XOR和 阅读全文
posted @ 2013-09-25 10:02 HaibaraAi 阅读(126) 评论(0) 推荐(0)
HDU 4751 Divide Groups 2-SAT(2013 ACM/ICPC Asia Regional Nanjing Online 1004)

摘要:彩笔请多指教!转载请注明出处__谢谢!http://www.cnblogs.com/HaibaraAi/articles/3336673.htmlby---HaibaraAi 求认识大神(ˇ^ˇ),目前只会水题- -#~~~!题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4751数据略水(︶︿︶)据说直接dfs更快了 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 #define INF 0x7fffffff 7 #define maxn 105 8... 阅读全文
posted @ 2013-09-24 12:56 HaibaraAi 阅读(106) 评论(0) 推荐(0)
HDU 4749 Parade Show 贪心匹配(2013 ACM/ICPC Asia Regional Nanjing Online 1002)

摘要:彩笔请多指教!转载请注明出处__谢谢!http://www.cnblogs.com/HaibaraAi/articles/3336396.htmlby---HaibaraAi 求认识大神(ˇ^ˇ),目前只会水题- -#~~~!题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4749数据略水(︶︿︶)不写成小于n-m+1就TLE了 1 #include 2 #include 3 #include 4 #define maxn 100005 5 using namespace std; 6 int s[maxn],a[maxn]; 7 int o... 阅读全文
posted @ 2013-09-24 10:28 HaibaraAi 阅读(98) 评论(0) 推荐(0)
HDU 4750 Count The Pairs 并查集+二分+递推(2013 ACM/ICPC Asia Regional Nanjing Online 1003)

摘要:彩笔请多指教!转载请注明出处__谢谢!http://www.cnblogs.com/HaibaraAi/articles/3335612.htmlby---HaibaraAi 求认识大神(ˇ^ˇ),目前只会水题- -#~~~!题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4750 1 #include 2 #include 3 #include 4 using namespace std; 5 #define INF 0x7fffffff 6 #define maxn 10005 7 #define maxm 500005 8 int n,... 阅读全文
posted @ 2013-09-23 20:06 HaibaraAi 阅读(96) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3