A. Case of the Zeros and Ones Description Andrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing zeros and ones. Once he thought about a string of length n consisting of zeroes and ones. Conside…
A. Case of the Zeros and Ones time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Andrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing…
A. Case of the Zeros and Ones Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/556/problem/A Description Andrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing zeros an…
A. Case of the Zeros and Ones time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Andrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing…
题目传送门 /* 找规律/贪心:ans = n - 01匹配的总数,水 */ #include <cstdio> #include <iostream> #include <algorithm> #include <cstring> #include <cmath> using namespace std; ; const int INF = 0x3f3f3f3f; char s[MAXN]; int main(void) //Codeforce…
A. Case of the Zeros and Ones time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Andrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing…
C-C    Radar Installation   解题报告 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=86640#problem/C 题目: Description     Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is…
E - Just a Hook Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u   Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive m…
Facebook Hacker Cup 2014 Qualification Round比赛Square Detector题的解题报告.单击这里打开题目链接(国内访问需要那个,你懂的). 原题如下: Square Detector Problem Description You want to write an image detection system that is able to recognize different geometric shapes. In the first ver…
声明 笔者近期意外的发现 笔者的个人站点http://tiankonguse.com/ 的非常多文章被其他站点转载.可是转载时未声明文章来源或參考自 http://tiankonguse.com/ 站点,因此,笔者加入此条声明. 郑重声明:这篇记录<id=667" target="_blank" style="word-wrap:break-word; word-break:normal; margin:0px; padding:0px; color:rgb(…
ZOJ  1093   Monkey and Banana  (LIS)解题报告 题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87125#problem/B 题目: Description 一组研究人员正在设计一项实验,以测试猴子的智商.他们将挂香蕉在建筑物的屋顶,同时,提供一些砖块给这些猴子.如果猴子足够聪明,它应当能够通过合理的放置一些砖块建立一个塔,并爬上去吃他们最喜欢的香蕉.   研究人员有n种类型的砖块,每种类型…
声明 笔者近期意外的发现 笔者的个人站点http://tiankonguse.com/ 的非常多文章被其他站点转载,可是转载时未声明文章来源或參考自 http://tiankonguse.com/ 站点,因此,笔者加入此条声明. 郑重声明:这篇记录<[百度之星2014~初赛(第二轮)解题报告]JZP Set>转载自 http://tiankonguse.com/ 的这条记录:id=668" target="_blank" style="word-wrap…
官方解题报告:http://bestcoder.hdu.edu.cn/blog/2015-multi-university-training-contest-6-solutions-by-zju/ 表示很难看....orz 1003题      链接:http://acm.hdu.edu.cn/showproblem.php?pid=5355 Cake Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K…
HDU 4303 Hourai Jeweled 解题报告 评测地址: http://acm.hdu.edu.cn/showproblem.php?pid=4303 评测地址: https://xoj.red/contests/view/1155/1 题目描述 Kaguya Houraisan was once a princess of the Lunarians, a race of people living on the Moon. She was exiled to Earth over…
Sort ColorsGiven an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the integers 0, 1, and 2 to represent the color red, wh…
本来按照老师的要求,我学OI的第一份解题报告应是在寒假完成的关于数据结构的基础题,但由于身体原因当时未能完成,那么就在省选赛前临时写几篇吧…… 题目描述 花匠栋栋种了一排花,每株花都有自己的高度.花儿越长越大,也越来越挤.栋栋决定把这排中的一部分花移走,将剩下的留在原地,使得剩下的花能有空间长大,同时,栋栋希望剩下的花排列得比较别致. 具体而言,栋栋的花的高度可以看成一列整数ℎ1, ℎ2, … , ℎn.设当一部分花被移走后,剩下的花的高度依次为g1, g2, … , gm,则栋栋希望下面两个条…
ACM-ICPC 2017 Asia HongKong 解题报告 任意门:https://nanti.jisuanke.com/?kw=ACM-ICPC%202017%20Asia%20HongKong 按AC次序: D - Card collection In an online game, a player can collect different types of power cards. Each power card can enable a player to have a uni…
preface解题报告------------------------------------------------------------------------------------------------------------------------------------------------[题目] 阿拉伯数字转换为罗马数字的规则如下: 1: I 2: II 3: III 4: IV 5: V 6: VI 7: VII 8: VIII 9: IX 10: X 而我们本题可以用到…
namenum解题报告 —— icedream61 博客园(转载请注明出处)------------------------------------------------------------------------------------------------------------------------------------------------[题目] 你有一个手机,键盘如下所示: 2: A,B,C 5: J,K,L 8: T,U,V 3: D,E,F 6: M,N,O 9:…
2016 第七届蓝桥杯 c/c++ B组省赛真题及解题报告 勘误1:第6题第4个 if最后一个条件粗心写错了,答案应为1580. 条件应为abs(a[3]-a[7])!=1,宝宝心理苦啊.!感谢zzh童鞋的提醒. 勘误2:第7题在推断连通的时候条件写错了,后两个if条件中是应该是<=12 落了一个等于号.正确答案应为116. 1.煤球数目 有一堆煤球.堆成三角棱锥形.详细: 第一层放1个, 第二层3个(排列成三角形), 第三层6个(排列成三角形), 第四层10个(排列成三角形). -. 假设一共…
解题报告 之 HDU5288 OO' s Sequence Description OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there's no j(l<=j<=r,j<>i) satisfy a imod a j=0,now OO want to know rev=2.4-beta-2" alt=&…
Turn the pokers Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 108    Accepted Submission(s): 21 Problem Description During summer vacation,Alice stay at home for a long time, with nothing to…
[解题报告] Leapin' Lizards HDU 2732 网络流 题外话 在正式讲这个题目之前我想先说几件事 1. 如果大家要做网络流的题目,我在网上看到一个家伙,他那里列出了一堆网络流的题目,而且还给他们分门别类,并且标注了难度,感觉挺好的,网址是[夏天的风](https://blog.csdn.net/shahdza/article/details/7779537) 2. 这道题有个坑点!!!! 正题 首先,当然是直接贴上[题目](http://acm.hdu.edu.cn/showp…
ZROIDay3-比赛解题报告 瞎扯 从今天开始考试有点不在状态,可能是因为不太适应题目的原因,T1已经接近了思想但是没有想到状态转移,T2思考方向错误,T3不会打LCT,还是太菜了 A 考场上想到要么不用亵渎要么最后用亵渎,如果最后用亵渎就要满足所有随从血量是从1一直到某个数x的不下降连续序列,于是可以状态转移\(f[i][j]\)表示前i小的数变成\([1,j]\)每一个整数的最小代价,那么我们枚举第i-1小的数是j-1还是j就好了.最后对所有\(f[n][i]\)取min就好了.当然还要考…
题干 Bob is very interested in the data structure of a tree. A tree is a directed graph in which a special node is singled out, called the "root" of the tree, and there is a unique path from the root to each of the other nodes. Bob intends to colo…
[九度OJ]题目1433:FatMouse 解题报告 标签(空格分隔): 九度OJ http://ac.jobdu.com/problem.php?pid=1433 题目描述: FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean. The warehouse has N rooms. Th…
[九度OJ]题目1023:EXCEL排序 解题报告 标签(空格分隔): 九度OJ [LeetCode] http://ac.jobdu.com/problem.php?pid=1023 题目描述: Excel可以对一组纪录按任意指定列排序.现请你编写程序实现类似功能. 对每个测试用例,首先输出1行"Case i:",其中 i 是测试用例的编号(从1开始).随后在 N 行中输出按要求排序后的结果,即:当 C=1 时,按学号递增排序:当 C=2时,按姓名的非递减字典序排序:当 C=3时,按…
[九度OJ]题目1445:How Many Tables 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1445 题目描述: Today is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to…
[九度OJ]题目1442:A sequence of numbers 解题报告 标签(空格分隔): 九度OJ 原题地址:http://ac.jobdu.com/problem.php?pid=1442 题目描述: Xinlv wrote some sequences on the paper a long time ago, they might be arithmetic or geometric sequences. The numbers are not very clear now, a…
[九度OJ]题目1475:IP数据包解析 解题报告 标签(空格分隔): 九度OJ http://ac.jobdu.com/problem.php?pid=1475 题目描述: 我们都学习过计算机网络,知道网络层IP协议数据包的头部格式如下: 其中IHL表示IP头的长度,单位是4字节:总长表示整个数据包的长度,单位是1字节. 传输层的TCP协议数据段的头部格式如下: 头部长度单位为4字节. 你的任务是,简要分析输入数据中的若干个TCP数据段的头部. 详细要求请见输入输出部分的说明. 输入: 第一行…