摘要: ```#include#include#include #define Calc(i,j) (f[j-1]-f[i-1])/(a[i].h-a[j].h)using namespace std;const int N=1e5+9;int q[N];double f[N],k[N];struct Land{ int w,h;//结构体排序 inline bool operatorx.h||(h==x... 阅读全文
posted @ 2020-05-07 23:24 晴屿 阅读(82) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include using namespace std; #define int long long const int N=1e6+10,INF=1e9; int n,m; int x[N]; int p[N]; int c[N]; int q[N]; int f[N]; int sump[N];//p[i] int sum[N];//p[i]*x[i] //f[i] 阅读全文
posted @ 2020-05-07 23:05 晴屿 阅读(67) 评论(0) 推荐(0) 编辑
摘要: ```#include#include#include#includeusing namespace std;typedef long long LL;const int maxn = 1e5 + 5;const int inf = 1e6 + 5;int a[maxn],d[maxn];int main(){ int T,n; scanf("%d",&T); for(int cas=1; cas... 阅读全文
posted @ 2020-05-07 16:51 晴屿 阅读(100) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include #include #include using namespace std; typedef long long ll; const ll MOD = 1e9 + 7; const int maxn = 305; int main() { int T; ll n,k; ll t; cin>>T; //拆成连续的数,然后 阅读全文
posted @ 2020-05-07 16:34 晴屿 阅读(115) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include using namespace std; const int N = 500010; int arr[N]; int city,box; bool check(int mid) { int sum = 0; for (int i = 0; i >1; if(check(mid)) r=mid; else l=mid+1 阅读全文
posted @ 2020-05-07 16:24 晴屿 阅读(108) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include using namespace std; typedef long long LL; const int N=1e5+10; int n,ans[N],tr[N],hi[N]; struct node { int h,k,id; } po[N]; int cmp(node a,node b) { return a.h> 阅读全文
posted @ 2020-05-07 16:12 晴屿 阅读(115) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include using namespace std; const double eps=1e-9; const double pie=3.1415926535; int T; double br,tr,H,v; double getV(double h) { double rr=(tr-br)*h/H+br; //相似三角形 re 阅读全文
posted @ 2020-05-07 14:11 晴屿 阅读(63) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include #include using namespace std; typedef long long ll; mapmp1; int cnt; void init() { cnt=2; mp1[1]=2; mp1[2]=7; while(mp1[cnt]>n; int ans=0; while(n>=2) { int l=1 阅读全文
posted @ 2020-05-07 12:33 晴屿 阅读(151) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include #include #define pi acos(-1.0) using namespace std; const int maxn = 10005; int r[maxn]; double v[maxn]; int n,f; bool check(double x) { int cnt = 0; int t = lo 阅读全文
posted @ 2020-05-07 01:20 晴屿 阅读(79) 评论(0) 推荐(0) 编辑
摘要: ```#include#include#include#includeusing namespace std;const int maxx = 50000 + 500;int ll,n,m;int pos[maxx];bool check(int num) //判断当最小距离为num的时候是否要拿走的石头多于M{ int cnt = 0; int last = 0; pos[0] = 0; pos... 阅读全文
posted @ 2020-05-07 01:12 晴屿 阅读(90) 评论(0) 推荐(0) 编辑
摘要: ```#include#include#include#includeusing namespace std;const int maxn = 100000+5;int n,a[maxn],m;bool check(int d){ int cnt=0; for(int i = 0; i =m) return 1; else return 0;}int main(){ while(scan... 阅读全文
posted @ 2020-05-07 00:59 晴屿 阅读(68) 评论(0) 推荐(0) 编辑
摘要: ```#include#include#include#include#includeconst int maxn = 1e5+10;using namespace std;long long k;int n;long long a[maxn];long long ans=0;long long maxt=0;bool check(int mid){ long long hott=0; for(i... 阅读全文
posted @ 2020-05-07 00:48 晴屿 阅读(73) 评论(0) 推荐(0) 编辑
摘要: ``` #include #include #include #include #include #include #include #define pi acos(-1.0) #define ll long long int using namespace std; const int M=(int)1e5; const ll mod=(ll)1e9 + 7; const ll inf=0x3f 阅读全文
posted @ 2020-05-07 00:36 晴屿 阅读(95) 评论(0) 推荐(0) 编辑