DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar i
原创
2023-02-17 15:12:02
49阅读
Radar InstallationTime Limit : 2000/1000ms (Java/Other)Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 22Accepted Submission(s) : 9Probl...
转载
2015-07-31 16:48:00
126阅读
2评论
POJ1328 Radar Installation 【贪心·区间选点】
转载
2017-04-24 20:02:00
102阅读
2评论
Radar Installation
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 54798
Accepted: 12352
Description
Assume the coasting is an infinite straight line. Land is in one side of
转载
2016-03-16 08:43:00
231阅读
2评论
1193 - Radar InstallationTime limit: 3.000 secondshttp://uva.onlinejudge.org/index.php?option=onlinejudge&page=show_problem&problem=3634http://poj.org/problem?id=1328Assume the coasting
原创
2023-04-12 05:58:06
115阅读
Radar InstallationTime Limit:1000MS Memory Limit:10000K Total Submissions:124432 Accepted:27503 DescriptionAssume the coasting is an infinite straight line. Land is in one ...
原创
2023-02-07 11:40:15
73阅读
题目:题解:贪心,根据右端点排序#include <bits/stdc++.h>using namespace std;struct node { long long a,b;}p[100005];bool
原创
2022-11-07 14:37:41
54阅读
DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting,
原创
2022-12-07 14:12:51
46阅读
传送门题目大意就是
原创
2023-05-26 14:55:17
83阅读
1 2 //坐标精度是int 3 /* 4 圆心位于 5 */ 6 #include <iostream> 7 #include <cstdlib> 8 #include <cstring> 9 #include <cmath>10 using namespace std; 11 12 const int N = 1005;13 typedef struct Part 14 {15 int a, b;16 };17 Part q[N];18 19 typedef struct Node 20 {21 int left, right;22 };23
转载
2013-04-13 23:22:00
57阅读
2评论
1 /* 2 先按右端点由小到大排序,相等的话左端点由大到小(否则会少算) 3 */ 4 #include <iostream> 5 #include <cstdlib> 6 #include <cstring> 7 using namespace std; 8 9 const int N = 10000;10 /**下面的不会用 11 typedef struct Node 12 {13 int a, b;14 bool operator < (const Node &node) const//此时使用sort排序 15 {16 return
转载
2013-04-13 20:28:00
31阅读
2评论
主要的思路就是将这个题目转换一下去求。题目上面说,雷达只会在x轴上面,那么我们就可以去算一下大致的几种情况:第一种,雷达全面覆盖的到。那么转换一下思路。第二种,存在几个特殊的,比较高的位置,雷达无法覆盖,就是雷达最高为m,但是他的位置高度超过了
原创
2022-03-10 16:10:28
19阅读
主要的思路就是将这个题目转换一下去求。题目上面说,雷达只会在x轴上面,那么我们就可以去算一下大致的几种情况:第一种,雷达全面覆盖的到。那么转换一下思路。第二种,存在几个特殊的,比较高的位置,雷达无法覆盖,就是雷达最高为m,但是他的位置高度超过了m,所以直接输出-1.思路就是我们可以把每一个点转换一下,看成一个圆,去思考一下。如果点可以被覆盖的到,那么圆与x轴就会相交或者相切,以半径为雷...
原创
2021-07-13 14:29:10
48阅读
链接:click here~~题意:DescriptionAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any
原创
2022-07-29 21:35:30
77阅读
#include<iostream> #include<cmath> #include<algorithm> using namespace std; int main(){ int n,d,kase=1,r; double p[1005][2],island[1005][2]; while(cin ...
转载
2021-07-27 20:28:00
179阅读
2评论
#include #include #include struct location { double x; double y; bool processed;};struct locationValidXRange { double begin; double end;};bool locationCanR
原创
2023-05-23 15:58:03
30阅读
贪心,区间排序如果区间包含 略过,否则答案+1;Program P1328;var n,d,i,j,k,ans:longint; x:double; tag:boolean; map:array[1..1000,1..2] of double;procedure qsort(l,r:longint);var i,j:longint;
原创
2012-08-16 22:11:26
61阅读
昨天比赛的时候没有做出来,本来是想用贪心的,可是贪了好久都没有招, 今天在网上搜了解题报告~好像说这是一类区间选点问题: 有一个好的做法: (1)首先把题目中的时间全转化为分钟,那么区间就在0-1440中间 (2)对于n组人,有一个si 和一个ei,那么开个数组, cnt[si]+=d; cnt[e
转载
2017-07-03 09:38:00
53阅读
2评论
#include#includeusing namesp
原创
2022-08-30 10:13:05
42阅读
请你在数轴上选择尽量少的点,使得每个区间内至少包含一个选出的点。输出一个整数,表
原创
2023-04-22 07:23:25
63阅读