随笔分类 -  acm

摘要:Day 0 没有直达焦作的飞机,所以选择了先到新郑机场,再转乘城际列车。城际列车猜是专门给学生开通的吧,每天只有来和回一共两趟(所以机票选择的余地也不多)。买的时候只有无座票了,本来以为会一直站着,但上车才发现是只在卖无座票,而新郑机场是首发站,所以随便坐就行了,不用担心要给后上车的人让座位的,买了 阅读全文
posted @ 2018-11-29 20:07 会打表的toby 阅读(981) 评论(1) 推荐(0)
摘要:传送门 Description 作为公司老板的你手下有N个员工,其中有M个特殊员工。现在,你有一个消息需要传递给你的特殊员工。因为你的公司业务非常紧张,所以你和员工之间以及员工之间传递消息会造成损失。因此,你希望只告诉一部分特殊员工,然后依靠员工之间传递消息,使得所有的特殊员工都能获得要传递的消息, 阅读全文
posted @ 2018-11-13 23:07 会打表的toby 阅读(306) 评论(0) 推荐(0)
摘要:Day 0 5个小时的火车,坐的昏昏欲睡。桂林站出来没有地铁,而是出租车排成长队依次上车,也算是某种意义上的地铁吧。到了酒店才发现学校那边又给我们换了,又拖着行李找新的酒店,途中路过一家餐馆,所有人都去嗦了一碗米粉——4.5元就能吃三两啊,配菜还有卤肉和叉烧,真心划算。找到酒店之后又出去吃了点东西, 阅读全文
posted @ 2018-11-01 12:00 会打表的toby 阅读(831) 评论(1) 推荐(0)
摘要:Day 0 提前5个小时从学校出发,在登机口坐下时,飞机还有1个多小时起飞。 航班准时起飞,到了南京以后直接坐地铁到学校附近(南京地铁票也太精致了吧)。 因为天已经黑了,就只在学校附近转了一圈就回酒店了。 Day 1 日常迷路。原来南航这么大。原来直升飞机是可以开到学校里面的。原来体育馆和体育中心是 阅读全文
posted @ 2018-10-16 20:34 会打表的toby 阅读(1481) 评论(0) 推荐(1)
摘要:题目链接 题目描述 修修在黑板上画了一些无向连通图,他发现他可以将这些图的结点用两种颜色染色,满足相邻点不同色。 澜澜不服气,在黑板上画了一个三个点的完全图。修修跟澜澜说,这个图我能找到一个简单奇环。 澜澜又在黑板上画了一个n个点m条边的无向连通图。很可惜这不是一道数数题,修修做不出来了。 澜澜非常 阅读全文
posted @ 2018-10-03 22:54 会打表的toby 阅读(327) 评论(0) 推荐(0)
摘要:题目链接 题目描述 有一张无限大的棋盘,你要将马从(0,0)移到(n,m)。 每一步中,如果马在(x,y),你可以将它移动到(x+1,y+2),(x+1,y-2),(x-1,y+2),(x-1,y-2),(x+2,y+1),(x+2,y-1),(x-2,y+1)或(x-2,y-1)。 你需要最小化移 阅读全文
posted @ 2018-10-03 22:02 会打表的toby 阅读(676) 评论(0) 推荐(0)
摘要:题目链接 题目描述 小贝喜欢玩卡牌游戏。某个游戏体系中共有N种卡牌,其中M种是稀有的。小贝每次和电脑对决获胜之后都会有一个抽卡机会,这时系统会随机从N种卡中选择一张给小贝。普通卡可能多次出现,而稀有卡牌不会被重复抽到。小贝希望收集到K种稀有卡牌,她想知道期望需要多少次获胜才能实现这个目标。 输入描述 阅读全文
posted @ 2018-10-02 18:03 会打表的toby 阅读(986) 评论(0) 推荐(1)
摘要:题目链接 题目描述 平衡二叉树,顾名思义就是一棵“平衡”的二叉树。在这道题中,“平衡”的定义为,对于树中任意一个节点,都满足左右子树的高度差不超过 d. 空树的高度定义为0,单个节点的高度为1,其他情况下树的高度定义为根节点左右子树高度最大值 + 1. 一棵在高度上平衡的树,节点数可能不平衡,因此再 阅读全文
posted @ 2018-10-02 17:38 会打表的toby 阅读(226) 评论(0) 推荐(2)
摘要:Problem Statement You are given the ints perimeter and area. Your task is to find a triangle with the following properties: The coordinates of each ve 阅读全文
posted @ 2018-10-01 13:37 会打表的toby 阅读(430) 评论(0) 推荐(0)
摘要:E. Vasya and Good Sequences time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya has a 阅读全文
posted @ 2018-09-27 18:55 会打表的toby 阅读(352) 评论(0) 推荐(2)
摘要:题目链接 Problem Description 《Journey to the West》(also 《Monkey》) is one of the Four Great Classical Novels of Chinese literature. It was written by Wu Ch 阅读全文
posted @ 2018-09-22 22:08 会打表的toby 阅读(415) 评论(0) 推荐(1)
摘要:D. Bicolorings time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a grid, con 阅读全文
posted @ 2018-09-21 11:22 会打表的toby 阅读(992) 评论(6) 推荐(7)
摘要:题目链接 Problem Description You are playing CSGO. There are n Main Weapons and m Secondary Weapons in CSGO. You can only choose one Main Weapon and one S 阅读全文
posted @ 2018-08-23 16:32 会打表的toby 阅读(736) 评论(0) 推荐(0)
摘要:题目链接 Problem Description Multiple query, for each n, you need to get $$$$$$ \sum_{i=1}^{n} \sum_{j=1}^{i-1}{ [gcd(i + j, i - j) = 1]} $$$$$$ Input On 阅读全文
posted @ 2018-08-22 19:37 会打表的toby 阅读(750) 评论(0) 推荐(1)
摘要:E. Inverse Coloring time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a squa 阅读全文
posted @ 2018-08-21 21:37 会打表的toby 阅读(608) 评论(1) 推荐(3)
摘要:题目链接 Problem Description Nash Equilibrium is an important concept in game theory. Rikka and Yuta are playing a simple matrix game. At the beginning of 阅读全文
posted @ 2018-08-20 17:31 会打表的toby 阅读(512) 评论(0) 推荐(1)
摘要:D. Array Restoration time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Initially there was 阅读全文
posted @ 2018-08-18 12:09 会打表的toby 阅读(312) 评论(0) 推荐(0)
摘要:题目链接 Problem Description There is an apple tree in front of Taotao's house. When autumn comes, n apples on the tree ripen, and Taotao will go to pick 阅读全文
posted @ 2018-08-16 19:55 会打表的toby 阅读(400) 评论(0) 推荐(1)
摘要:题目链接 Problem Description A parentheses matrix is a matrix where every element is either '(' or ')'. We define the goodness of a parentheses matrix as 阅读全文
posted @ 2018-08-15 20:39 会打表的toby 阅读(573) 评论(0) 推荐(2)
摘要:题目链接 Problem Description 度度熊正在学习双端队列,他对其翻转和合并产生了很大的兴趣。 初始时有 N 个空的双端队列(编号为 1 到 N ),你要支持度度熊的 Q 次操作。 ①1 u w val 在编号为 u 的队列里加入一个权值为 val 的元素。(w=0 表示加在最前面,w 阅读全文
posted @ 2018-08-11 17:50 会打表的toby 阅读(431) 评论(0) 推荐(0)