跳到正文

Horsey_B

646028

QwQ

在洛谷打开
资料、奖项与版本

资料

编号
646028
抓取

奖项

2025 CSP-J
一等奖
2025 CSP-S
二等奖
2024 CSP-J
一等奖
2024 CSP-S
二等奖

版本

  1. v2当前
  2. v1

Never Give Up\begin{array}{c}\color{#d8c7b6} \rule{110pt}{21.5pt}\\[-18.5pt] \color{#789456}\textbf{Never Give Up} \end{array}

【练习区】

(目前397分)

本人的萌新QAQ是刚学OI但是是这样即使我也声音大声喊出要用蒟蒻的IAKIOI\small\texttt{本}\huge\texttt{人}_{\small\texttt{的}^{\large\texttt{萌新}\small\texttt{QAQ}}}^{\large\texttt{是}{\small\texttt{刚学}\large\texttt{OI}}}\huge\texttt{但是}^{\large\texttt{即}{\small\texttt{使}}}_{\normalsize\text{是这样}}\texttt{我也}^{\small\texttt{要}\normalsize\texttt{用}\texttt{蒟}_{\texttt{蒻}\large\texttt{的}}}_{\scriptsize\texttt{声音大声喊出}}\texttt{IAKIOI}

【祭祀区】

2022年4月27日 AC100 祭
2022年4月27日 AC第一道绿题 祭
2022年10月1日 AC300 祭
2022年10月3日 AC100橙题 祭
2022年10月11日 AC第一道蓝题 祭
2022年11月26日 AC10绿题 祭
2023年1月4日 AC400 祭
2023年2月2日 AC第一道紫题(已掉蓝) 祭
2024年7月24日 AC500 祭
2024年7月26日 AC100 黄题 祭
2024年7月28日 AC200 红题 祭
2025年1月22日 AC600 祭
2025年1月22日 再次AC第一道紫题 祭
2025年2月10日 我又绿名了 祭
2025年3月2日 AC200 橙题 祭
2025年7月11日 AC100 绿题 祭
2025年8月19日 AC10 紫题 祭

QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ\textit{\textmd{QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ QwQ}}

【网站区】

//施工中请绕行\textrm{\textup{\textbf{//施工中请绕行}}}

oi wiki

oierdb

为哈迷设置的书店

配色表

各大Oj集锦

KATEX

沙盘

非常好用的AI:

mytan
deepseek
minimax

【代码区】

等本蒟蒻升级了在更新吧

O2/O3优化

C++
#pragma GCC optimize(2)
#pragma GCC optimize(3, "Ofast", "inline")

cin/cout关闭同步流

C++
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);

快读

C++
int read(){
    int x=0,f=1;char ch=getchar();
    while(!isdigit(ch)){if(ch=='-') f=-1;ch=getchar();}
    while(isdigit(ch)){x=x*10+ch-48;ch=getchar();}
    return x*f;
}

快写

C++
void write(int x){
    if(x<0) putchar('-'),x=-x;
    if(x>9) write(x/10);
    putchar(x%10+'0');
}

模板

C++
#include <bits/stdc++.h>
using namespace std;

const int NR = 1e5 + 5;

int main()
{
    
    return 0;
}

离散化

C++
int m, b[NR];
void discrete(int n)
{
	for(int i = 1; i <= n; i ++) b[i] = p[i];
	sort(b+1, b+n+1);
	m = unique(b+1, b+n+1) - b - 1;
	for(int i = 1; i <= n; i ++) p[i] = lower_bound(b+1, b+m+1, p[i]) - b;
}

二分后的答案

C++
int ans;
for(ans=r;ans<=l;ans++)if(check(ans))break;

OI 神兽:

代码
/**
*  ┏┓   ┏┓+ +
* ┏┛┻━━━┛┻┓ + +
* ┃       ┃
* ┃   ━   ┃ ++ + + +
*  ████━████+
*  ◥██◤ ◥██◤ +
* ┃   ┻   ┃
* ┃       ┃ + +
* ┗━┓   ┏━┛
*   ┃   ┃ + + + +Code is far away from  
*   ┃   ┃ + bug with the animal protecting
*   ┃    ┗━━━┓ 神兽保佑,代码无bug 
*   ┃        ┣┓
*    ┃        ┏┛
*     ┗┓┓┏━┳┓┏┛ + + + +
*    ┃┫┫ ┃┫┫
*    ┗┻┛ ┗┻┛+ + + +
*/

anything else?

共 1 篇
  1. 个人记录

    P2006 赵神牛的游戏

    这道题是关于赵神牛的游戏,主要考察武器使用条件的判断。题目关键点在于: 需要使用long long类型避免溢出; 注意不能出现除以0的情况。 代码功能是读取武器包参数k、m、n,遍历m种武器,若武器法力消耗a[i]为0或k/a[i]乘以攻击力b[i]大于等于n,则输出该武器序号i;若所有武器均不满足条件,输出-1。