跳到正文

O2人

98390

无敌仙王,游戏人间。

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

资料

编号
98390
抓取

奖项

2021 NOIP
一等奖

2022.2.17退役个头

acm 启动

血的教训:NOIP2020T4 开O2丢70分,为纪念当时鬼迷心窍,于是更名为“O2人”。

最后一次参加初赛祭:2021.9.19

HDU:CY6666 CF:CY0531

箱子

我滴头像

666?\color{white}\colorbox{white}{666?}

(平抛运动) https://wenku.baidu.com/view/797a7f78e109581b6bd97f19227916888486b981.html

http://www.bccto.me/

https://namerena.github.io/

https://jiuge.thunlp.cn//

http://baidu.physton.com/?q

OIerDb{ \color{orange} OIerDb}

https://www.luogu.com.cn/blog/Caro23333/hui-yi-lu-yu-tui-yi-gan-yan

https://luogulo.gq/show.php?url=https://www.luogu.com.cn/discuss/358297?page=8

https://www.luogu.com.cn/discuss/358940

C++
#include <bits/stdc++.h>
#define LL  long long
#define ULL unsigned long long
#define DD double
#define Re register
using namespace std;
struct FastIO {
	template<typename T>
	FastIO& operator>>(T&ret){
		ret=0;int f=1;
		char ch=getchar();
		while (ch<'0'||ch>'9'){
			if (ch=='-') f=-f;
			ch=getchar();
		}
		while (ch>='0'&&ch<='9'){
			ret=(ret<<3)+(ret<<1)+ch-48;
			ch=getchar();
		}
		ret*=f;
		return *this;
	}
} fin;
int main(){
	freopen("text.in","r",stdin);
	freopen("text.out","w",stdout);
	return 0;
}
共 2 篇
  1. 题解

    题解 P1857 【质数取石子】

    该题为动态规划问题,核心思路分为两步: 状态判定:通过vis[i]数组判断石子数为i时先手是否必胜(1)或必败(0)。对于每个i,若存在素数p使得i-p为必败态,则vis[i]为必胜态;否则为必败态。 步数计算:根据状态转移F[i],若当前状态为必胜态(vis[i]=1),则选择使后续步数最少的必败态转移路径(F[i-p[j]]);若为必败态(vis[i]=0),则选择使后续步数最多的路径(F[i-p[j]])。关键细节在于必胜态必须优先选择必败态转移,避免误选导致错误。 代码通过筛法生成素数列表,结合上述逻辑计算结果,并根据输入输出对应答案。

    14 赞
  2. 个人记录

    NOIP赛前必备

    https://www.crazydave.top/%E8%B5%9B%E5%89%8D%E5%B0%8F%E7%BB%93/ 转,但貌似原来的网站崩了) 赛前小结 防翻车指北 空间要算清楚,千万不要 MLE 了,1e7数组不能多开 longlong 不要忘记开,模数一定要写对 …