摘要:
#include<iostream>#include<string>#include<vector>#include<cstdio>using namespace std;int main(){ int n; while(cin>>n) { vector<string>s; while(!s.empty()) { s.pop_back(); } while(n--) { string cmd; cin>>cmd; ... 阅读全文
摘要:
需要记得开一个数组存储数据以节省查询时间。。输入输出printf,scanf是必须滴。(这一次是数据小)#include<iostream>using namespace std;typedef long long int llint;const llint MAXN=100003;llint tree[MAXN];llint value[MAXN];llint lowbit(llint idx){ return idx & (-idx);}void add(llint pos, llint inc,llint n){ for (llint i = pos; i <= 阅读全文