Loading [MathJax]/jax/element/mml/optable/GeneralPunctuation.js

10 2019 档案

摘要:题目链接: "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涛涛 阅读(242) 评论(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涛涛 阅读(146) 评论(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涛涛 阅读(215) 评论(0) 推荐(0) 编辑
摘要:题意 给定一个三角形和一个点 p,如果该点不在三角形边上直接输出 1,否则在三角形上找一点 q,使得线段 pq 平分三角形面积。 思路 看完题想都没想直接二分了。 就是比赛时复制粘贴的时候改错了,贡献了三发罚时。 板子来自 kuangbin 的模板。 赛后发现直接推也可以,也不用写 阅读全文
posted @ 2019-10-28 22:19 wuli涛涛 阅读(1804) 评论(0) 推荐(0) 编辑
摘要:题意 王子想要娶公主,但是需要完成一个挑战:在一些房间中找出公主在哪。 每个房间有一个人,他们彼此知道谁在哪个房间。可以问他们三种问题: 你是谁? 在某个房间是谁? 公主在哪个房间? 有三类人,一类一定说真话,一类一定说假话,一类可能说真话可能说假话。 王子知道这三类人的人数分别为 a, b 阅读全文
posted @ 2019-10-27 21:59 wuli涛涛 阅读(1776) 评论(0) 推荐(0) 编辑
摘要:所谓对拍,就是随机生成数据,然后用一个肯定正确的暴力算法的程序,去测试一个要提交的程序。 由于比赛中一般使用 Linux 系统,所以本篇博客的代码都是 Linux 下的程序代码。 ~~其实最简单的方式是写脚本。~~ 这里介绍的是用选手最熟悉的 C++ 语言写对拍程序。 假设要提交的程序为 sol.c 阅读全文
posted @ 2019-10-26 20:57 wuli涛涛 阅读(415) 评论(0) 推荐(0) 编辑
摘要:ACM ICPC 现场赛不同的赛站可能比赛环境不同,不过一般都是 Ubuntu 系统。附带的软件可能略有不同,可能会有使用习惯的差异导致效率下降或者无法运行代码,但是在终端下编译运行代码都是相同的。本篇博客介绍的是在终端下如何编辑代码、编译代码、运行代码以及调试代码。 编辑代码 当然是 vim 神器 阅读全文
posted @ 2019-10-25 23:41 wuli涛涛 阅读(2756) 评论(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涛涛 阅读(283) 评论(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涛涛 阅读(183) 评论(0) 推荐(0) 编辑
摘要:Quartus II 仿真的默认时长是 1us。 设置时钟时看到 End time 想修改时长,把默认的 1us 改成 10us。 然后提示 End time 不合法。(只能设置为 0 到 1us) 正确的做法是在菜单栏选择 Edit End time,然后将 time 设置为 10us 就可以了。 阅读全文
posted @ 2019-10-22 23:29 wuli涛涛 阅读(7836) 评论(0) 推荐(1) 编辑
摘要:题目链接: "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涛涛 阅读(179) 评论(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涛涛 阅读(254) 评论(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涛涛 阅读(258) 评论(0) 推荐(0) 编辑
摘要:题目链接: "HDU 1875" Problem Description 相信大家都听说一个“百岛湖”的地方吧,百岛湖的居民生活在不同的小岛中,当他们想去其他的小岛时都要通过划小船来实现。现在政府决定大力发展百岛湖,发展首先要解决的问题当然是交通问题,政府决定实现百岛湖的全畅通!经过考察小组RPRu 阅读全文
posted @ 2019-10-18 23:03 wuli涛涛 阅读(134) 评论(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涛涛 阅读(155) 评论(0) 推荐(0) 编辑
摘要:题目链接: "1058. 挤模具" 题意 给出模具的底和体积,求模具的高。 思路 模具的底为多边形,因此求出多边形面积,用体积除以底的面积就是答案。 多边形的面积求解见 "EOJ 1127. 多边形面积(计算几何)" 代码 cpp include include include include in 阅读全文
posted @ 2019-10-16 22:52 wuli涛涛 阅读(110) 评论(0) 推荐(0) 编辑
摘要:题目链接: "1127. 多边形面积(计算几何)" 题意 按逆时针顺序给出 n 个点的坐标,求这些点围成的多边形的面积。 思路 选择多边形上的一个点,然后每次枚举之后的两个点,计算叉积,注意要保留符号,对所有的叉积的结果相加就是多边形的面积。 举个栗子: 计算上图多边形 ABCDEFGH阅读全文
posted @ 2019-10-16 22:51 wuli涛涛 阅读(276) 评论(0) 推荐(0) 编辑
摘要:题目链接: "POJ 1789" Description Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furn 阅读全文
posted @ 2019-10-15 22:21 wuli涛涛 阅读(184) 评论(0) 推荐(0) 编辑
摘要:题目链接: "POJ 1679" Description Given a connected undirected graph, tell if its minimum spanning tree is unique. Definition 1 (Spanning Tree): Consider a 阅读全文
posted @ 2019-10-14 20:50 wuli涛涛 阅读(114) 评论(0) 推荐(0) 编辑
摘要:题目链接: "LightOJ 1030" Description You are in a cave, a long cave! The cave can be represented by a 1×N grid. Each cell of the cave can contain 阅读全文
posted @ 2019-10-13 20:08 wuli涛涛 阅读(136) 评论(0) 推荐(0) 编辑
摘要:题目链接: "LightOJ 1027" Description You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability f 阅读全文
posted @ 2019-10-13 20:07 wuli涛涛 阅读(171) 评论(0) 推荐(0) 编辑
摘要:题目链接: "POJ 3268" Description One cow from each of N farms (1N1000) conveniently numbered 1..N is going to attend the big cow party to be h 阅读全文
posted @ 2019-10-13 20:06 wuli涛涛 阅读(183) 评论(0) 推荐(0) 编辑
摘要:题目链接: "POJ 1797" Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a 阅读全文
posted @ 2019-10-12 23:07 wuli涛涛 阅读(196) 评论(0) 推荐(0) 编辑
摘要:下载安装想要更换的字体,这里以 Fira Code 字体为例。 Fira Code 字体的下载地址:https://github.com/tonsky/FiraCode 下载解压后安装字体,windows 可以选择 ttf 文件夹,安装里面的全部字体。 打开 VSC,点击左下角的图标,选择 Sett 阅读全文
posted @ 2019-10-12 23:05 wuli涛涛 阅读(9996) 评论(0) 推荐(0) 编辑
摘要:题目链接: "POJ 1797" Description Background Hugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a 阅读全文
posted @ 2019-10-12 23:05 wuli涛涛 阅读(221) 评论(0) 推荐(0) 编辑
摘要:题目链接: "POJ 2253" Description Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone 阅读全文
posted @ 2019-10-11 23:00 wuli涛涛 阅读(219) 评论(0) 推荐(0) 编辑
摘要:题目链接: "POJ 2387" Description Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes he 阅读全文
posted @ 2019-10-11 22:59 wuli涛涛 阅读(172) 评论(0) 推荐(0) 编辑
摘要:题意 给定两个字符串 AB,求 BA 中的出现次数。 思路 这是一道 KMP 的模板题。 不过 Hash 是个好东西,可以用 Hash 代替 KMP 算法。 预处理两个字符串的哈希值,然后将 A 中所有长度为 len(B) 的子串的哈希值与 B 阅读全文
posted @ 2019-10-10 23:03 wuli涛涛 阅读(388) 评论(0) 推荐(0) 编辑
摘要:比赛链接: "Codeforces Round 589 (Div. 2)" 官方题解: "Codeforces Round 589 (Div. 2) Editorial" A. Distinct Digits 题意 给定两个整数 lr,求一个 x 满足 $l \le x \le r 阅读全文
posted @ 2019-10-09 22:37 wuli涛涛 阅读(187) 评论(0) 推荐(0) 编辑
摘要:题目链接: "P3455 [POI2007]ZAP Queries" 题意 给定 a,b,d,求 ax=1by=1[gcd(x,y)=d]。 思路 莫比乌斯函数的一个性质: [x=1]=d|xμ(d) 设 $ 阅读全文
posted @ 2019-10-08 22:03 wuli涛涛 阅读(133) 评论(0) 推荐(0) 编辑
摘要:题目链接: "HDU 1847" Problem Description 大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是如此。当然,作为在考场浸润了十几载的当代大学生,Kiki和Cici更懂得考前的放松,所谓“张弛有道” 阅读全文
posted @ 2019-10-07 22:33 wuli涛涛 阅读(156) 评论(0) 推荐(0) 编辑
摘要:"Codeforces Round 574 (Div. 2)" 题目链接: "E. OpenStreetMap" Seryozha conducts a course dedicated to building a map of heights of Stepanovo recreation cen 阅读全文
posted @ 2019-10-06 22:29 wuli涛涛 阅读(187) 评论(0) 推荐(0) 编辑
摘要:题目链接: "Kattis largesttriangle" Description Given N points on a 2 dimensional space, determine the area of the largest triangle that can be formed 阅读全文
posted @ 2019-10-05 22:33 wuli涛涛 阅读(655) 评论(0) 推荐(0) 编辑
摘要:题目链接: "P1742 最小圆覆盖" 题意 给出 N 个点,求最小的包含所有点的圆。 思路 随机增量 最小圆覆盖一般有两种做法:随机增量和模拟退火。随机增量的精确度更高,这里介绍随机增量的做法。 先将所有点随机打乱。 令前 i1 个点的最小覆盖圆为圆 O,加入第 i 个点。 如果第 阅读全文
posted @ 2019-10-04 23:10 wuli涛涛 阅读(189) 评论(0) 推荐(0) 编辑
摘要:题目链接: "POJ 2001" Description A prefix of a string is a substring starting at the beginning of the given string. The prefixes of "carbon" are: "c", "ca 阅读全文
posted @ 2019-10-03 23:34 wuli涛涛 阅读(184) 评论(0) 推荐(0) 编辑
摘要:官方文档好像 GG 了。 rope 不属于标准 STL,属于扩展 STL,来自 pb_ds 库 (Policy Based Data Structures)。 基本操作: rope 内部是块状链表实现的,黑科技是支持 O(1) 复制,而且不会空间爆炸 (rope 是平衡树,拷贝时只拷贝根节点就行 阅读全文
posted @ 2019-10-02 23:09 wuli涛涛 阅读(1315) 评论(0) 推荐(0) 编辑
摘要:"Codeforces Round 320 (Div. 1) [Bayan Thanks Round]" 题目链接: "B. "Or" Game" You are given n numbers a_1, a_2, ..., a_n. You can perform at most k 阅读全文
posted @ 2019-10-01 23:25 wuli涛涛 阅读(253) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示