Wall
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4671 Accepted Submission(s): 1337
Problem Description
Once upon a tim
原创
2022-09-26 14:37:36
43阅读
Problem Description Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so
转载
2017-08-04 00:38:00
51阅读
2评论
题解:计算凸包周长#include #include #include const int size=1000; using namespace std; struct pint{int x,y;}x[size]; int n,l,ans[size],cnt,sta[size],tail; bool cmp(pint a,pint b){return (a.y1 && !crossleft(x[sta[tail-1]],x[sta[tail-2]],x[i])) tail--; sta[tail++]=i; } for...
转载
2014-04-07 14:16:00
91阅读
2评论
Wall Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4903 Accepted Submission(s): 1419 Problem De
原创
2021-07-21 15:58:05
101阅读
```cpp include include include include using namespace std; const int N=1005; const double eps=1e 8; int T,n,r,w,top; struct dian { double x,y; dian(d
转载
2018-03-03 22:04:00
61阅读
2评论
<题目链接>
题目大意:
给出二维坐标轴上 n 个点,这 n 个点构成了一个城堡,国王想建一堵墙,城墙与城堡之间的距离总不小于一个数 L ,求城墙的最小长度,答案四舍五入.
解题分析:
求出这些点所围成的凸包,然后所围城墙的长度就为 该凸包周长 + 以该距离为半径的圆的周长。具体证明如下:
下面的模板还没有整理好
Graham 凸包
转载
2018-08-04 00:28:00
139阅读
2评论
WallOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King’s castle. The King was so...
转载
2017-04-26 19:03:00
31阅读
WallTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3449 Accepted Submission(s): 987Problem DescriptionOnce upon a time there was
原创
2023-02-17 09:37:01
34阅读
传送门:POJ:点击打开链接HDU:点击打开链接以下是POJ上的题;WallTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 29121Accepted: 9746DescriptionOnce upon a time there wa...
转载
2014-11-11 18:15:00
123阅读
2评论
在二维空间中,凸包可以简单的认为是最小的包含所有点的凸多边形。简单的卷包裹法:寻找运用到了叉积。例
原创
2022-08-09 18:09:27
109阅读
1 import bisect
2 class TweetCounts:
3 def __init__(self):
4 self.records = {}
5
6 def recordTweet(self, tweetName: str, time: int) -> None:
7 if tweetName not in s
转载
2020-02-09 14:27:00
9阅读
WallTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4588 Accepted Submission(s): 1312Problem DescriptionOnce upon a time there wa
原创
2023-04-20 07:01:16
81阅读
【题意】给了n个点,求这n个点的凸包的边长之和再加上一个给定圆的周长!【分析】第一次做凸包问题,通过这个题也了解了凸包是什么,好神奇啊,这里分享一个求凸包的方法的博客,个人认为写得很不错点击打开链接!~~~~【解题思路】直接用求凸模板求最小凸包即可,这里最常用的可能就是上面博客里面提到的Andrew算法了(这里是水平序的)首先=按照x=从小到大排序(如果x相同,按照y排序),删除重复点后得
原创
2022-04-20 10:29:34
54阅读
Aladdin and the Return JourneyTime Limit: 2000msMemory Limit: 32768KBThis problem will be judged onLightOJ. Original ID:134864-bit integer IO format:%...
转载
2015-09-29 10:53:00
53阅读
2评论
http://acm.timus.ru/problem.aspx?space=1&num=1348 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const double eps=1e-10; 7 8 double dcmp(double x){ 9 if(fabs(x)0) return dis(p.x,p.y,b.x,b.y);43 else return (fabs(cross(p1,p2))/dis(a.x,a.y,b.x,b.y));44 }45 46 int mai...
转载
2014-03-18 19:39:00
93阅读
2评论
CF 1348 B.Phoenix and Beauty 题意 给出一个长度为 \(n\) 的序列 \(A\) ,可以在其中填充任意数字 \(a\) ,要求对于任意长度为 \(k\) 的子数组,他们的和相同。 分析 \(\sum_1^k \ = \ \sum_2^{k+1}\) ,所以 \(A_1 ...
转载
2021-09-14 10:42:00
84阅读
2评论
题意:一棵树,有n个点,每个点都有一个权值,有两种操作,0 a b ,问从节点a到节点b路径上所有点权值和,1 a b,把节点a权值改为b。 题解:树链剖分水题。#include <cstdio>#include <cstring>#include <algorithm>using namespace std;const int N = 30005;struct Edge { i
原创
2023-06-29 00:13:54
9阅读
Description 给出由N个正整数组成的数组A,有Q次查询,每个查询包含一个整数K,从数组A中任选K个(K using namespace std; typedef long long ll; const int N=200005,M=100003; int a[N],f[20][N],P[2
转载
2018-04-13 20:01:00
188阅读
2评论
题意:第一天有一个细胞质量为 111 ,每一天白天细胞可以发生分裂,晚上细胞质量增加
原创
2023-02-03 09:54:03
38阅读
kkk 个一个循环放置即可。AC代码;const int N = 2e5 + 10;int n, k;int a[N], ans[N];map<int, bs = 0; mp.clear()...
原创
2023-02-03 09:54:11
560阅读