摘要: Natasha's favourite numbers are 𝑛n and 11, and Sasha's favourite numbers are 𝑚m and −1−1. One day Natasha and Sasha met and wrote down every possibl 阅读全文
posted @ 2019-09-05 16:44 hit_yjl 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 1020: [SHOI2008]安全的航线flight Description 在设计航线的时候,安全是一个很重要的问题。首先,最重要的是应采取一切措施确保飞行不会发生任何事故,但同时也需要做好最坏的打算,一旦事故发生,就要确保乘客有尽量高的生还几率。当飞机迫降到海上的时候,最近的陆地就是一个关键的 阅读全文
posted @ 2019-03-21 10:47 hit_yjl 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 题意:在简单多边形内找个最长线段 思路:最长线段至少经过两个顶点,枚举两个顶点形成的直线与多边形的交点,找到包含这两个端点的在多边形内最长连续段即可。 判断子段是否在多边形内只需判断中点是否在多边形内即可。复杂度O(n4),但跑不满,因而水过了。 代码: 1 #include <iostream> 阅读全文
posted @ 2019-03-13 12:32 hit_yjl 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 1057: [ZJOI2007]棋盘制作 Description 国际象棋是世界上最古老的博弈游戏之一,和中国的围棋、象棋以及日本的将棋同享盛名。据说国际象棋起源 于易经的思想,棋盘是一个8*8大小的黑白相间的方阵,对应八八六十四卦,黑白对应阴阳。而我们的主人公小Q, 正是国际象棋的狂热爱好者。作为 阅读全文
posted @ 2019-02-04 13:28 hit_yjl 阅读(320) 评论(0) 推荐(0) 编辑
摘要: An addition chain for n is an integer sequence <a0, a1,a2,...,am="">with the following four properties: a0 = 1 am = n a0 < a1 < a2 < ... < am-1 < am F 阅读全文
posted @ 2018-10-21 17:39 hit_yjl 阅读(270) 评论(0) 推荐(0) 编辑
摘要: CIRU - The area of the union of circles no tags no tags You are given N circles and expected to calculate the area of the union of the circles ! Input 阅读全文
posted @ 2018-10-19 10:35 hit_yjl 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 给一个共有n个点的凸多边形,求一条将该多边形划分为面积和周长都相等的两部分的直线。 给一个共有n个点的凸多边形,求一条将该多边形划分为面积和周长都相等的两部分的直线。 Input 第一行一个正整数n,表示多边形的点数。(n <= 40000) 接下来的n行,第i+1行,每行两个实数xi,yi,表示凸 阅读全文
posted @ 2018-10-19 10:32 hit_yjl 阅读(302) 评论(0) 推荐(0) 编辑
摘要: J. Judging the Trick time limit per test 2.0 s memory limit per test 512 MB input standard input output standard output J. Judging the Trick time limi 阅读全文
posted @ 2018-10-08 14:55 hit_yjl 阅读(387) 评论(0) 推荐(0) 编辑
摘要: Run Away Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 10634 Accepted: 3177 Description One of the traps we will encounter in the Pyramid 阅读全文
posted @ 2018-10-02 23:36 hit_yjl 阅读(156) 评论(0) 推荐(0) 编辑
摘要: A Star not a Tree? Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 9298 Accepted: 4022 Description Luke wants to upgrade his home computer 阅读全文
posted @ 2018-10-02 21:58 hit_yjl 阅读(301) 评论(0) 推荐(0) 编辑