摘要: D. Magic Gems time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output Reziba has many magic gems阅读全文
posted @ 2019-02-20 20:22 SongHL 阅读(5) 评论(0) 编辑
摘要: A. Best Subsegment time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given array a1阅读全文
posted @ 2019-02-20 12:54 SongHL 阅读(2) 评论(0) 编辑
摘要: Rimi learned a new thing about integers, which is - any positive integer greater than 1 can be divided by its divisors. So, he is now playing with thi阅读全文
posted @ 2019-02-18 22:04 SongHL 阅读(6) 评论(0) 编辑
摘要: #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阅读全文
posted @ 2019-02-18 21:51 SongHL 阅读(3) 评论(0) 编辑
摘要: 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 阅读全文
posted @ 2019-02-18 21:35 SongHL 阅读(3) 评论(0) 编辑
摘要: Treblecross is a two player game where the goal is to get three X in a row on a one-dimensional board. At the start of the game all cells in the board阅读全文
posted @ 2019-02-17 09:26 SongHL 阅读(6) 评论(0) 编辑
摘要: Chinese people think of '8' as the lucky digit. Bob also likes digit '8'. Moreover, Bob has his own lucky number L. Now he wants to construct his luck阅读全文
posted @ 2019-02-16 19:13 SongHL 阅读(4) 评论(0) 编辑
摘要: Alice and Bob are playing a strange game. The rules of the game are: Now you are given the number of cells in each of the piles, you have to find the 阅读全文
posted @ 2019-02-16 18:59 SongHL 阅读(6) 评论(0) 编辑
摘要: Alice and Bob are playing game of Misère Nim. Misère Nim is a game playing on k piles of stones, each pile containing one or more stones. The players 阅读全文
posted @ 2019-02-16 18:56 SongHL 阅读(6) 评论(0) 编辑
摘要: You are given an n x n chess board. Only pawn is used in the 'Incredible Chess' and they can move forward or backward. In each column there are two pa阅读全文
posted @ 2019-02-16 18:52 SongHL 阅读(5) 评论(0) 编辑
摘要: Jolly and Emily are two bees studying in Computer Science. Unlike other bees they are fond of playing two-player games. They used to play Tic-tac-toe,阅读全文
posted @ 2019-02-16 18:44 SongHL 阅读(6) 评论(0) 编辑
摘要: Adam and Eve enter this year’s ACM International Collegiate Programming Contest. Last night, they played the Calendar Game, in celebration of this con阅读全文
posted @ 2019-01-28 19:44 SongHL 阅读(9) 评论(0) 编辑
摘要: 任何一个大学生对菲波那契数列(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阅读全文
posted @ 2019-01-28 19:42 SongHL 阅读(9) 评论(0) 编辑
摘要: 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阅读全文
posted @ 2019-01-28 19:39 SongHL 阅读(3) 评论(0) 编辑
摘要: 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阅读全文
posted @ 2019-01-28 19:37 SongHL 阅读(4) 评论(0) 编辑
摘要: 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阅读全文
posted @ 2019-01-28 19:35 SongHL 阅读(4) 评论(0) 编辑
摘要: 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: 阅读全文
posted @ 2019-01-28 19:32 SongHL 阅读(6) 评论(0) 编辑
摘要: 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阅读全文
posted @ 2019-01-28 19:28 SongHL 阅读(5) 评论(0) 编辑
摘要: 大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此。当然,作为在考场浸润了十几载的当代大学生,Kiki和Cici更懂得考前的放松,所谓“张弛有道”就是这个意思。这不,Kiki和Cici在每天晚上休息之前都要玩一会儿扑克牌阅读全文
posted @ 2019-01-28 19:26 SongHL 阅读(4) 评论(0) 编辑
摘要: 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫《勇敢者的游戏》(英文名称:Zathura),一直到现在,我依然对于电影中的部分电脑特技印象深刻。 今天,大家选择上机考试,就是一种勇敢(brave)的选择;这个短学期,我们讲的是博弈(game)专题;所以,大家现在玩的也是“阅读全文
posted @ 2019-01-28 19:24 SongHL 阅读(3) 评论(0) 编辑
摘要: 题解:最大流板题;增加两个源点,一个汇点。第一个源点到第二个源点连边,权为K,然后第一个源点再连其他点(英雄点)边权各为1,然后英雄和怪物之间按照所给连边(边权为1)。 每个怪物连终点,边权为1; 参考代码: 1 #include<bits/stdc++.h> 2 using namespace s阅读全文
posted @ 2019-01-28 19:17 SongHL 阅读(6) 评论(0) 编辑
摘要: 新的技术正冲击着手机通讯市场,对于各大运营商来说,这既是机遇,更是挑战。THU集团旗下的CS&T通讯公司在新一代通讯技术血战的前夜,需要做太多的准备工作,仅就站址选择一项,就需要完成前期市场研究、站址勘测、最优化等项目。在前期市场调查和站址勘测之后,公司得到了一共N个可以作为通讯信号中转站的地址,而阅读全文
posted @ 2019-01-28 19:07 SongHL 阅读(5) 评论(0) 编辑
摘要: 小w来到百度之星的赛场上,准备开始实现一个777真钱老虎机自动分析系统。 这个777真钱老虎机接受一些形如 xi=xj 或 xi≠xj 的相等/不等约束条件作为输入,判定是否可以通过给每个 w 赋适当的值,来满足这些条件。 输入包含多组数据。 然而粗心的小w不幸地把每组数据之间的分隔符删掉了。 他只知道每组数据都是不可满足阅读全文
posted @ 2019-01-28 19:00 SongHL 阅读(3) 评论(0) 编辑
摘要: java中大数以及高精度常用函数 使用java大数类解决问题时我们需要注意两个方面:1、不能有包名,也就是说我们要把主类放到默认的包里,如果你的代码里出现形如package cn.gov.test;这样的代码你很有可能会收获到RE 2、提交的类的类名必须为Main,如果是其他的名字你有可能收获到CE阅读全文
posted @ 2019-01-27 14:57 SongHL 阅读(59) 评论(0) 编辑
摘要: You are given a tree with N nodes which are numbered by integers 1..N. Each node is associated with an integer as the weight. Your task is to deal wit阅读全文
posted @ 2019-01-24 14:26 SongHL 阅读(3) 评论(0) 编辑
https://fq.wc.lt//up/1504690030.png 博聚网