代码框架
主框架
#include<bits/stdc++.h>
using namespace std;
#define ui unsigned long long
#define int long long
#define ch char
#define db double
#define str string
#define bl bool
#define cst const
#define stu struct
#define vec vector
#define frin for(int i=1;i<=n;i++)
#define rfin for(int i=n;i>=1;i--)
#define rt return
#define r0 return 0;
signed main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
r0
}高精加模板
//时间复杂度:O(max(a.size(),b.size()))
//空间复杂度:O(max(a.size(),b.size()))
string he(string a, string b){
int cd=max(a.size(),b.size()),jw=0;
string c="";
while (a.size()<cd)a='0'+a;
while (b.size()<cd)b='0'+b;
for (int i=cd-1;i>=0;i--){
int t1=a[i]-'0',t2=b[i]-'0';
int t=t1+t2+jw;
jw=t/10;
t%=10;
char ch=t+'0';
c=ch+c;
}if (jw!=0) return '1'+c;
return c;
}高精减模板
//时间复杂度:O(max(a.size(),b.size()))
//空间复杂度:O(max(a.size(),b.size()))
string cha(string a,string b) {
bool neg=false;
if (a.size()<b.size()||(a.size()==b.size()&&a<b)){
swap(a,b);
neg=true;
}int cd=a.size();
while(b.size()<cd)b='0'+b;
int bow=0;
string c="";
for(int i=cd-1;i>=0;i--){
int t1=a[i]-'0';
int t2=b[i]-'0'+bow;
if (t1<t2){
t1+=10;
bow=1;
}else bow=0;
int dif=t1-t2;
c=char(dif+'0')+c;
}int pos=0;
while(pos<(int)c.size()-1&&c[pos]=='0')pos++;
c=c.substr(pos);
if(neg&&c!="0")c="-"+c;
return c;
}
高精乘模板
//时间复杂度:O(a.size()*b.size())
//空间复杂度:O(a.size()+b.size())
string ji(string a, string b){
if(a=="0"||b=="0") return "0";
int n=a.size(),m=b.size();
vector<int>res(n+m,0);
for (int i=n-1;i>=0;i--)
for (int j=m-1;j>=0;j--){
res[i+j+1]+=(a[i]-'0')*(b[j]-'0');
res[i+j]+=res[i+j+1]/10;
res[i+j+1]%=10;
}
string ans="";
for (int i=0;i<res.size();i++)
if (!(ans.empty()&&res[i]==0))
ans+=to_string(res[i]);
return ans.empty()?"0":ans;
}高精除低精
//时间复杂度:O(a)
//空间复杂度:O(a)
string shang(string a,long long b){
string ans="";
long long r=0;
for(int i=0;i<a.size();i++){
r=r*10+(a[i]-'0');
ans+=to_string(r/b);
r%=b;
}int pos=0;
while(pos<ans.size()-1&&ans[pos]=='0')pos++;
return ans.substr(pos);
}快速幂
普通快速幂模板(取模)
long long ksm(long long a,long long b,long long c){
long long res=1,base=a%c;
while(b!=0){
if(b%2==1){
res*=base;
res%=c;
}base*=base;
base%=c;
b/=2;
}return res;
}普通快速幂模板(不取模)
long long ksm(long long a,long long b){
long long res=1,base=a;
while(b!=0){
if(b%2==1)res*=base;
base*=base;
b/=2;
}return res;
}
半高精度快速幂模板
//时间复杂度:O(n.size()·a.size()^2·4^n.size())
//空间复杂度:O(a.size()·10^n.size())
//对于答案位数≤10^4,看评测机心情过,否则FFT/NTT
string ksm(string a,string n){
string res="1";
string base=a;
while(n!="0"){
if((n.back()-'0')%2==1)res=ji(res,base);
base=ji(base,base);
n=shang(n,2);
}return res;
}随机数生成器
#include <bits/stdc++.h>
using namespace std;
int main() {
int l, r, x;
cin >> l >> r >> x;
if (cin.fail() || x <= 0)
return 0;
if (l > r)
std::swap(l, r);
unsigned seed = chrono::steady_clock::now().time_since_epoch().count();
mt19937 rng(seed);
uniform_int_distribution<int> dist(l, r);
for (int i = 0; i < x; i++) {
cout << dist(rng);
if (i < x - 1)
cout << " ";
}cout << endl;
return 0;
}随机数生成器&自定义奖励
#include <bits/stdc++.h>
using namespace std;
string getReward(int score) {
if (score >= 1 && score <= 150)
return "禁言1 min";
else if (score >= 151 && score <= 200)
return "禁言5 min";
else if (score >= 201 && score <= 225)
return "禁言10 min";
else if (score >= 226 && score <= 240)
return "禁言1 day";
else if (score >= 241 && score <= 245)
return "禁言1 week";
else if (score >= 246 && score <= 250)
return "禁言1 month";
else if (score >= 251 && score <= 350)
return "奖励滚木一根";
else if (score >= 351 && score <= 400)
return "奖励滚木十根";
else if (score >= 401 && score <= 450)
return "sb3一个";
else if (score >= 451 && score <= 475)
return "sb3五个";
else if (score >= 476 && score <= 478)
return "爆声";
else if (score >= 479 && score <= 480)
return "爆头";
else if (score >= 481 && score <= 485)
return "florr国庆最后一天大合卡";
else if (score >= 486 && score <= 495)
return "大冒险1次";
else if (score >= 496 && score <= 500)
return "终极大奖";
else
return "未知奖励";
}int main() {
int l, r, x;
cin >> l >> r >> x;
if (cin.fail() || x <= 0)
return 0;
if (l > r)
swap(l, r);
unsigned seed = chrono::steady_clock::now().time_since_epoch().count();
mt19937 rng(seed);
uniform_int_distribution<int> dist(l, r);
for (int i = 0; i < x; i++) {
int num = dist(rng);
string reward = getReward(num);
cout << num << " " << reward;
if (i < x - 1)
cout << endl;
}if (x > 0)
cout << endl;
return 0;
}个人介绍
是什么在支撑着我活下去?是希望。
绝望时刻
Q:OIer最绝望的时刻是什么?
A:遇到不会的题连打表都不知道如何打
Q:比如?
A:
我常常追忆过去。
生命瞬间定格在脑海。我将背后的时间裁剪、折叠、蜷曲,揉捻成天上朵朵白云。
云朵之间亦有分别:积云厚重,而卷云飘渺。生命里震撼的场景掠过我的思绪便一生无法忘怀,而更为普通平常的记忆在时间的冲刷下只留下些许残骸。追忆宛如入梦,太过清楚则无法愉悦自己的幻想,过分模糊却又坠入虚无。只有薄雾间的山水,面纱下的女子,那恰到好处的朦胧,才能满足我对美的苛求。
追忆总在不经意间将我裹进泛黄的纸页里。分别又重聚的朋友,推倒又重建的街道,种种线索协助着我从一个具体的时刻出发沿时间的河逆流而上。曾经的日子无法重来,我只不过是一个过客。但我仍然渴望在每一次追忆之旅中留下闲暇时间,在一个场景前驻足,在岁月的朦胧里瞭望过去的自己,感受尽可能多的甜蜜。美好的时光曾流过我的身体,我便心满意足。
过去已经凝固,我带着回忆向前,只是时常疏于保管,回忆也在改变着各自的形态。这给我的追忆旅程带来些许挑战。
我该在哪里停留?我问我自己。
————P11831 [省选联考 2025] 追忆
Q:6
账号
QQ 1105634705
WeChat Z13588458194、Z17205818387
三角洲 Shiny一只、ZHR的救赎、ZHR114514等
codeforces _Fe3O4_
抽象时刻
《最后一哈》
臣本基米,躬耕于南北绿豆,混迹于哈基米大地。苟全喵命于粮荒,不求闻达于饭盆。先帝不以臣卑鄙,猥自枉屈,三顾臣于绿豆堆中,咨臣以捕鼠之事。由是感激,遂许先帝以驱夜鼠。今北伐未竟,粮罐将空,臣已油尽灯枯。喵爪渐软,再不能临阵哈人;喵眼昏花,再不能关乎哈市兴衰。悠悠苍天,何薄于米!愿陛下此后,亲理猫砂,勿使秽气满室;善存猫粮,莫教饿殍遍阶。若逢新喵入户,望念臣旧情,多分一勺罐头——臣虽去,魂仍绕榻,必护陛下餐餐有鱼,夜夜安睡。临表啮纸,爪痕泣血,不知所云。
臣本布偶,狸花色杂。苟全性命于街巷,不求闻达于豪门。先帝偶遇寒檐,见臣缩瑟,解衣裹之,携归暖室。自授臣以捕雀之任,昼伏夜巡,虽蚊蝇不敢入户。今粮罐见底,小鱼干已尽,臣躯渐僵,唯余一息。愿陛下勿弃旧宅,夏开窗以纳清风,冬铺毯以存余温。若有黑猫侵界,可悬臣旧铃于门,其闻故味自退。臣去后,请将臣骨埋于院中薄荷丛下,春来发新叶,便是臣魂归,犹能助陛下驱蝇安眠。呜呼喵言不尽,以尾扫尘,三叩碗沿。
《鲲之大》
北冥有鱼,其名为鲲,鲲之大,一锅炖不下,再来一锅。正炖时,见一鸟来也,此鸟大之,数倍于鲲!吾闻其名为鹏,才觉己孤陋寡闻,无法攻,只用十锅炖之。
炖未及半,火候方兴,忽见天末一云,其名曰卷,卷之大,蔽日遮天,鲲鹏俱失色。吾问其所自来,答曰:“洛谷评测之机,今日心绪不佳,尔算法虽疾,终难炖熟此锅之 TLE 也。”
《OI的But》
I see black problem as equal to a paramecium looking at an elephant.
But sometimes some people can use a concave lens to shrink the elephant.
But but very few people can turn things into an elephant!
But but but no one has ever used a car’s mirror to blind the elephant with light, then transform the elephant into an ant!!!
But but but but absolutely no one can use an ant to make the elephant die!!!!!
翻译:
我看黑题等于草履虫看大象。
但是有时候有些人可以用凹透镜缩小大象。
但是但是极少的人可以把东西变成大象!
但是但是但是从未有一人可以用轿车的反射镜闪瞎大象,然后把大象变成蚂蚁!!!
但是但是但是但是最最最从未有一人用蚂蚁使大象死掉!!!!!
一些东西
粉福
互关条件
必选项
- 非封棕灰
- 不超10次/天的P话
- 关注了我
可选项
- 咕值120
- 等级分500
- 不超5次/天的P话
- 玩florr.io
- 粉丝100
直通项
- 咕值170
- 等级分1.0k
- 我想
- 我发了限时无条件互关
- 有钩/气球
- 粉丝200
壶关条件为:
必选项可选项
直通项满足项(不是2.5.)满足必选项
直通项满足2. 5.满足可选项1满足必选项
取关条件
- 你不再满足壶关条件
- 你满足拉黑条件
满足其一即取关
拉黑条件
- 骗关
- 犇犇发送令人强烈不适内容
- 刷屏某个区块(例:某个帖子或者犇犇)
- 接龙且不听劝阻,举报且拉黑,永久性
满足其一即拉黑



