随笔 - 1659  文章 - 0  评论 - 100  阅读 - 188万
02 2018 档案
HDU 1754 I Hate It(线段树)
摘要:I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Sub... 阅读全文
posted @ 2018-02-28 18:45 蔡军帅 阅读(103) 评论(0) 推荐(0) 编辑
HDU 1754 I Hate It(线段树)
摘要:I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 89455 Accepted Submission(s): 34142 Pro 阅读全文
posted @ 2018-02-28 18:45 蔡军帅 阅读(125) 评论(0) 推荐(0) 编辑
HDU 1166 敌兵布阵 (线段树模版题)
摘要:敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submissio... 阅读全文
posted @ 2018-02-28 16:41 蔡军帅 阅读(108) 评论(0) 推荐(0) 编辑
HDU 1166 敌兵布阵 (线段树模版题)
摘要:敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 107484 Accepted Submission(s): 45175 Problem 阅读全文
posted @ 2018-02-28 16:41 蔡军帅 阅读(136) 评论(0) 推荐(0) 编辑
Tree Recovery
摘要:链接:https://www.nowcoder.com/acm/contest/77/H来源:牛客网 Tree Recovery Tree Recovery 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %l 阅读全文
posted @ 2018-02-26 20:27 蔡军帅 阅读(157) 评论(0) 推荐(0) 编辑
情人节的电灯泡(二维树状数组)
摘要:题目描述情人节到了,小芳和小明手牵手,打算过一个完美的情人节,但是小刚偏偏也来了,当了一个明晃晃的电灯泡,小明很尴尬,就和小刚说,我交给你个任务,你完成了我俩就带你玩,否则你就回家吧。小刚很有当单身狗的觉... 阅读全文
posted @ 2018-02-26 20:17 蔡军帅 阅读(114) 评论(0) 推荐(0) 编辑
情人节的电灯泡(二维树状数组)
摘要:题目描述 情人节到了,小芳和小明手牵手,打算过一个完美的情人节,但是小刚偏偏也来了,当了一个明晃晃的电灯泡,小明很尴尬,就和小刚说,我交给你个任务,你完成了我俩就带你玩,否则你就回家吧。小刚很有当单身狗的觉悟,他坚决不想让小明过好情人节,同为单身狗的你能帮帮他吗?现在有一个n×n(1 <= n <= 阅读全文
posted @ 2018-02-26 20:17 蔡军帅 阅读(384) 评论(1) 推荐(1) 编辑
集合问题(并查集)
摘要:链接:https://www.nowcoder.com/acm/contest/77/D来源:牛客网集合问题 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言5242... 阅读全文
posted @ 2018-02-26 20:04 蔡军帅 阅读(227) 评论(0) 推荐(0) 编辑
集合问题(并查集)
摘要:链接:https://www.nowcoder.com/acm/contest/77/D来源:牛客网 集合问题 集合问题 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 给你a,b和n个数p 阅读全文
posted @ 2018-02-26 20:04 蔡军帅 阅读(226) 评论(1) 推荐(0) 编辑
逆序对(树状数组)
摘要:链接:https://www.nowcoder.com/acm/contest/77/A来源:牛客网逆序数 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 131072K,其他语言26214... 阅读全文
posted @ 2018-02-26 19:25 蔡军帅 阅读(132) 评论(0) 推荐(0) 编辑
逆序对(树状数组)
摘要:链接:https://www.nowcoder.com/acm/contest/77/A来源:牛客网 逆序数 逆序数 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 在一个排列中,如果一对数 阅读全文
posted @ 2018-02-26 19:25 蔡军帅 阅读(212) 评论(0) 推荐(0) 编辑
HDU 1166 敌兵布阵(树状数组)
摘要:敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submissio... 阅读全文
posted @ 2018-02-25 21:21 蔡军帅 阅读(72) 评论(0) 推荐(0) 编辑
HDU 1166 敌兵布阵(树状数组)
摘要:敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 107289 Accepted Submission(s): 45092 Problem 阅读全文
posted @ 2018-02-25 21:21 蔡军帅 阅读(126) 评论(0) 推荐(0) 编辑
逆序数
摘要:链接:https://www.nowcoder.com/acm/contest/77/A来源:牛客网逆序数 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 131072K,其他语言26214... 阅读全文
posted @ 2018-02-25 19:36 蔡军帅 阅读(249) 评论(0) 推荐(0) 编辑
逆序数
摘要:链接:https://www.nowcoder.com/acm/contest/77/A来源:牛客网 逆序数 逆序数 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 在一个排列中,如果一对数 阅读全文
posted @ 2018-02-25 19:36 蔡军帅 阅读(465) 评论(0) 推荐(0) 编辑
字符串的问题(substr,find用法)
摘要:链接:https://www.nowcoder.com/acm/contest/77/C来源:牛客网字符串的问题 时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言52... 阅读全文
posted @ 2018-02-25 19:16 蔡军帅 阅读(223) 评论(0) 推荐(0) 编辑
字符串的问题(substr,find用法)
摘要:链接:https://www.nowcoder.com/acm/contest/77/C来源:牛客网 字符串的问题 字符串的问题 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 有一个字符串 阅读全文
posted @ 2018-02-25 19:16 蔡军帅 阅读(1099) 评论(0) 推荐(0) 编辑
Big Water Problem
摘要:链接:https://www.nowcoder.com/acm/contest/77/B来源:牛客网Big Water Problem时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131... 阅读全文
posted @ 2018-02-25 18:14 蔡军帅 阅读(194) 评论(0) 推荐(0) 编辑
Big Water Problem
摘要:链接:https://www.nowcoder.com/acm/contest/77/B来源:牛客网 Big Water Problem Big Water Problem 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Fo 阅读全文
posted @ 2018-02-25 18:14 蔡军帅 阅读(170) 评论(0) 推荐(0) 编辑
POJ 2549 Sumsets(折半枚举+二分)
摘要:SumsetsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11946 Accepted: 3299DescriptionGiven ... 阅读全文
posted @ 2018-02-24 14:27 蔡军帅 阅读(125) 评论(0) 推荐(0) 编辑
POJ 2549 Sumsets(折半枚举+二分)
摘要:Sumsets Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11946 Accepted: 3299 Description Given S, a set of integers, find the largest d suc 阅读全文
posted @ 2018-02-24 14:27 蔡军帅 阅读(402) 评论(0) 推荐(0) 编辑
STL算法与树结构模板
摘要:STL算法STL 算法是一些模板函数,提供了相当多的有用算法和操作,从简单如for_each(遍历)到复杂如stable_sort(稳定排序),头文件是:#include 。常用STL 算法库包括:sor... 阅读全文
posted @ 2018-02-24 13:53 蔡军帅 阅读(322) 评论(0) 推荐(0) 编辑
STL算法与树结构模板
摘要:STL算法 STL 算法是一些模板函数,提供了相当多的有用算法和操作,从简单如for_each(遍历)到复杂如stable_sort(稳定排序),头文件是:#include <algorithm>。常用STL 算法库包括:sort快速排序算法、二分查找算法、枚举排列算法等。 1、 sort排序系列 阅读全文
posted @ 2018-02-24 13:53 蔡军帅 阅读(185) 评论(0) 推荐(0) 编辑
poj 3977 Subset(折半枚举+二进制枚举+二分)
摘要:SubsetTime Limit: 30000MS Memory Limit: 65536KTotal Submissions: 5721 Accepted: 1083DescriptionGiven a... 阅读全文
posted @ 2018-02-24 13:42 蔡军帅 阅读(115) 评论(0) 推荐(0) 编辑
poj 3977 Subset(折半枚举+二进制枚举+二分)
摘要:Subset Time Limit: 30000MS Memory Limit: 65536K Total Submissions: 5721 Accepted: 1083 Description Given a list of N integers with absolute values no 阅读全文
posted @ 2018-02-24 13:42 蔡军帅 阅读(181) 评论(0) 推荐(0) 编辑
POJ 2785 4 Values whose Sum is 0(折半枚举+二分)
摘要:4 Values whose Sum is 0Time Limit: 15000MS Memory Limit: 228000KTotal Submissions: 25675 Accepted: 772... 阅读全文
posted @ 2018-02-23 15:38 蔡军帅 阅读(98) 评论(0) 推荐(0) 编辑
POJ 2785 4 Values whose Sum is 0(折半枚举+二分)
摘要:4 Values whose Sum is 0 Time Limit: 15000MS Memory Limit: 228000K Total Submissions: 25675 Accepted: 7722 Case Time Limit: 5000MS Description The SUM 阅读全文
posted @ 2018-02-23 15:38 蔡军帅 阅读(202) 评论(0) 推荐(0) 编辑
POJ 2674 Linear world(弹性碰撞)
摘要:Linear worldTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 4426 Accepted: 1006DescriptionTh... 阅读全文
posted @ 2018-02-23 15:02 蔡军帅 阅读(100) 评论(0) 推荐(0) 编辑
POJ 2674 Linear world(弹性碰撞)
摘要:Linear world Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 4426 Accepted: 1006 Description The Disc, being flat, has no real horizon. Any 阅读全文
posted @ 2018-02-23 15:02 蔡军帅 阅读(187) 评论(0) 推荐(0) 编辑
POJ 3684 Physics Experiment(弹性碰撞)
摘要:Physics ExperimentTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2936 Accepted: 1045 Specia... 阅读全文
posted @ 2018-02-23 12:21 蔡军帅 阅读(119) 评论(0) 推荐(0) 编辑
POJ 3684 Physics Experiment(弹性碰撞)
摘要:Physics Experiment Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 2936 Accepted: 1045 Special Judge Description Simon is doing a physics e 阅读全文
posted @ 2018-02-23 12:21 蔡军帅 阅读(246) 评论(0) 推荐(0) 编辑
POJ 1222 EXTENDED LIGHTS OUT(反转)
摘要:EXTENDED LIGHTS OUTTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12616 Accepted: 8002Descr... 阅读全文
posted @ 2018-02-23 11:03 蔡军帅 阅读(104) 评论(0) 推荐(0) 编辑
POJ 1222 EXTENDED LIGHTS OUT(反转)
摘要:EXTENDED LIGHTS OUT Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 12616 Accepted: 8002 Description In an extended version of the game Lig 阅读全文
posted @ 2018-02-23 11:03 蔡军帅 阅读(273) 评论(0) 推荐(0) 编辑
POJ 3185 The Water Bowls(反转)
摘要:The Water BowlsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7292 Accepted: 2887Descriptio... 阅读全文
posted @ 2018-02-22 16:41 蔡军帅 阅读(98) 评论(0) 推荐(0) 编辑
POJ 3185 The Water Bowls(反转)
摘要:The Water Bowls Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7292 Accepted: 2887 Description The cows have a line of 20 water bowls from 阅读全文
posted @ 2018-02-22 16:41 蔡军帅 阅读(158) 评论(0) 推荐(0) 编辑
POJ 3279 Fliptile(反转 +二进制枚举)
摘要:FliptileTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 13631 Accepted: 5027DescriptionFarme... 阅读全文
posted @ 2018-02-22 16:01 蔡军帅 阅读(101) 评论(0) 推荐(0) 编辑
POJ 3279 Fliptile(反转 +二进制枚举)
摘要:Fliptile Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 13631 Accepted: 5027 Description Farmer John knows that an intellectually satisfie 阅读全文
posted @ 2018-02-22 16:01 蔡军帅 阅读(208) 评论(0) 推荐(0) 编辑
POJ 3276 Face The Right Way(反转)
摘要:Face The Right WayTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 6038 Accepted: 2791Descr... 阅读全文
posted @ 2018-02-22 14:02 蔡军帅 阅读(104) 评论(0) 推荐(0) 编辑
POJ 3276 Face The Right Way(反转)
摘要:Face The Right Way Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 6038 Accepted: 2791 Description Farmer John has arranged his N (1 ≤ N ≤ 阅读全文
posted @ 2018-02-22 14:02 蔡军帅 阅读(209) 评论(0) 推荐(0) 编辑
POJ 2566 Bound Found(尺取法,前缀和)
摘要:Bound FoundTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 5207 Accepted: 1667 Special Judge... 阅读全文
posted @ 2018-02-21 23:58 蔡军帅 阅读(131) 评论(0) 推荐(0) 编辑
POJ 2566 Bound Found(尺取法,前缀和)
摘要:Bound Found Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 5207 Accepted: 1667 Special Judge Description Signals of most probably extra-te 阅读全文
posted @ 2018-02-21 23:58 蔡军帅 阅读(348) 评论(0) 推荐(0) 编辑
POJ 3320 Jessica's Reading Problem(尺取法)
摘要:Jessica's Reading ProblemTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14734 Accepted: 507... 阅读全文
posted @ 2018-02-21 20:25 蔡军帅 阅读(89) 评论(0) 推荐(0) 编辑
POJ 3320 Jessica's Reading Problem(尺取法)
摘要:Jessica's Reading Problem Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 14734 Accepted: 5073 Description Jessica's a very lovely girl woo 阅读全文
posted @ 2018-02-21 20:25 蔡军帅 阅读(214) 评论(0) 推荐(0) 编辑
POJ 3061 Subsequence(尺取法)
摘要:SubsequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 18145 Accepted: 7751DescriptionA... 阅读全文
posted @ 2018-02-21 19:48 蔡军帅 阅读(91) 评论(0) 推荐(0) 编辑
POJ 3061 Subsequence(尺取法)
摘要:Subsequence Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18145 Accepted: 7751 Description A sequence of N positive integers (10 < N < 10 阅读全文
posted @ 2018-02-21 19:48 蔡军帅 阅读(129) 评论(0) 推荐(0) 编辑
HDU 1222 Wolf and Rabbit(欧几里得)
摘要:Wolf and RabbitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tota... 阅读全文
posted @ 2018-02-21 16:19 蔡军帅 阅读(102) 评论(0) 推荐(0) 编辑
HDU 1222 Wolf and Rabbit(欧几里得)
摘要:Wolf and Rabbit Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9485 Accepted Submission(s): 4857 阅读全文
posted @ 2018-02-21 16:19 蔡军帅 阅读(184) 评论(0) 推荐(0) 编辑
浅析逆元。扩展欧几里得,类欧几里得和莫比乌斯反演
摘要:http://blog.csdn.net/enjoy_pascal/article/details/77417556逆元某些性质随便搞一下逆元的蛋用逆元这东东怎么求way onecodeway twoco... 阅读全文
posted @ 2018-02-21 00:40 蔡军帅 阅读(255) 评论(0) 推荐(0) 编辑
浅析逆元。扩展欧几里得,类欧几里得和莫比乌斯反演
摘要:http://blog.csdn.net/enjoy_pascal/article/details/77417556 逆元 某些性质 随便搞一下 逆元的蛋用 逆元这东东怎么求 way one code way two code way three 递归code 递推code 一笑 扩展欧几里得 先复 阅读全文
posted @ 2018-02-21 00:40 蔡军帅 阅读(228) 评论(0) 推荐(0) 编辑
ZOJ 3609 Modular Inverse(拓展欧几里得求最小逆元)
摘要:Modular InverseTime Limit: 2 Seconds Memory Limit: 65536 KBThe modular modular multiplicative inv... 阅读全文
posted @ 2018-02-19 23:35 蔡军帅 阅读(107) 评论(0) 推荐(0) 编辑
ZOJ 3609 Modular Inverse(拓展欧几里得求最小逆元)
摘要:The modular modular multiplicative inverse of an integer a modulo m is an integer x such that a-1≡x (mod m). This is equivalent to ax≡1 (mod m). Input 阅读全文
posted @ 2018-02-19 23:35 蔡军帅 阅读(275) 评论(0) 推荐(0) 编辑
hdu 1576 A/B(拓展欧几里得)
摘要:A/BTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission... 阅读全文
posted @ 2018-02-19 23:31 蔡军帅 阅读(102) 评论(0) 推荐(0) 编辑
hdu 1576 A/B(拓展欧几里得)
摘要:A/B Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7310 Accepted Submission(s): 5798 Problem Des 阅读全文
posted @ 2018-02-19 23:31 蔡军帅 阅读(161) 评论(0) 推荐(0) 编辑
HDU 2669 Romantic(裸的拓展欧几里得)
摘要:RomanticTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submi... 阅读全文
posted @ 2018-02-19 22:14 蔡军帅 阅读(80) 评论(0) 推荐(0) 编辑
HDU 2669 Romantic(裸的拓展欧几里得)
摘要:Romantic Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8536 Accepted Submission(s): 3638 Proble 阅读全文
posted @ 2018-02-19 22:14 蔡军帅 阅读(296) 评论(0) 推荐(0) 编辑
扩展欧几里德算法详解
摘要:转载自: 扩展欧几里德算法详解 作者:zhj5chengfeng%%%以下为原文 扩展欧几里德算法 谁是欧几里德?自己百度去 先介绍什么叫做欧几里德算法 有两个数 a b,现在,我们要求 a b 的最大公... 阅读全文
posted @ 2018-02-19 21:41 蔡军帅 阅读(212) 评论(0) 推荐(0) 编辑
扩展欧几里德算法详解
摘要:转载自: 扩展欧几里德算法详解 作者:zhj5chengfeng %%% 以下为原文 扩展欧几里德算法 谁是欧几里德?自己百度去 先介绍什么叫做欧几里德算法 有两个数 a b,现在,我们要求 a b 的最大公约数,怎么求?枚举他们的因子?不现实,当 a b 很大的时候,枚举显得那么的naïve ,那 阅读全文
posted @ 2018-02-19 21:41 蔡军帅 阅读(222) 评论(0) 推荐(0) 编辑
ZOJ 3593 One Person Game(拓展欧几里得求最小步数)
摘要:One Person GameTime Limit: 2 Seconds Memory Limit: 65536 KBThere is an interesting and simple one... 阅读全文
posted @ 2018-02-19 21:37 蔡军帅 阅读(104) 评论(0) 推荐(0) 编辑
ZOJ 3593 One Person Game(拓展欧几里得求最小步数)
摘要:There is an interesting and simple one person game. Suppose there is a number axis under your feet. You are at point A at first and your aim is point  阅读全文
posted @ 2018-02-19 21:37 蔡军帅 阅读(245) 评论(0) 推荐(0) 编辑
poj 1930 Dead Fraction(循环小数化分数)
摘要:Dead FractionTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 3478 Accepted: 1162DescriptionM... 阅读全文
posted @ 2018-02-18 21:12 蔡军帅 阅读(140) 评论(0) 推荐(0) 编辑
poj 1930 Dead Fraction(循环小数化分数)
摘要:Dead Fraction Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 3478 Accepted: 1162 Description Mike is frantically scrambling to finish his 阅读全文
posted @ 2018-02-18 21:12 蔡军帅 阅读(227) 评论(0) 推荐(0) 编辑
HDU 1717 小数化分数2(最大公约数)
摘要:小数化分数2Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss... 阅读全文
posted @ 2018-02-18 21:05 蔡军帅 阅读(102) 评论(0) 推荐(0) 编辑
HDU 1717 小数化分数2(最大公约数)
摘要:小数化分数2 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5723 Accepted Submission(s): 2339 Problem 阅读全文
posted @ 2018-02-18 21:05 蔡军帅 阅读(212) 评论(0) 推荐(0) 编辑
C#计数器
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using Syste... 阅读全文
posted @ 2018-02-18 20:10 蔡军帅 阅读(153) 评论(0) 推荐(0) 编辑
C#计数器
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 阅读全文
posted @ 2018-02-18 20:10 蔡军帅 阅读(1031) 评论(0) 推荐(0) 编辑
c#计算器
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System... 阅读全文
posted @ 2018-02-18 20:08 蔡军帅 阅读(161) 评论(0) 推荐(0) 编辑
c#计算器
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Linq; 7 阅读全文
posted @ 2018-02-18 20:08 蔡军帅 阅读(311) 评论(0) 推荐(0) 编辑
HDU 3641 Pseudoprime numbers(快速幂)
摘要:Pseudoprime numbersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 11336 Accepted: 4891Descr... 阅读全文
posted @ 2018-02-18 19:58 蔡军帅 阅读(127) 评论(0) 推荐(0) 编辑
HDU 3641 Pseudoprime numbers(快速幂)
摘要:Pseudoprime numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11336 Accepted: 4891 Description Fermat's theorem states that for any p 阅读全文
posted @ 2018-02-18 19:58 蔡军帅 阅读(159) 评论(0) 推荐(0) 编辑
快速幂
摘要:1 #include 2 #include 3 #include 4 #include 5 #define mod 10000000; 6 using namespace std; 7 typ... 阅读全文
posted @ 2018-02-18 19:31 蔡军帅 阅读(75) 评论(0) 推荐(0) 编辑
快速幂
摘要:1 #include 2 #include 3 #include 4 #include 5 #define mod 10000000; 6 using namespace std; 7 typedef long long ll; 8 int main() 9 { 10 ll x, n; 11 cin >> x >> n; 12 ll ans... 阅读全文
posted @ 2018-02-18 19:31 蔡军帅 阅读(134) 评论(0) 推荐(0) 编辑
POJ 1061 青蛙的约会(拓展欧几里得求同余方程,解ax+by=c)
摘要:青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 122871 Accepted: 26147Description两只青蛙在网... 阅读全文
posted @ 2018-02-18 19:17 蔡军帅 阅读(198) 评论(0) 推荐(0) 编辑
POJ 1061 青蛙的约会(拓展欧几里得求同余方程,解ax+by=c)
摘要:青蛙的约会 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 122871 Accepted: 26147 Description 两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上 阅读全文
posted @ 2018-02-18 19:17 蔡军帅 阅读(196) 评论(0) 推荐(0) 编辑
HDU 4497 GCD and LCM(数论+容斥原理)
摘要:GCD and LCMTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Su... 阅读全文
posted @ 2018-02-18 14:08 蔡军帅 阅读(145) 评论(0) 推荐(0) 编辑
HDU 4497 GCD and LCM(数论+容斥原理)
摘要:GCD and LCM Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 2982 Accepted Submission(s): 1305 Pro 阅读全文
posted @ 2018-02-18 14:08 蔡军帅 阅读(207) 评论(0) 推荐(0) 编辑
HDU 2846 Repository(字典树,每个子串建树,*s的使用)
摘要:RepositoryTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Sub... 阅读全文
posted @ 2018-02-18 12:40 蔡军帅 阅读(111) 评论(0) 推荐(0) 编辑
HDU 2846 Repository(字典树,每个子串建树,*s的使用)
摘要:Repository Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 6444 Accepted Submission(s): 2096 Prob 阅读全文
posted @ 2018-02-18 12:40 蔡军帅 阅读(171) 评论(0) 推荐(0) 编辑
HDU 1251 统计难题(字典树)
摘要:统计难题Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submissi... 阅读全文
posted @ 2018-02-17 23:37 蔡军帅 阅读(123) 评论(0) 推荐(0) 编辑
HDU 1251 统计难题(字典树)
摘要:统计难题 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submission(s): 48444 Accepted Submission(s): 17131 Problem 阅读全文
posted @ 2018-02-17 23:37 蔡军帅 阅读(179) 评论(0) 推荐(0) 编辑
HDU 1671 Phone List(字典树)
摘要:Phone ListTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Sub... 阅读全文
posted @ 2018-02-17 22:46 蔡军帅 阅读(86) 评论(0) 推荐(0) 编辑
HDU 1671 Phone List(字典树)
摘要:Phone List Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22697 Accepted Submission(s): 7684 Pro 阅读全文
posted @ 2018-02-17 22:46 蔡军帅 阅读(177) 评论(0) 推荐(0) 编辑
HDU 1075 What Are You Talking About
摘要:What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K (Ja... 阅读全文
posted @ 2018-02-17 20:49 蔡军帅 阅读(106) 评论(0) 推荐(0) 编辑
HDU 1075 What Are You Talking About
摘要:What Are You Talking About Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 25869 Accepted Subm 阅读全文
posted @ 2018-02-17 20:49 蔡军帅 阅读(217) 评论(0) 推荐(0) 编辑
HDU 1298 T9(字典树+dfs)
摘要:T9Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(... 阅读全文
posted @ 2018-02-16 15:54 蔡军帅 阅读(83) 评论(0) 推荐(0) 编辑
HDU 1298 T9(字典树+dfs)
摘要:T9 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3527 Accepted Submission(s): 1318 Problem Desc 阅读全文
posted @ 2018-02-16 15:54 蔡军帅 阅读(225) 评论(0) 推荐(0) 编辑
HDU 1800 Flying to the Mars
摘要:Flying to the MarsTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)T... 阅读全文
posted @ 2018-02-16 14:03 蔡军帅 阅读(94) 评论(0) 推荐(0) 编辑
HDU 1800 Flying to the Mars
摘要:Flying to the Mars Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 22122 Accepted Submission(s): 阅读全文
posted @ 2018-02-16 14:03 蔡军帅 阅读(240) 评论(0) 推荐(0) 编辑
欧几里德与扩展欧几里德算法
摘要:欧几里德算法欧几里德算法又称辗转相除法,用于计算两个整数a,b的最大公约数。基本算法:设a=qb+r,其中a,b,q,r都是整数,则gcd(a,b)=gcd(b,r),即gcd(a,b)=gcd(b,a%... 阅读全文
posted @ 2018-02-16 01:29 蔡军帅 阅读(150) 评论(0) 推荐(0) 编辑
欧几里德与扩展欧几里德算法
摘要:欧几里德算法 欧几里德算法又称辗转相除法,用于计算两个整数a,b的最大公约数。 基本算法:设a=qb+r,其中a,b,q,r都是整数,则gcd(a,b)=gcd(b,r),即gcd(a,b)=gcd(b,a%b)。 第一种证明: a可以表示成a = kb + r,则r = a mod b 假设d是a 阅读全文
posted @ 2018-02-16 01:29 蔡军帅 阅读(216) 评论(0) 推荐(0) 编辑
hdu1 247 Hat’s Words(字典树)
摘要:Hat’s WordsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Su... 阅读全文
posted @ 2018-02-15 22:11 蔡军帅 阅读(115) 评论(0) 推荐(0) 编辑
hdu1 247 Hat’s Words(字典树)
摘要:Hat’s Words Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16970 Accepted Submission(s): 6098 Pr 阅读全文
posted @ 2018-02-15 22:11 蔡军帅 阅读(139) 评论(0) 推荐(0) 编辑
HDU 2516 取石子游戏(斐波那契)
摘要:取石子游戏Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissi... 阅读全文
posted @ 2018-02-14 16:49 蔡军帅 阅读(120) 评论(0) 推荐(0) 编辑
HDU 2516 取石子游戏(斐波那契)
摘要:取石子游戏 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6555 Accepted Submission(s): 3961 Problem D 阅读全文
posted @ 2018-02-14 16:49 蔡军帅 阅读(143) 评论(0) 推荐(0) 编辑
HDU 4586 Play the Dice(数学期望)
摘要:Play the DiceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total ... 阅读全文
posted @ 2018-02-14 16:21 蔡军帅 阅读(147) 评论(0) 推荐(0) 编辑
HDU 4586 Play the Dice(数学期望)
摘要:Play the Dice Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 3648 Accepted Submission(s): 1181Sp 阅读全文
posted @ 2018-02-14 16:21 蔡军帅 阅读(188) 评论(0) 推荐(0) 编辑
HDU 4762 Cut the Cake(高精度)
摘要:Cut the CakeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total S... 阅读全文
posted @ 2018-02-14 15:45 蔡军帅 阅读(129) 评论(0) 推荐(0) 编辑
HDU 4762 Cut the Cake(高精度)
摘要:Cut the Cake Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1657 Accepted Submission(s): 806 Pro 阅读全文
posted @ 2018-02-14 15:45 蔡军帅 阅读(111) 评论(0) 推荐(0) 编辑
HDU 4438 Hunters
摘要:HuntersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis... 阅读全文
posted @ 2018-02-14 15:35 蔡军帅 阅读(151) 评论(0) 推荐(0) 编辑
HDU 4438 Hunters
摘要:Hunters Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1735 Accepted Submission(s): 1308 Problem 阅读全文
posted @ 2018-02-14 15:35 蔡军帅 阅读(245) 评论(0) 推荐(0) 编辑
HDU 2201 熊猫阿波的故事
摘要:熊猫阿波的故事Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submis... 阅读全文
posted @ 2018-02-14 14:50 蔡军帅 阅读(121) 评论(0) 推荐(0) 编辑
HDU 2201 熊猫阿波的故事
摘要:熊猫阿波的故事 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7693 Accepted Submission(s): 5826 Problem 阅读全文
posted @ 2018-02-14 14:50 蔡军帅 阅读(221) 评论(0) 推荐(0) 编辑
链表基本操作的实现
摘要:1 #include 2 #include 3 #define LEN sizeof(struct student) 4 5 /*----------------数据定义--------... 阅读全文
posted @ 2018-02-14 14:41 蔡军帅 阅读(116) 评论(0) 推荐(0) 编辑
链表基本操作的实现
摘要:1 #include 2 #include 3 #define LEN sizeof(struct student) 4 5 /*----------------数据定义----------------------*/ 6 7 //定义一个学生信息的结构体,包括学号,姓名和结构体类型的指针 8 struct student 9 { 10 ... 阅读全文
posted @ 2018-02-14 14:41 蔡军帅 阅读(253) 评论(0) 推荐(0) 编辑
zufeoj 1018 阶乘第k位是多少(sprintf)
摘要:题目描述 n的阶乘定义为n!=1*2*3*……*n 如3!=6 n!通常最后会有很多0,如5!=120 最后有一个0,现在统计n!去除末尾的0后,最后k位是多少输入 第一行包括两个... 阅读全文
posted @ 2018-02-14 13:56 蔡军帅 阅读(126) 评论(0) 推荐(0) 编辑
zufeoj 1018 阶乘第k位是多少(sprintf)
摘要:题目描述 n的阶乘定义为n!=1*2*3*……*n 如3!=6 n!通常最后会有很多0,如5!=120 最后有一个0,现在统计n!去除末尾的0后,最后k位是多少 输入 第一行包括两个数n,k 输出 如果n!不止k位,则输出最后k位,如果不足k位,则将剩下的全部输出 样例输入 样例输出 提示 7!为5 阅读全文
posted @ 2018-02-14 13:56 蔡军帅 阅读(239) 评论(0) 推荐(0) 编辑
HDU 1710 Binary Tree Traversals(树的建立,前序中序后序)
摘要:Binary Tree TraversalsTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Othe... 阅读全文
posted @ 2018-02-14 13:51 蔡军帅 阅读(97) 评论(0) 推荐(0) 编辑
HDU 1710 Binary Tree Traversals(树的建立,前序中序后序)
摘要:Binary Tree Traversals Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9283 Accepted Submission(s 阅读全文
posted @ 2018-02-14 13:51 蔡军帅 阅读(298) 评论(0) 推荐(0) 编辑
HDU 3179 二叉搜索树(树的建立)
摘要:二叉搜索树Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissi... 阅读全文
posted @ 2018-02-14 13:01 蔡军帅 阅读(77) 评论(0) 推荐(0) 编辑
HDU 3179 二叉搜索树(树的建立)
摘要:二叉搜索树 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 6293 Accepted Submission(s): 2820 Problem D 阅读全文
posted @ 2018-02-14 13:01 蔡军帅 阅读(160) 评论(0) 推荐(0) 编辑
HDU 2199
摘要:Can you solve this equation?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Jav... 阅读全文
posted @ 2018-02-13 15:26 蔡军帅 阅读(78) 评论(0) 推荐(0) 编辑
HDU 2199
摘要:Can you solve this equation? Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23060 Accepted Submi 阅读全文
posted @ 2018-02-13 15:26 蔡军帅 阅读(143) 评论(0) 推荐(0) 编辑
HDU 2141 Can you find it?(二分)
摘要:Can you find it?Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/10000 K (Java/Others)To... 阅读全文
posted @ 2018-02-13 14:53 蔡军帅 阅读(88) 评论(0) 推荐(0) 编辑
HDU 2141 Can you find it?(二分)
摘要:Can you find it? Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 35836 Accepted Submission(s): 8 阅读全文
posted @ 2018-02-13 14:53 蔡军帅 阅读(133) 评论(0) 推荐(0) 编辑
HDU 3068 最长回文(manachar算法)
摘要:最长回文Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissio... 阅读全文
posted @ 2018-02-13 14:32 蔡军帅 阅读(88) 评论(0) 推荐(0) 编辑
HDU 3068 最长回文(manachar算法)
摘要:最长回文 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25811 Accepted Submission(s): 9525 Problem D 阅读全文
posted @ 2018-02-13 14:32 蔡军帅 阅读(201) 评论(0) 推荐(0) 编辑
HDU 3336 Count the string(KMP+DP)
摘要:Count the stringTime Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total ... 阅读全文
posted @ 2018-02-13 12:46 蔡军帅 阅读(91) 评论(0) 推荐(0) 编辑
HDU 3336 Count the string(KMP+DP)
摘要:Count the string Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description It is well known that AekdyCoin is good at string proble 阅读全文
posted @ 2018-02-13 12:46 蔡军帅 阅读(159) 评论(0) 推荐(0) 编辑
HDU 2087 剪花布条
摘要:剪花布条Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submissio... 阅读全文
posted @ 2018-02-13 11:41 蔡军帅 阅读(98) 评论(0) 推荐(0) 编辑
HDU 2087 剪花布条
摘要:剪花布条 Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 24909 Accepted Submission(s): 15362 Problem 阅读全文
posted @ 2018-02-13 11:41 蔡军帅 阅读(145) 评论(0) 推荐(0) 编辑
HDU 1358 Period (kmp判断循环子串)
摘要:PeriodTime Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission... 阅读全文
posted @ 2018-02-13 11:24 蔡军帅 阅读(116) 评论(0) 推荐(0) 编辑
HDU 1358 Period (kmp判断循环子串)
摘要:Period Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description For each prefix of a given string S with N characters (each charac 阅读全文
posted @ 2018-02-13 11:24 蔡军帅 阅读(387) 评论(0) 推荐(0) 编辑
HDU 3746 Cyclic Nacklace (用kmp求循环节)
摘要:Cyclic NacklaceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Tota... 阅读全文
posted @ 2018-02-12 20:53 蔡军帅 阅读(85) 评论(0) 推荐(0) 编辑
HDU 3746 Cyclic Nacklace (用kmp求循环节)
摘要:Cyclic Nacklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11516 Accepted Submission(s): 491 阅读全文
posted @ 2018-02-12 20:53 蔡军帅 阅读(157) 评论(0) 推荐(0) 编辑
HDU 1686 Oulipo(优化的KMP)
摘要:OulipoTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss... 阅读全文
posted @ 2018-02-12 20:09 蔡军帅 阅读(107) 评论(0) 推荐(0) 编辑
HDU 1686 Oulipo(优化的KMP)
摘要:Oulipo Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17441 Accepted Submission(s): 6938 Problem 阅读全文
posted @ 2018-02-12 20:09 蔡军帅 阅读(191) 评论(0) 推荐(0) 编辑
KMP算法解释
摘要:给定两个字符串A,B,判断T是否为S的子串(变式:寻找子串B在串A中的位置)。 要求一个O(|A|+|B|)的做法。 通常称A为目标串(或主串),B为模式串。 算法过程: 我们假设串A的长度为n,串B的长... 阅读全文
posted @ 2018-02-12 17:17 蔡军帅 阅读(142) 评论(0) 推荐(0) 编辑
KMP算法解释
摘要:给定两个字符串A,B,判断T是否为S的子串(变式:寻找子串B在串A中的位置)。 要求一个O(|A|+|B|)的做法。 通常称A为目标串(或主串),B为模式串。 算法过程: 我们假设串A的长度为n,串B的长度为m,每个字符串的开头下标默认为1。 定义两个变量i和j,这两个变量共同表示:A[i-j+1~ 阅读全文
posted @ 2018-02-12 17:17 蔡军帅 阅读(153) 评论(0) 推荐(0) 编辑
1711 Number Sequence(kmp)
摘要:Number SequenceTime Limit : 10000/5000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total ... 阅读全文
posted @ 2018-02-12 16:03 蔡军帅 阅读(89) 评论(0) 推荐(0) 编辑
1711 Number Sequence(kmp)
摘要:Number Sequence Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N 阅读全文
posted @ 2018-02-12 16:03 蔡军帅 阅读(194) 评论(0) 推荐(0) 编辑
POJ 2395 Out of Hay(求最小生成树的最长边+kruskal)
摘要:Out of HayTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 18472 Accepted: 7318DescriptionThe... 阅读全文
posted @ 2018-02-12 14:42 蔡军帅 阅读(103) 评论(0) 推荐(0) 编辑
POJ 2395 Out of Hay(求最小生成树的最长边+kruskal)
摘要:Out of Hay Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 18472 Accepted: 7318 Description The cows have run out of hay, a horrible event 阅读全文
posted @ 2018-02-12 14:42 蔡军帅 阅读(158) 评论(0) 推荐(0) 编辑
poj 2377 Bad Cowtractors (最大生成树prim)
摘要:Bad CowtractorsTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total ... 阅读全文
posted @ 2018-02-12 14:33 蔡军帅 阅读(98) 评论(0) 推荐(0) 编辑
poj 2377 Bad Cowtractors (最大生成树prim)
摘要:Bad Cowtractors Problem Description Bessie has been hired to build a cheap internet network among Farmer John's N (2 <= N <= 1,000) barns that are con 阅读全文
posted @ 2018-02-12 14:33 蔡军帅 阅读(169) 评论(0) 推荐(0) 编辑
POJ 1258 Agri-Net (prim水题)
摘要:Agri-NetTime Limit : 2000/1000ms (Java/Other) Memory Limit : 20000/10000K (Java/Other)Total Submissi... 阅读全文
posted @ 2018-02-12 14:13 蔡军帅 阅读(102) 评论(0) 推荐(0) 编辑
POJ 1258 Agri-Net (prim水题)
摘要:Agri-Net Problem Description Farmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all fa 阅读全文
posted @ 2018-02-12 14:13 蔡军帅 阅读(145) 评论(0) 推荐(0) 编辑
Call to your teacher
摘要:链接:https://www.nowcoder.net/acm/contest/76/F来源:牛客网Call to your teacher 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ ... 阅读全文
posted @ 2018-02-11 21:13 蔡军帅 阅读(203) 评论(0) 推荐(0) 编辑
Call to your teacher
摘要:链接:https://www.nowcoder.net/acm/contest/76/F来源:牛客网 Call to your teacher Call to your teacher 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit I 阅读全文
posted @ 2018-02-11 21:13 蔡军帅 阅读(198) 评论(1) 推荐(0) 编辑
老子的意大利炮呢
摘要:链接:https://www.nowcoder.net/acm/contest/76/G来源:牛客网老子的意大利炮呢 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言6... 阅读全文
posted @ 2018-02-11 21:11 蔡军帅 阅读(91) 评论(0) 推荐(0) 编辑
道路建设
摘要:链接:https://www.nowcoder.net/acm/contest/76/B来源:牛客网道路建设 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 65536K,其他语言13107... 阅读全文
posted @ 2018-02-11 21:11 蔡军帅 阅读(222) 评论(0) 推荐(0) 编辑
老子的意大利炮呢
摘要:链接:https://www.nowcoder.net/acm/contest/76/G来源:牛客网 老子的意大利炮呢 老子的意大利炮呢 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 自攻打过 阅读全文
posted @ 2018-02-11 21:11 蔡军帅 阅读(505) 评论(0) 推荐(0) 编辑
道路建设
摘要:链接:https://www.nowcoder.net/acm/contest/76/B来源:牛客网 道路建设 道路建设 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 65536K,其他语言131072K 64bit IO Format: %lld 题目描述 随着如今社会的不断变化 阅读全文
posted @ 2018-02-11 21:11 蔡军帅 阅读(150) 评论(0) 推荐(0) 编辑
通知小弟
摘要:链接:https://www.nowcoder.net/acm/contest/76/E来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K 64b... 阅读全文
posted @ 2018-02-11 21:06 蔡军帅 阅读(168) 评论(0) 推荐(0) 编辑
通知小弟
摘要:链接:https://www.nowcoder.net/acm/contest/76/E来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C 阅读全文
posted @ 2018-02-11 21:06 蔡军帅 阅读(267) 评论(0) 推荐(0) 编辑
小明的挖矿之旅
摘要:链接:https://www.nowcoder.net/acm/contest/76/D来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K 64b... 阅读全文
posted @ 2018-02-11 21:02 蔡军帅 阅读(154) 评论(0) 推荐(0) 编辑
小明的挖矿之旅
摘要:链接:https://www.nowcoder.net/acm/contest/76/D来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C 阅读全文
posted @ 2018-02-11 21:02 蔡军帅 阅读(171) 评论(0) 推荐(0) 编辑
石油采集
摘要:链接:https://www.nowcoder.net/acm/contest/76/A来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K 64b... 阅读全文
posted @ 2018-02-11 20:59 蔡军帅 阅读(164) 评论(0) 推荐(0) 编辑
石油采集
摘要:链接:https://www.nowcoder.net/acm/contest/76/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C 阅读全文
posted @ 2018-02-11 20:59 蔡军帅 阅读(560) 评论(4) 推荐(0) 编辑
POJ 3268 Silver Cow Party 最短路径+矩阵转换
摘要:Silver Cow PartyTime Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total... 阅读全文
posted @ 2018-02-11 16:55 蔡军帅 阅读(107) 评论(0) 推荐(0) 编辑
POJ 3268 Silver Cow Party 最短路径+矩阵转换
摘要:Silver Cow Party Problem Description One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be 阅读全文
posted @ 2018-02-11 16:55 蔡军帅 阅读(117) 评论(0) 推荐(0) 编辑
求交集
摘要:链接:https://www.nowcoder.net/acm/contest/76/C来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K 64b... 阅读全文
posted @ 2018-02-11 15:38 蔡军帅 阅读(130) 评论(0) 推荐(0) 编辑
求交集
摘要:链接:https://www.nowcoder.net/acm/contest/76/C来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C 阅读全文
posted @ 2018-02-11 15:38 蔡军帅 阅读(224) 评论(0) 推荐(0) 编辑
1到8的全排列
摘要:#include #include #include #includeusing namespace std;int v[10];int a[10];void display(){ int i; ... 阅读全文
posted @ 2018-02-11 14:41 蔡军帅 阅读(190) 评论(0) 推荐(0) 编辑
1到8的全排列
摘要:#include #include #include #include using namespace std; int v[10]; int a[10]; void display() { int i; for (i = 1; i <= 8; i++) { if (i == 8) cout << a[i] << endl; else... 阅读全文
posted @ 2018-02-11 14:41 蔡军帅 阅读(806) 评论(0) 推荐(0) 编辑
HDU 2063 过山车(匈牙利算法)
摘要:过山车Time Limit : 1000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)Total Submission(s)... 阅读全文
posted @ 2018-02-10 19:40 蔡军帅 阅读(104) 评论(0) 推荐(0) 编辑
HDU 2063 过山车(匈牙利算法)
摘要:过山车 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是 阅读全文
posted @ 2018-02-10 19:40 蔡军帅 阅读(207) 评论(0) 推荐(0) 编辑
匈牙利算法(二分图匹配)
摘要:趣写算法系列之--匈牙利算法 http://blog.csdn.net/dark_scope/article/details/88805472013年07月18日 13:39:5971797【书本上的算法... 阅读全文
posted @ 2018-02-10 19:19 蔡军帅 阅读(112) 评论(0) 推荐(0) 编辑
匈牙利算法(二分图匹配)
摘要:趣写算法系列之--匈牙利算法 http://blog.csdn.net/dark_scope/article/details/8880547 2013年07月18日 13:39:59 71797 2013年07月18日 13:39:59 71797 【书本上的算法往往讲得非常复杂,我和我的朋友计划用 阅读全文
posted @ 2018-02-10 19:19 蔡军帅 阅读(265) 评论(0) 推荐(0) 编辑
POJ 2139 Six Degrees of Cowvin Bacon (floyd)
摘要:Six Degrees of Cowvin BaconTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/... 阅读全文
posted @ 2018-02-10 19:11 蔡军帅 阅读(112) 评论(0) 推荐(0) 编辑
POJ 2139 Six Degrees of Cowvin Bacon (floyd)
摘要:Six Degrees of Cowvin Bacon Problem Description The cows have been making movies lately, so they are ready to play a variant of the famous game "Six D 阅读全文
posted @ 2018-02-10 19:11 蔡军帅 阅读(155) 评论(0) 推荐(0) 编辑
POJ 3259 Wormholes (判负环)
摘要:WormholesTime Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submis... 阅读全文
posted @ 2018-02-10 18:41 蔡军帅 阅读(166) 评论(0) 推荐(0) 编辑
POJ 3259 Wormholes (判负环)
摘要:Wormholes Problem Description While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar be 阅读全文
posted @ 2018-02-10 18:41 蔡军帅 阅读(137) 评论(0) 推荐(0) 编辑
poj 3169 Layout
摘要:LayoutTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submissio... 阅读全文
posted @ 2018-02-10 17:51 蔡军帅 阅读(62) 评论(0) 推荐(0) 编辑
poj 3169 Layout
摘要:Layout Problem Description Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows number 阅读全文
posted @ 2018-02-10 17:51 蔡军帅 阅读(156) 评论(0) 推荐(0) 编辑
POJ 3723 Conscription
摘要:ConscriptionTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Sub... 阅读全文
posted @ 2018-02-10 15:07 蔡军帅 阅读(114) 评论(0) 推荐(0) 编辑
POJ 3723 Conscription
摘要:Conscription Problem Description Windy has a country, and he wants to build an army to protect his country. He has picked up N girls and M boys and wa 阅读全文
posted @ 2018-02-10 15:07 蔡军帅 阅读(157) 评论(0) 推荐(0) 编辑
poj 3255 Roadblocks 次短路(两次dijksta)
摘要:RoadblocksTime Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submi... 阅读全文
posted @ 2018-02-10 13:44 蔡军帅 阅读(102) 评论(0) 推荐(0) 编辑
poj 3255 Roadblocks 次短路(两次dijksta)
摘要:Roadblocks Problem Description Bessie has moved to a small farm and sometimes enjoys returning to visit one of her best friends. She does not want to 阅读全文
posted @ 2018-02-10 13:44 蔡军帅 阅读(305) 评论(0) 推荐(0) 编辑
POJ 2184 Cow Exhibition
摘要:Cow ExhibitionTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total S... 阅读全文
posted @ 2018-02-09 21:20 蔡军帅 阅读(112) 评论(0) 推荐(0) 编辑
POJ 2184 Cow Exhibition
摘要:Cow Exhibition Problem Description "Fat and docile, big and dumb, they look so stupid, they aren't much fun..." - Cows with Guns by Dana Lyons The cow 阅读全文
posted @ 2018-02-09 21:20 蔡军帅 阅读(206) 评论(0) 推荐(0) 编辑
POJ 2392 Space Elevator
摘要:Space ElevatorTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total S... 阅读全文
posted @ 2018-02-09 20:07 蔡军帅 阅读(115) 评论(0) 推荐(0) 编辑
POJ 2392 Space Elevator
摘要:Space Elevator Problem Description The cows are going to space! They plan to achieve orbit by building a sort of space elevator: a giant tower of bloc 阅读全文
posted @ 2018-02-09 20:07 蔡军帅 阅读(117) 评论(0) 推荐(0) 编辑
POJ 3666 Making the Grade (线性dp,离散化)
摘要:Making the GradeTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total... 阅读全文
posted @ 2018-02-09 17:19 蔡军帅 阅读(118) 评论(0) 推荐(0) 编辑
POJ 3666 Making the Grade (线性dp,离散化)
摘要:Making the Grade Problem Description A straight dirt road connects two fields on FJ's farm, but it changes elevation more than FJ would like. His cows 阅读全文
posted @ 2018-02-09 17:19 蔡军帅 阅读(250) 评论(0) 推荐(0) 编辑
C++ 什么叫做离散化
摘要:C++ 什么叫做离散化 如果说今年这时候OIBH问得最多的问题是二分图,那么去年这时候问得最多的算是离散化了。对于“什么是离散化”,搜索帖子你会发现有各种说法,比如“排序后处理”、“对坐标的近似处理... 阅读全文
posted @ 2018-02-09 16:35 蔡军帅 阅读(77) 评论(0) 推荐(0) 编辑
C++ 什么叫做离散化
摘要:C++ 什么叫做离散化 如果说今年这时候OIBH问得最多的问题是二分图,那么去年这时候问得最多的算是离散化了。对于“什么是离散化”,搜索帖子你会发现有各种说法,比如“排序后处理”、“对坐标的近似处理”等等。哪个是对的呢?哪个都对。关键在于,这需要一些例子和不少的讲解才能完全解释清楚。 离散化是程序设 阅读全文
posted @ 2018-02-09 16:35 蔡军帅 阅读(1490) 评论(0) 推荐(0) 编辑
HDU 1950 Bridging signals
摘要:Bridging signalsTime Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)To... 阅读全文
posted @ 2018-02-09 16:05 蔡军帅 阅读(97) 评论(0) 推荐(0) 编辑
HDU 1950 Bridging signals
摘要:Bridging signals Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3402 Accepted Submission(s): 214 阅读全文
posted @ 2018-02-09 16:05 蔡军帅 阅读(157) 评论(0) 推荐(0) 编辑
poj 3181 Dollar Dayz
摘要:Dollar DayzTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Subm... 阅读全文
posted @ 2018-02-09 14:59 蔡军帅 阅读(86) 评论(0) 推荐(0) 编辑
poj 3181 Dollar Dayz
摘要:Dollar Dayz Problem Description Farmer John goes to Dollar Days at The Cow Store and discovers an unlimited number of tools on sale. During his first 阅读全文
posted @ 2018-02-09 14:59 蔡军帅 阅读(100) 评论(0) 推荐(0) 编辑
poj 3046 Ant Counting(多重集组合数)
摘要:Ant CountingTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Sub... 阅读全文
posted @ 2018-02-09 13:52 蔡军帅 阅读(131) 评论(0) 推荐(0) 编辑
poj 3046 Ant Counting(多重集组合数)
摘要:Ant Counting Problem Description Bessie was poking around the ant hill one day watching the ants march to and fro while gathering food. She realized t 阅读全文
posted @ 2018-02-09 13:52 蔡军帅 阅读(237) 评论(0) 推荐(0) 编辑
【划分数】系列问题
摘要:【划分数】系列问题 http://www.cnblogs.com/radiumlrb/p/5797168.html 整数划分 --- 一个老生长谈的问题: 1) 练练组合数学能力. ... 阅读全文
posted @ 2018-02-09 12:47 蔡军帅 阅读(124) 评论(0) 推荐(0) 编辑
【划分数】系列问题
摘要:【划分数】系列问题 http://www.cnblogs.com/radiumlrb/p/5797168.html 整数划分 --- 一个老生长谈的问题: 总之是一道经典的不能再经典的题目: 1.将n划分成不大于m的划分法: 2.将n划分成k个数的划分法: 另一种方式: hzwer思路 Orz 拓展 阅读全文
posted @ 2018-02-09 12:47 蔡军帅 阅读(352) 评论(0) 推荐(0) 编辑
POJ 3280 Cheapest Palindrome
摘要:Cheapest PalindromeTime Limit : 4000/2000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)To... 阅读全文
posted @ 2018-02-09 12:28 蔡军帅 阅读(110) 评论(0) 推荐(0) 编辑
POJ 3280 Cheapest Palindrome
摘要:Cheapest Palindrome Problem Description Keeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He ha 阅读全文
posted @ 2018-02-09 12:28 蔡军帅 阅读(168) 评论(0) 推荐(0) 编辑
hdu 1051 Wooden Sticks
摘要:Wooden SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total ... 阅读全文
posted @ 2018-02-09 11:15 蔡军帅 阅读(99) 评论(0) 推荐(0) 编辑
hdu 1051 Wooden Sticks
摘要:Wooden Sticks Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23703 Accepted Submission(s): 9625 阅读全文
posted @ 2018-02-09 11:15 蔡军帅 阅读(119) 评论(0) 推荐(0) 编辑
POJ 3616 Milking Time
摘要:Milking TimeTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Sub... 阅读全文
posted @ 2018-02-08 22:35 蔡军帅 阅读(87) 评论(0) 推荐(0) 编辑
POJ 3616 Milking Time
摘要:Milking Time Problem Description Bessie is such a hard-working cow. In fact, she is so focused on maximizing her productivity that she decides to sche 阅读全文
posted @ 2018-02-08 22:35 蔡军帅 阅读(164) 评论(0) 推荐(0) 编辑
poj 2385 Apple Catching
摘要:Apple CatchingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7108 Accepted: 3469Description... 阅读全文
posted @ 2018-02-08 20:04 蔡军帅 阅读(120) 评论(0) 推荐(0) 编辑
poj 2385 Apple Catching
摘要:Apple Catching Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7108 Accepted: 3469 Description It is a little known fact that cows love app 阅读全文
posted @ 2018-02-08 20:04 蔡军帅 阅读(131) 评论(0) 推荐(0) 编辑
酸碱滴定
摘要:链接:https://www.nowcoder.net/acm/contest/78/H来源:牛客网有时候你会抱怨,什么时候才能到终点。 有时候你会迫不及待,怎么颜色还不改变。 滴定管长场的,我们... 阅读全文
posted @ 2018-02-07 19:19 蔡军帅 阅读(395) 评论(0) 推荐(0) 编辑
酸碱滴定
摘要:链接:https://www.nowcoder.net/acm/contest/78/H来源:牛客网 有时候你会抱怨,什么时候才能到终点。 有时候你会迫不及待,怎么颜色还不改变。 滴定管长场的,我们的路长长的。 用心的放入每一滴,终点就在你手心。 今天小星需要去完成一个酸碱滴定实验。,实验室老师要求 阅读全文
posted @ 2018-02-07 19:19 蔡军帅 阅读(562) 评论(3) 推荐(1) 编辑
合成反应
摘要:链接:https://www.nowcoder.net/acm/contest/78/I来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K 6... 阅读全文
posted @ 2018-02-07 19:09 蔡军帅 阅读(332) 评论(0) 推荐(0) 编辑
合成反应
摘要:链接:https://www.nowcoder.net/acm/contest/78/I来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 时间限制:C/C++ 1秒,其他语言2秒 空间限制 阅读全文
posted @ 2018-02-07 19:09 蔡军帅 阅读(370) 评论(0) 推荐(0) 编辑
poj 2229 Sumsets(dp)
摘要:SumsetsTime Limit : 4000/2000ms (Java/Other) Memory Limit : 400000/200000K (Java/Other)Total Submiss... 阅读全文
posted @ 2018-02-07 11:57 蔡军帅 阅读(69) 评论(0) 推荐(0) 编辑
poj 2229 Sumsets(dp)
摘要:Sumsets Problem Description Farmer John commanded his cows to search for different sets of numbers that sum to a given number. The cows use only numbe 阅读全文
posted @ 2018-02-07 11:57 蔡军帅 阅读(160) 评论(0) 推荐(0) 编辑
POJ 2706 Painter
摘要:PainterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3157 Accepted: 1962 DescriptionThe lo... 阅读全文
posted @ 2018-02-06 22:32 蔡军帅 阅读(74) 评论(0) 推荐(0) 编辑
POJ 2706 Painter
摘要:Painter Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 3157 Accepted: 1962 Description The local toy store sells small fingerpainting kits 阅读全文
posted @ 2018-02-06 22:32 蔡军帅 阅读(113) 评论(0) 推荐(0) 编辑
POJ 1328 Radar Installation
摘要:Radar InstallationTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit S... 阅读全文
posted @ 2018-02-06 20:47 蔡军帅 阅读(76) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

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