摘要: 点击查看代码 auto Ms=[&](auto &C)->vector<int>{ vector<int>ans(n,-1); stack<int>stk; for(int i=0;i<n;i++){ while(!stk.empty()&&C[stk.top()]<C[i]){ ans[stk.t 阅读全文
posted @ 2024-12-25 15:36 Koziki 阅读(9) 评论(0) 推荐(0)
摘要: 点击查看代码 #include <bits/stdc++.h> using namespace std; using ll=long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n,m; cin>>n>> 阅读全文
posted @ 2024-12-25 15:35 Koziki 阅读(12) 评论(0) 推荐(0)
摘要: 点击查看代码 // 改build ,apply ,operator + // 奇奇怪怪 但能用 struct Tag{ ll add = 0; void apply(Tag &t){ add += t.add; return ; } }; struct Info{ ll sum = 0; void 阅读全文
posted @ 2024-12-05 20:13 Koziki 阅读(10) 评论(0) 推荐(0)