随笔分类 - OJ-HDU
摘要:比赛记录 @byf水题写错一发,边界没考虑,变量还写错,一发罚时加很晚才过。1004忘记结构体重载运算符中的gcd也带一个log,TLE2发,而且这题花了太多时间。 @shl exkmp板子想不起来,先用后缀数组T了一发 @lfw 一上场用kmp写exkmp的题,结果发现不太对,有点冲动了,应该能推
阅读全文
摘要:题解 A AND Minimum Spanning Tree 参考代码: #include<bits/stdc++.h> #define maxl 200010 using namespace std; int n,ans1; int mi[31]; int ans[maxl]; inline vo
阅读全文
摘要:题解 1001 Azshara's deep sea Unsolved. 1002 Blow up the city. 题解:倒着建图,然后将原图出度为零的点用一个新节点连接起来,支配树板题。 参考代码: #include<bits/stdc++.h> using namespace std; #d
阅读全文
摘要:比赛总结 @辣鸡lfw,一开始算三角形那题没想到正解使用莫队乱搞,然后要选出50个最大的时候还用莫队。。。主席树区间第k大什么的完全忘记了 题解 1001 Another Chess Problem unsolved 1002 Beauty Of Unimodal Sequence unsolved
阅读全文
摘要:Mr. Frog has an integer sequence of length n, which can be denoted as a1,a2,⋯,ana1,a2,⋯,anThere are m queries. In the i-th query, you are given two in
阅读全文
摘要:总结: 数据范围问题(int / long long ) 题意问题 try a try. 1e4dinic冲冲冲 不要看到过的人暂时比较少就不敢写,@byf 比赛不要划水聊天 题解: A Blank 题意:题目意思是让你去找一个有n个数的数组,这个数组里面的数只有{0,1,2,3}。然后给你m个条件
阅读全文
摘要:部分题解后面更行 A Equivalent Prefixes 题解:https://blog.csdn.net/liufengwei1/article/details/96515809 参考代码: #include<bits/stdc++.h> #define maxl 100010 using n
阅读全文
摘要:There is a skyscraping tree standing on the playground of Nanjing University of Science and Technology. On each branch of the tree is an integer (The
阅读全文
摘要:#define xhxj (Xin Hang senior sister(学姐)) If you do not know xhxj, then carefully reading the entire description is very important. As the strongest f
阅读全文
摘要:Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by
阅读全文
摘要:Adam and Eve enter this year’s ACM International Collegiate Programming Contest. Last night, they played the Calendar Game, in celebration of this con
阅读全文
摘要:任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的: F(1)=1; F(2)=2; F(n)=F(n-1)+F(n-2)(n>=3); 所以,1,2,3,5,8,13……就是菲波那契数列。 在HDOJ上有不少相关的题目,比如1005 Fibonacci
阅读全文
摘要:Stan and Ollie play the game of multiplication by multiplying an integer p by one of the numbers 2 to 9. Stan always starts with p = 1, does his multi
阅读全文
摘要:Little John is playing very funny game with his younger brother. There is one big box filled with M&Ms of different colors. At first John has to eat s
阅读全文
摘要:Arthur and his sister Caroll have been playing a game called Nim for some time now. Nim is played as follows: The starting position has a number of he
阅读全文
摘要:Two people face two piles of stones and make a game. They take turns to take stones. As game rules, there are two different methods of taking stones:
阅读全文
摘要:Let's consider m apples divided into n groups. Each group contains no more than 100 apples, arranged in a line. You can take any number of consecutive
阅读全文
摘要:大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此。当然,作为在考场浸润了十几载的当代大学生,Kiki和Cici更懂得考前的放松,所谓“张弛有道”就是这个意思。这不,Kiki和Cici在每天晚上休息之前都要玩一会儿扑克牌
阅读全文
摘要:十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(game)专题;所以,大家现在玩的也是“
阅读全文
摘要:Once in a forest, there lived N aggressive monkeys. At the beginning, they each does things in its own way and none of them knows each other. But monk
阅读全文