随笔分类 -  竞赛

上一页 1 2 3 4 5 6 ··· 8 下一页
摘要:题目链接: "HDU 1205" Problem Description HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖 阅读全文
posted @ 2019-11-05 22:50 wuli涛涛 阅读(214) 评论(0) 推荐(0)
摘要:题目链接: "HDU 1028" Problem Description "Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says. "Th 阅读全文
posted @ 2019-11-04 21:09 wuli涛涛 阅读(241) 评论(0) 推荐(0)
摘要:题目链接: "HDU 3746" Sample Input Sample Output Author possessor WC Source "HDU 3rd “Vegetable Birds Cup” Programming Open Contest" Solution 题意 给定一个字符串,问至 阅读全文
posted @ 2019-11-03 22:36 wuli涛涛 阅读(168) 评论(0) 推荐(0)
摘要:题目链接: "HDU 2087" Problem Description 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input 输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见A 阅读全文
posted @ 2019-11-01 18:10 wuli涛涛 阅读(188) 评论(0) 推荐(0)
摘要:题目链接: "HDU 2899" Problem Description Now, here is a fuction: F(x) = 6x^7+8x^6+7x^3+5x^2 yx (0 Can you find the minimum value when x is between 0 and 1 阅读全文
posted @ 2019-10-31 23:10 wuli涛涛 阅读(260) 评论(0) 推荐(0)
摘要:题目链接: "HDU 1686" Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a m 阅读全文
posted @ 2019-10-30 22:26 wuli涛涛 阅读(150) 评论(0) 推荐(0)
摘要:题目链接: "HDU 1711" Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 The first line of in 阅读全文
posted @ 2019-10-29 21:32 wuli涛涛 阅读(225) 评论(0) 推荐(0)
摘要:题意 给定一个三角形和一个点 $p$,如果该点不在三角形边上直接输出 $ 1$,否则在三角形上找一点 $q$,使得线段 $pq$ 平分三角形面积。 思路 看完题想都没想直接二分了。 就是比赛时复制粘贴的时候改错了,贡献了三发罚时。 板子来自 kuangbin 的模板。 赛后发现直接推也可以,也不用写 阅读全文
posted @ 2019-10-28 22:19 wuli涛涛 阅读(1817) 评论(0) 推荐(0)
摘要:题意 王子想要娶公主,但是需要完成一个挑战:在一些房间中找出公主在哪。 每个房间有一个人,他们彼此知道谁在哪个房间。可以问他们三种问题: 你是谁? 在某个房间是谁? 公主在哪个房间? 有三类人,一类一定说真话,一类一定说假话,一类可能说真话可能说假话。 王子知道这三类人的人数分别为 $a$, $b$ 阅读全文
posted @ 2019-10-27 21:59 wuli涛涛 阅读(1800) 评论(0) 推荐(0)
摘要:所谓对拍,就是随机生成数据,然后用一个肯定正确的暴力算法的程序,去测试一个要提交的程序。 由于比赛中一般使用 Linux 系统,所以本篇博客的代码都是 Linux 下的程序代码。 ~~其实最简单的方式是写脚本。~~ 这里介绍的是用选手最熟悉的 C++ 语言写对拍程序。 假设要提交的程序为 sol.c 阅读全文
posted @ 2019-10-26 20:57 wuli涛涛 阅读(451) 评论(0) 推荐(0)
摘要:ACM ICPC 现场赛不同的赛站可能比赛环境不同,不过一般都是 Ubuntu 系统。附带的软件可能略有不同,可能会有使用习惯的差异导致效率下降或者无法运行代码,但是在终端下编译运行代码都是相同的。本篇博客介绍的是在终端下如何编辑代码、编译代码、运行代码以及调试代码。 编辑代码 当然是 vim 神器 阅读全文
posted @ 2019-10-25 23:41 wuli涛涛 阅读(3188) 评论(0) 推荐(0)
摘要:题目链接: "HDU 5572" Problem Description On an infinite smooth table, there's a big round fixed cylinder and a little ball whose volume can be ignored. Cu 阅读全文
posted @ 2019-10-24 22:48 wuli涛涛 阅读(299) 评论(0) 推荐(0)
摘要:题目链接: "HDU 1724" Problem Description Math is important!! Many students failed in 2+2’s mathematical test, so let's AC this problem to mourn for our lo 阅读全文
posted @ 2019-10-23 22:58 wuli涛涛 阅读(193) 评论(0) 推荐(0)
摘要:题目链接: "LightOJ 1248" Description Given a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its f 阅读全文
posted @ 2019-10-21 21:51 wuli涛涛 阅读(182) 评论(0) 推荐(0)
摘要:"Codeforces Round 228 (Div. 1)" 题目链接: "C. Fox and Card Game" Fox Ciel is playing a card game with her friend Fox Jiro. There are n piles of cards on t 阅读全文
posted @ 2019-10-20 21:54 wuli涛涛 阅读(269) 评论(0) 推荐(0)
摘要:题目链接: "POJ 2254" Description As a member of an ACM programming team you'll soon find yourself always traveling around the world: Zürich, Philadelphia, 阅读全文
posted @ 2019-10-19 22:09 wuli涛涛 阅读(269) 评论(0) 推荐(0)
摘要:题目链接: "HDU 1875" Problem Description 相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRu 阅读全文
posted @ 2019-10-18 23:03 wuli涛涛 阅读(140) 评论(0) 推荐(0)
摘要:题目链接: "POJ 1066" Description Archeologists from the Antiquities and Curios Museum (ACM) have flown to Egypt to examine the great pyramid of Key Ops. U 阅读全文
posted @ 2019-10-17 20:06 wuli涛涛 阅读(160) 评论(0) 推荐(0)
摘要:题目链接: "1058. 挤模具" 题意 给出模具的底和体积,求模具的高。 思路 模具的底为多边形,因此求出多边形面积,用体积除以底的面积就是答案。 多边形的面积求解见 "EOJ 1127. 多边形面积(计算几何)" 代码 cpp include include include include in 阅读全文
posted @ 2019-10-16 22:52 wuli涛涛 阅读(112) 评论(0) 推荐(0)
摘要:题目链接: "1127. 多边形面积(计算几何)" 题意 按逆时针顺序给出 $n$ 个点的坐标,求这些点围成的多边形的面积。 思路 选择多边形上的一个点,然后每次枚举之后的两个点,计算叉积,注意要保留符号,对所有的叉积的结果相加就是多边形的面积。 举个栗子: 计算上图多边形 $ABCDEFGH$ 的 阅读全文
posted @ 2019-10-16 22:51 wuli涛涛 阅读(283) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 8 下一页