首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
BZOJ 1568 Blue Mary开公司
】的更多相关文章
BZOJ 1568 Blue Mary开公司
李超线段树. GTMD调了一下午... #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define maxn 100500 #define eps 1e-8 #define inf 10000000 using namespace std; ,root,ls[maxn<<],rs[maxn<<]; ],k[maxn<<]…
[BZOJ 1568][JSOI2008]Blue Mary开公司
[BZOJ 1568][JSOI2008]Blue Mary开公司 题意 \(n\) 次操作, 维护一个一次函数集合 \(S\). 有两种操作: 给定 \(b\) 和 \(k\), 向 \(S\) 中插入一个函数 \(f(x)=kx+b\). 给定一个 \(x\), 求 \(\max\limits_{f\in S}\{f(x)\}\). \(n\le 1\times 10^5,x\le 50000\). 题解 AFO前的打板子日常 讲道理为啥一个 \(\log\) 的题数据范围才给这么点啊 李超…
数据结构(线段树):BZOJ 1568 [JSOI2008]Blue Mary开公司
1568: [JSOI2008]Blue Mary开公司 Time Limit: 15 Sec Memory Limit: 162 MBSubmit: 602 Solved: 214[Submit][Status][Discuss] Description Input 第 一行 :一个整数N ,表示方案和询问的总数. 接下来N行,每行开头一个单词“Query”或“Project”. 若单词为Query,则后接一个整数T,表示Blue Mary询问第T天的最大收益. 若单词为Project,则…
bzoj 1568 [JSOI2008]Blue Mary开公司 超哥线段树
[JSOI2008]Blue Mary开公司 Time Limit: 15 Sec Memory Limit: 162 MBSubmit: 1808 Solved: 639[Submit][Status][Discuss] Description Input 第一行 :一个整数N ,表示方案和询问的总数. 接下来N行,每行开头一个单词“Query”或“Project”. 若单词为Query,则后接一个整数T,表示Blue Mary询问第T天的最大收益. 若单词为Project,则后接两…
bzoj千题计划219:bzoj1568: [JSOI2008]Blue Mary开公司
http://www.lydsy.com/JudgeOnline/problem.php?id=1568 写多了就觉着水了... #include<cstdio> #include<iostream> #include<algorithm> using namespace std; #define N 100001 ],b[N<<]; ]; long long ans; void read(int &x) { x=; char c=getchar()…
1568: [JSOI2008]Blue Mary开公司
1568: [JSOI2008]Blue Mary开公司 题目描述 传送门 题目分析 简单分析可以发现就是不停给出了\(n\)条直线,要求每次给出一条直线后求出所有直线在横坐标为\(x\)时\(y\)的最大值. 李超树裸题. 不知道李超树的可以移步百度. 是代码呢 #include <bits/stdc++.h> using namespace std; #define ls rt<<1 #define rs rt<<1|1 #define mid ((l+r)/2)…
1568: [JSOI2008]Blue Mary开公司(超哥线段树)
1568: [JSOI2008]Blue Mary开公司 Time Limit: 15 Sec Memory Limit: 162 MBSubmit: 1198 Solved: 418 Description Input 第一行 :一个整数N ,表示方案和询问的总数. 接下来N行,每行开头一个单词“Query”或“Project”. 若单词为Query,则后接一个整数T,表示Blue Mary询问第T天的最大收益. 若单词为Project,则后接两个实数S,P,表示该种设计方案第一天的…
【BZOJ-1568】Blue Mary开公司 李超线段树 (标记永久化)
1568: [JSOI2008]Blue Mary开公司 Time Limit: 15 Sec Memory Limit: 162 MBSubmit: 557 Solved: 192[Submit][Status][Discuss] Description Input 第一行 :一个整数N ,表示方案和询问的总数. 接下来N行,每行开头一个单词“Query”或“Project”. 若单词为Query,则后接一个整数T,表示Blue Mary询问第T天的最大收益. 若单词为Project,则后…
【BZOJ1568】[JSOI2008]Blue Mary开公司(李超线段树)
[BZOJ1568][JSOI2008]Blue Mary开公司(李超线段树) 题面 BZOJ 洛谷 题解 是模板题啊. #include<iostream> #include<cstdio> using namespace std; #define MAX 50050 #define lson (now<<1) #define rson (now<<1|1) int Q,n=50000;char ch[20]; struct Node{bool fl;do…
【BZOJ1568】[JSOI2008]Blue Mary开公司 线段树
[BZOJ1568][JSOI2008]Blue Mary开公司 Description Input 第一行 :一个整数N ,表示方案和询问的总数. 接下来N行,每行开头一个单词“Query”或“Project”. 若单词为Query,则后接一个整数T,表示Blue Mary询问第T天的最大收益. 若单词为Project,则后接两个实数S,P,表示该种设计方案第一天的收益S,以及以后每天比上一天多出的收益P. 1 <= N <= 100000 1 <= T <=50000 0…