摘要:
https://ac.nowcoder.com/acm/contest/86387/D #include<bits/stdc++.h> using namespace std; int a[101][30],dp[101][5005]; int main(){ int n,m;cin>>n>>m; 阅读全文
摘要:
const int N=5e5+5; const int INF=0x3f3f3f3f; int n,q; int a[N],trmx[N],trmn[N]; //将原来的累加改为求最值 void add(int x,int k){ while(x<=n){ trmx[x]=max(trmx[x], 阅读全文
摘要:
int n; struct st{ int v,id; }a[N]; int tr[N],rk[N]; void add(int x,int k){ while(x<=n){ tr[x]+=k; x+=lowbit(x); } } int query(int x){ int res=0; while 阅读全文
摘要:
题目 In this problem, you are initially given an empty multiset. You have to process two types of queries: ADD \(x\) — add an element equal to \(2^{x}\) 阅读全文
摘要:
题目 You are given an array \(a\) consisting of \(n\) positive integers. You can perform the following operation on it: Choose a pair of elements \(a_i\ 阅读全文