fulin10
fulin10
全部文章
题解
归档
标签
去牛客网
登录
/
注册
fulin10的博客
全部文章
/ 题解
(共4篇)
题解 | #小咪买东西#
emmm直接枚举x,二分查找最大化模板,即可。 #include <algorithm> #include <string.h> using namespace std; typedef long long ll; ll t,n,k,v[100000],c[100000],g...
2023-12-19
0
208
题解 | #起床困难综合症#
呃呃还算简洁吧,前缀+二分。。。。里面写找第一个大于等于t+1的位置,这个位置(下标)就是第某个音符。 int N,Q; int sumpre[60000]; int main(void) { cin>>N>>Q; int a; for(int i=1...
前缀和
2023-12-08
0
234
题解 | #起床困难综合症#
emm借用了雨神的思路,然后就考验本苟若的代码水平了 #include <unordered_map> using namespace std; int n,m; int result; unordered_map<int,pair<string,int>>l; ...
贪心
2023-11-02
0
251
题解 | #[USACO 2007 Jan S]Protecting the Flowers#
感觉用不着前缀和 #include <algorithm> using namespace std; int n; struct ty { int ti; int fdead; }myty[100010]; long long result,count1; bool co...
2023-11-01
0
204