04 2018 档案

摘要:传送门:Count Color Description Chosen Problem Solving and Program design as an optional course, you are required to solve all kinds of problems. Here, we 阅读全文 »
posted @ 2018-04-24 19:55 GHzz 阅读(132) 评论(0) 推荐(0) 编辑
摘要:传送门:Color the ball Color the ball Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25511 Accepted 阅读全文 »
posted @ 2018-04-23 21:00 GHzz 阅读(121) 评论(0) 推荐(0) 编辑
摘要:传送门:Just a Hook Problem Description In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is mad 阅读全文 »
posted @ 2018-04-23 20:27 GHzz 阅读(123) 评论(0) 推荐(0) 编辑
摘要:传送门:A Simple Problem with Integers Description You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of opera 阅读全文 »
posted @ 2018-04-23 16:51 GHzz 阅读(128) 评论(0) 推荐(0) 编辑
摘要:传送门:Billboard Billboard Time Limit: 20000/8000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 26278 Accepted Submissio 阅读全文 »
posted @ 2018-04-20 18:51 GHzz 阅读(106) 评论(0) 推荐(0) 编辑
摘要:传送门:zoj 3279 Ants echo is a curious and clever girl, and she is addicted to the ants recently. She knows that the ants are divided into many levels de 阅读全文 »
posted @ 2018-04-19 23:47 GHzz 阅读(120) 评论(0) 推荐(0) 编辑
摘要:题目链接 Problem Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。 Input 本题目包含多 阅读全文 »
posted @ 2018-04-18 22:45 GHzz 阅读(98) 评论(0) 推荐(0) 编辑
摘要:题目链接 Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C 阅读全文 »
posted @ 2018-04-18 20:10 GHzz 阅读(115) 评论(0) 推荐(0) 编辑
摘要:题目链接 Problem Description Senior Pan fails in his discrete math exam again. So he asks Master ZKC to give him graph theory problems everyday.The task i 阅读全文 »
posted @ 2018-04-18 17:26 GHzz 阅读(134) 评论(0) 推荐(0) 编辑
摘要:题目链接 畅通工程,可以用dijkstra算法实现。 听说spfa很好用,来水一发 邻接矩阵实现: 邻接表实现: vector存储: 阅读全文 »
posted @ 2018-04-16 21:17 GHzz 阅读(118) 评论(0) 推荐(0) 编辑
摘要:题目链接 题意:问从A到B中与N互素的个数。 题解: 利用容斥原理:先求出与n互为素数的个数。 可以先将 n 进行素因子分解,然后用区间 x 除以 素因子,就得到了与 n 的 约数是那个素因子的个数,然后每次这样求一遍,但是发现有重 复的:举个例子 [1,10] 区间中与 6 互素的个数,应该是 1 阅读全文 »
posted @ 2018-04-13 21:18 GHzz 阅读(173) 评论(0) 推荐(0) 编辑
摘要:题目链接 题解: 错排公式:d[n] = (n-1)(d[n-1] + d[n-2]); 最近在看组合数学,还没有看到这一部分,只能先搬过来用了。 阅读全文 »
posted @ 2018-04-13 19:37 GHzz 阅读(192) 评论(0) 推荐(0) 编辑
摘要:题目链接 题意: 判断两条直线的关系:相交 平行 重合 代码: 阅读全文 »
posted @ 2018-04-11 20:53 GHzz 阅读(143) 评论(0) 推荐(0) 编辑
摘要:题意: 给你一些玩具,找出有t个玩具的区间个数。 题解: poj2318的简单进阶,区别:隔断无序,需要对这些分段进行排序。然后哈希存具有t个玩具的区间。 代码: 阅读全文 »
posted @ 2018-04-11 19:47 GHzz 阅读(147) 评论(0) 推荐(0) 编辑
摘要:题目链接 Sumdiv Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 25841 Accepted: 6382 Description Consider two natural numbers A and B. Let S be 阅读全文 »
posted @ 2018-04-11 18:58 GHzz 阅读(174) 评论(0) 推荐(0) 编辑
摘要:题目链接 题意: 给定一个矩形,n个线段将矩形分成n+1个区间,m个点,问这些点的分布。 题解: 思路就是叉积加二分,利用叉积判断点与直线的距离,二分搜索区间。 代码: 最近整理了STL的一些模板,发现真是好用啊orz,为啥以前没发现呢,可能是比较懒吧-.- 阅读全文 »
posted @ 2018-04-10 21:41 GHzz 阅读(133) 评论(0) 推荐(0) 编辑
摘要:矢量 如果一条线段的端点是有次序之分的话,那么这种线段就称为 有向线段,如果有向线段p1p2的起点p1在坐标的原点,则可以把它称为矢量 p2 矢量的加减 设二维矢量 P = (x1, y1), Q = (x2, y2),则 P + Q = (x1 + x2, y1 + y2), P - Q = (x 阅读全文 »
posted @ 2018-04-10 20:20 GHzz 阅读(502) 评论(0) 推荐(0) 编辑
摘要:介绍: list容器是一种序列式容器,它是STL实现的双向链表,与vector相比它可以实现快速的插入和删除,但是不能够快速的随机访问。 头文件: #include <list> 构造函数: list() 声明一个空列表; list(n) 声明一个有n个元素的列表,每个元素都是由其默认构造函数T() 阅读全文 »
posted @ 2018-04-08 23:48 GHzz 阅读(208) 评论(0) 推荐(0) 编辑
摘要:题目链接 题意: 题意简单,就是一个简单的数据结构,对栈的模拟操作,可用链表实现,也可以用C++的模板类来实现,但是要注意不能用cin cout,卡时间!!! 代码: 阅读全文 »
posted @ 2018-04-08 21:10 GHzz 阅读(154) 评论(0) 推荐(0) 编辑
摘要:题目链接:The 18th Zhejiang University Programming Contest Sponsored by TuSimple - G Traffic Light 题解: 题意自己翻译,此题首先肯定是要广搜的,不过要开一个1e5*1e5的数组好像有点困难, 所以用结构体来存每 阅读全文 »
posted @ 2018-04-07 18:52 GHzz 阅读(239) 评论(0) 推荐(0) 编辑
摘要:题意: 从左上角跳到右下角最少需要多少步,跳的规则为:可以向四个方向的任意一个方向跳当前格子中的步数,若跳不到右下角输出IMPOSSIBLE。 题解: BFS搜索,注意判断边界,标记。 代码: 阅读全文 »
posted @ 2018-04-05 20:11 GHzz 阅读(152) 评论(0) 推荐(0) 编辑
摘要:题目: Now that you’ve come to Florida and taken up surfing, you love it! Of course, you’ve realized that if you take a particular wave, even if it’s ver 阅读全文 »
posted @ 2018-04-05 19:41 GHzz 阅读(163) 评论(0) 推荐(0) 编辑

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