跳到正文

个人记录

缺省源

mo_mo_yu0_0约 2 分钟
原文
文章信息与版本

文章信息

发布
2026年4月30日
收录
2026年5月9日
更新
2026年9月21日
篇幅
约 2 分钟

版本

  1. v1当前

snippets

cpp
C++
/*
不论什么代价都在所不惜。

没有可以思考的心智。
没有可以屈从的意志。
没有为苦难哭泣的声音。
生于神与虚空之手。

你必封印在众人梦中散布瘟疫的障目之光。
你是容器。
你是空洞骑士。

Autuor:Momoyu
URL:Non
ID:Non
Problem:Non
Time:1000ms
Memory:512MB

*/

#include <bits/stdc++.h>
#define int long long
using namespace std;
namespace Momoyu
{
    const int N=5e5+10;
    void main(){

    }
}
signed main()
{
    // freopen("1.in","r",stdin);
    // freopen("1.out","w",stdout);
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    // int T=1; cin>>T;while(T--)
    Momoyu::main();
}

/*
g++ text.cpp -o text -std=c++11 -O2 -Wall;if($?){./text}
*/
Fen
C++
namespace Fenwick_tree{
    int c[N];
    int lowbit(int x){
        return x&-x;
    }
    void change(int pos,int val){
        while(pos<=n)c[pos]+=val,pos+=lowbit(pos);
    }
    int query(int pos){
        int ret=0;
        while(pos)ret+=c[pos],pos-=lowbit(pos);
        return ret;
    }
}
原文