NOIP 2025 HA 迷惑行为大赏
前言
CSP-S 迷惑行为见 CSP-S 2025 HA 迷惑行为大赏。
仿照别人的做法,尝试翻了所有代码进行总结,如果做的不好请谅解喵。
本次 NOIP HA 共 270 人参加。
根据微软大战代码的统计,其中出现了:
正文
HA-0009
query.cpp
int T=1,n,q,a[N],s[N],c[35][N],aoao[N];
tree.cpp
int T=1,n,m,siz[N],a[N],b[N],col[20],aoao[N],las[500005];
到底是谁会用 aoao 做变量名呢,好难猜啊。
HA-0011
struct FaatIO {
// ...
} IO;
细节 FaatIO。
candy.cpp
/*
写的真是一大坨啊。
神入_ANIG_上厕所忘带准考证。
*/
神入 _ANIG_ 上厕所忘带准考证。
query.cpp
/*
盲猜根号分治。
但我完全不会。
*/
sale.cpp
/*
b性质+三次方,就12分也要拿啊。
那么我要开始拼部分分了
会重复。为啥非得搞个难绷的可能相同?
恶心。真恶心。
这题咋镇石啊。我不想写了。
*/
HA-0017
candy.cpp
/*
8:31
感觉 T1 比较简单
能一直买的条件显然就是 x+y 最小
怎么感觉像个橙。。 有种不好的预感。。
8:33
还需要处理其他情况,先想想特殊性质
这个特殊性质给的还是很多的
x_i=y_i?
那就是不管买谁都一样,所以答案就是 \lfloor \frac{m}{\min_x} \rfloor
x_i\ge y_i?
挑一个 x+y 最小的一直买
还剩下的不够这个 x+y 的钱选择可能的 x 买
8:43
怎么被第四个大洋里 hack 了。。
说明这场大洋里比较强,是好事吧。。
9:06
3 10
5 5
1 100
2 100
hack
x+y 最小的有可能是诈骗,实际上不买这个 x+y 会有更大的价值
9:15
可以枚举不受若干次诈骗能得到的价值
过掉所有阳历,试试对拍
9:19
拍了 100 组,没有问题
好吧我收回刚才的话,我感觉这有黄
开 T2 吧。
*/
这人怎么被 T1 硬控一个小时啊喵,怎么回事呢。
sale.cpp
/*
9:23
咋还有多测啊。。
n\le 5000 是和一位
首先小 X 可以给所有糖都定成 1,这样小 R 可以获得前 m 大的价值
可能会存在 rank m 相等的情况?。。
呃呃不对我读错题了。。
这个意思是经典 01 背包的贪心策略在多少种方案情况下是真的。。
小 X 可以选择把一些数除以 2,然后小 R 以性价比贪心策略选数,问有多少种除以 2 的方案使小 R 的贪心是真的。
9:29
这个有点难算,试试能不能用用 hxf 熔池?
先考虑性价比,再考虑原价,考虑编号没区别
9:38
没什么头绪,看看特殊性质试试
a_1=a_2=\dots =a_n
所有原价都相等,选择除以二的性价比一定低,一定会最后选,所以会先选完 w=1 的
那就是不管怎么定价,策略总是正确的
答案就是 2^n。
m=2n-1
只有全都除以二才拿不到所有数。
但是全都除以二之后大小关系也一定一样,所以所有方案均合法,答案是 2^n。
9:52(?)
我草等会电脑这个表不准现在已经 9:56 了
感觉今年 sale 严格大于 assign 啊。。
我草怎么都十点了!!
11:14
假完了。变成 8pts 了。
再见 NOIP。
12:41
可能也没什么人能看到这吧。顺手推点歌?
Nanatsukaze - 真空都市
Nanatsukaze - Aria
A4。 - 天使の翼。
*/
哇这个喵好惨啊,All in T2 结果做出来了个棍母喵。
query.cpp
/*
今年 CSPS 是迷惑行为大赏是我整的
如果这次有别人整,希望能上吧。
纪念今年这个把我创飞的 T2。
一个小时干掉 T1,剩下时间全在攻 T2,然后失败了。
明年攒够 RP 再战。
——By AeeE5x.
小鸟游星野天下第一!
*/
好吧 HA-0017 其实是我喵。
你说得对,但是小鸟游星野天下第一喵。
#define Luogu return
#define AeeE5x 0
// ...
int main(){
//...
#ifdef TakanashiHoshino
cerr<<"\nUsed time: "<<clock()*1.0/CLOCKS_PER_SEC<<"s.\n";
#endif
Luogu AeeE5x;
}
其实我的缺省源里也有夹带私货喵。
HA-0023
tree.cpp
if (g[i].size() == n - 1) {
// ...
}
然而在前面并没有定义 g。
HA-0028
candy.cpp
/*
能否直接比较大小啊
*/
能的喵。
HA-0032
query.cpp
//虽然我知道不对但是好不容易搓出来这么一大坨不能不交
(这份代码有 3948 个字符喵。)
HA-0034
candy.cpp
//有一个想法,但是没有演草纸,而且也不难写
//考虑把xy看成一组,操作肯定是一直选一组
//最后几个选零的
//即,不可能有1组以上的糖果我xy都拿
//所以我该做的就是求前缀和,看看我拿多少个x比拿完k组优
//我就是个唐氏,为啥不O(n)枚举,非得去写一个破二分?
//白费了40min,我真服了
tree.cpp
/*
假完了啊,应该是单干和一块干取max
所以说先树D求出来从每个点开始单干的值,然后和一块干取max
但其实没必要,直接树形DP就做完了
*/
摸摸头喵,不急喵。
HA-0035
candy.cpp
// 8.37 写完代码
// 9.30 通过所有大洋里
这么强?!
HA-0042
candy.cpp
struct node{
int x,y;
int ty;
int val;
}ans[514514];
bool vis[514514];
query.cpp
int n,a[1145140],q,l,r;
//...
int ans=-1145141919;
何意味。
sale.cpp
int C(int n,int m){
if(m<=n||n<0||m<0)return 0;
return jie[m]%998244353*(km(jie[m-n]%998244353,998244351)%998244353)%998244353*(km(jie[n]%998244353,998244351)%998244353)%998244353;
}
好有毅力喵。
HA-0045
query.cpp
for(int i=1;i<=n;i++)int k,cin>>k;
// ...
/*
cendy
caady
fropen
ctt
freoepen
genshin impact
追忆
recall
afo
luogu
*/
怎么 CE 了喵。
迷惑行为诱捕器喵。
HA-0047
query.cpp
ans=
for(int i=2;i<=n;i++){
ans^=i*a[i];
}
怎么会这样喵,是 DevCpp 的 Ctrl+Z 害的吗喵。
tree.cpp
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const int N=2e5+10;
priority_queue<pair<int ,int > , vector<pair<int, int> > ,greater<pair<int,int> > >q;
int main(){
freopen("tree.in","r",stdin);
freopen("tree.out","w",stdout);
int a,b;
cin>>a>>b;
cout<<a+b;
fclose(stdin);
fclose(stdout);
return 0;
}
这是摆烂了吗喵。
HA-0050
candy.cpp / sale.cpp
/*sto_stO 永远铭记————丁浩文————史诗级大帅哥 Orz_orz*/
!?强强?!
HA-0052
candy.cpp
/*
...
08:42 Accept big examples 1,2,3,4,5,7
08:56 finish bf.cpp data.cpp check.cpp
09:41 Accept all cases.
09:44 run check.
09:45 find a hack data?? oh a corner case...
10:00 Accept hack data, run check.
12:37 I didn't find any hack data.
12:55 I write 11,060 bit today. I feel tried.
*/
sale.cpp
/*
...
10:16 Accept 1~5 20pts
10:22 Accept 18 24pts
10:34 Aceept 16 28pts
10:53 Accept 17 32pts
12:00 find a (m=2) data!
12:14 oh, it's wrong.
12:28 oh! I know how to write.
12:35 Accept 7~9 14~15 52pts
*/
tree.cpp
/*
...
11:19 Accept 1~2 8pts
*/
query.cpp
/*
...
11:34 Accept 1 5pts
11:52 I find a solution about A, but I think problem B is more important,
so I decited to finish problem B first.
*/
拜谢喵。
HA-0053
candy.cpp
int _n,_m,_min=1e10,_r,_ans;
struct pp{
int a,b;
}_candy[maxn];
(所有代码的变量名开头几乎都有个下划线。)
HA-0061
sale.cpp
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen//freopen
怎么又是一个迷惑行为诱捕器。
tree.cpp
//OIer失去了一个无关紧要的人物
//AFOer迎来了它最FW的人
//去玩魔法少女的魔女审判
//去玩不/存在的你和我
//去玩彼方的她ALiya
//去玩丝之歌
//去玩zorr
//去玩铁锈战争
//去玩CS
//想玩什么就去玩什么
游戏大手子。
HA-0063
sale.cpp
while(t--){
cin>>n>>m;
for(int i=1;i<=n;i++) cin>>a[i];
ll cnt=0
}
分号呢喵?!
HA-0064
sale.cpp
Node xjb[N+10];
xjb 是什么喵?
HA-0066
sale.cpp
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <utility>
#include <vector>
// ...
memset (dp, 0, sizeof (dp));
喜提 CE 喵。
tree.cpp
const int N = 8848;
8848 钛合金树。
HA-0071
query.cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
// freopen(".in","r",stdin);
// freopen(".out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
return 0;
}
/*tui yi le www
dou shi wo bu hao
weishen me zhe yang dui wo ya*/
int kkk;
翻译:退役了 www 都是我不好 为什么这样对我呀
HA-0078
candy.cpp
while (pq.top().first <= m1) {
int item = pq.top().second; pq.pop();
if (a[item].choose) {
m1 -= a[item].y;
ans1++;
a[item].choose = 0;
pq.push({a[item].x, item});
} else {
m1 -= a[item].x;
ans1++;
a[item].choose = 1;
pq.push({a[item].y, item});
}
}
for (int i = 1; i <= n; ++i) a[i].choose = 0;
while (!pq.empty()) pq.pop();
for (int i = 1; i <= n; ++i) pq.push({a[i].choose ? a[i].y : a[i].x, i});
ll ans2 = 0, m2 = m; int buy = 0;
for (int i = 1; i <= n; ++i) {
if (m2 >= a[i].x + a[i].y) buy = i;
ans2 += (m2 / (a[i].x + a[i].y)) << 1;
m2 %= a[i].x + a[i].y;
}
m2 += a[buy].y;
ans2--;
a[buy].choose = 1;
上面这段代码在主函数里重复了 22 次,变量名从 m1、ans1 逐渐变成了 m22、ans22。
整个代码有足足……21KB?!
HA-0087
query.cpp / tree.cpp
vector<int>g;
// ...
int dfs(int p){
int num=1;
for(auto i:g[p]){
num+=dfs(p);
}
return num;
}
// ...
g[fa].push_back(i);
// ...
dfs(1,0);
这家伙在写什么呢。
这个人的 query.cpp 和 tree.cpp 一模一样,交错代码了。
HA-0088
query.cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
int i,j;
return 0;
}
请输入文本。
HA-0092
candy.cpp
freopen("candy6.in","r",stdin);
// freopen("candy.out","w",stdout);
请输入文本。
HA-0095
query.cpp
#include<bits/stdc++.h>
using namespace std;
long long T;
int main(){
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
cout<</*"^-^"*/"0"<<endl;
return 0;
}
可爱喵。/*"^-^"*/
sale.cpp
#include<bits/stdc++.h>
using namespace std;
long long n,m;
int main(){
freopen("sale.in","r",stdin);
freopen("sale.out","w",stdout);
cin>>n>>m;
while(m--)
cout<<1<<endl;
return 0;
}
tree.cpp
#include<bits/stdc++.h>
using namespace std;
long long T;
int main(){
freopen("tree.in","r",stdin);
freopen("tree.out","w",stdout);
cin>>T;
while(T--)
cout<<1<<endl;
return 0;
}
HA-0096
candy.cpp
ll f[236800000];
不可发送单个标点符号。
query.cpp
freopen("query.in","r",stdin);
freopen("query.out",stdout);
HA-0099
sale.cpp
// -O2 -std=c++14 -static -Wall -Wextra
// 9:32 饿了,想吃东西
// 11:00 怀疑 T3 结论题喵
// 11:50 如对,20pts
/* *
* ****************** *** ******************** *
* ** *** *** * * *
* ** *** *** * * * *
* ** * ** *** **** *** ************* *
* ** * ** * *
* * ********* ************* *
* * * * *
* * * * ************* *
* ******** * *
* *** *
* *
* *
* *
* *
* */
tree.cpp
// 寄
/* */
/* ****** ************* */
/* * *** * * */
/* * *** * * */
/* * *** * * */
/* * ** * * */
/* * * * * */
/* * * ************ */
/* * * * */
/* * * * */
/* * * * */
/* * ** * */
/* * *** * */
/* * *** * */
/* * *** * */
/* ****** * */
/*
字符画大手子喵!
HA-0100
tree.cpp
/*记录
8:30 开A
8:44 A出思路
9:11 写出来第一版 过小样例但是过不了大样例
9:23 写不出来
9:30 才想到贪心完了是个背包dp 但是我忘了咋写了
我祈祷过T1不要出dp 但是还是出了
尽管是个板子 我还是不会
9:44 不会dp 要原地退役了
如果我A写完了也只能拿65 因为好像后面25分要队列优化 10分高精度
9:58 这个键盘能关机? 我代码没了
9:59 跳A 先写B
10:05 B是数学 行 我肯定是推不出来
全写暴力的话应该能拿110pts 二等吧。。可惜我连暴力也写不满
10:10 有点难受 去上个厕所
10:18 回来了 早知道昨天不吃辣的了
10:19 考虑到B是容斥原理(?)
10:20 放弃B
没注意一口干完了咖啡
10:40 重写A 感觉自己绝对打铁
毁了毁了。
-11:05 不知道在想什么 可能在想背包咋写吧
准备最后一个小时写暴力分
11:13 有点急
11:46 套了个D的样例 算了吧、
思考B C
12:47 已经没有心情继续写下去了
我不知道这场结束后我还有没有机会
也许就此就退役了
其实我已经很厉害了 用一年时间就能做到这样
但是我真的很不甘心
我可能再来一年? 可是我连文化课都快跟不上了
也许NOIP2025是我的终点了吧
很高兴能学到这么多 我也很热爱算竞 但是我遇见你的时候太晚了
如果有机会 我希望高考完能与你再会吧 那时我没准会完成一场蜕变
你会看到更好的我
我欲穿花寻路,直入白云深处,浩气展虹霓。
在此感谢所有支持过我的人
感谢我的父母 感谢我的教练 感谢我的同桌zqh 你要等着我
12:58 好了要交卷了 再见
*/
祝好。
query.cpp
string a[]={"18446744073709551603","8","4"};
string b[]={
"520340639","526047873", // 后略
};
string c[]={
"34831848699","7566420117", // 后略
};
string d[]={
"18446744047405334344","61396566269", // 后略
};
string e[]={
"18446744010547543460","42880108665", // 后略
};
代码总共 30.6KB 喵。
HA-0111
sale.cpp
int pow_2[]={1,2,4,8,16,32,64,128,256,512,1024,2048,4096, /* 后略 */ };
// ...
cout<<pow_[2]<<endl;
tree.cpp
p[i]=read();
然而在前面根本没有定义 p 喵。
HA-0119
query.cpp
#include<bits/stdc++.h>
//#include<iostream>
//#include<vector>
using namespace std;
int main()
{
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
// freopen("ceshi001.in","r",stdin);
// freopen("ceshi001.out","w",stdout);
//
int t=5;
while(t--){
cout<<91<<endl;
}
// int n=50000;
// long long m=1<<27,mm=5000;
// cout<<(n<mm);
// int a[12];
// cout<<"10个:";
// for(int i=1;i<=10;i++)
// cin>>a[i];
// vector<int> a;
// int t;
// while(cin>>t){
// a.push_back(t);
// }
// for(vector<int>::iterator it=a.begin();it!=a.end();it++)
// cout<<*it<<endl;
return 0;
}
sale.cpp
#include<bits/stdc++.h>
//#include<iostream>
//#include<vector>
using namespace std;
int main()
{
freopen("sale.in","r",stdin);
freopen("sale.out","w",stdout);
int c,t;
cin>>c>>t;
while(t--){
int n,m,tem,ans=1;
cin>>n>>m;
for(int i=1;i<=n;i++){
ans*=2;
ans%=998,244,353;
cin>>tem;
}
cout<<ans<<endl;
}
return 0;
}
/*
998,244,353
int t=5;
while(t--){
cout<<91<<endl;
}
*/
HA-0120
sale.cpp
#include <bits/stdc++.h>
using namespace std;
int a[5005];
int main()
{
int c,t,n,m;
cin >> c >> t;
for (int i = 1;i <= t;i++)
{
cin >> n >> m;
for (int i = 1;i <= n;i++)
{
cin >>a[i];
}
int k = pow(2,n);
cout << k%998244353 << endl;
}
return 0;
}
tree.cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
freopen("tree.in","r",stdin);
freopen("tree.out","w",stdout);
cout << 9 << 13 <<endl;
return 0;
}
query.cpp
#include <bits/stdc++.h>
using namespace std;
int main()
{
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
cout << 18446744073709551603 << endl << 8 << endl;
return 0;
}
看得出来是真不会喵。
HA-0123
candy.cpp
//9:15 T1基本是没问题了
//9:30 T2样例7答案出乱码什么玩意?
//10:15 T2暴力炸了,尝试拿T3 m=2的情况
//10:40 T3T4特例都拿不了,我是FVV,继续啃T2暴力
//11:30 T2暴力搓不出来,先拿个5分吧
//12:00 T3特例A似乎解决了,8分
//12:30 maybe 100+5+8+0=113?
//12:55 113(估),燃尽了
query.cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
cout <<"NOIP RP++!";
return 0;
}
似乎拿到了 111pts,这么强喵。
HA-0126
candy.cpp
/*
代码寄存处:(所有代码都存还是太长了,只把模拟的CoT留在里吧)
第一版,要么超时要么Wa
暴力用优先队列模拟
Thinking
Thought for 20s
放弃,这么做没有逻辑也没有道理
略...
Thinking
Thought for 10min
让我们引入一个"最小和价"和"最小均价"的概念,如果某个x[i]小于最小均价,那么是可以买入的"优选品"
第二版,最后两个测试点差1
可能是逻辑稍微有一些问题 ,让我思考一下
Thinking...
Thought for 3min
斯,喵了个咪的不能这样算吧
略...
第三版,换了个顺序,按理来说这样合乎逻辑,但是似乎错的更多了呢
略...
第四版,这个代码能过大样例7,但是346都没过
略...
第五版,emmmm,这个代码只有测试点6是错误的
让我想想为什么
Thinking...
Thought for 20min
敲了超级多调试行(鬼知道我写这些中文调试行写了多久 )
在调试过程中发现好像有一个很不错的思路:
发现如果在前期买的糖"退掉"之后能再买到一份"最小和价"的糖,那么就能多买到一颗,这样做显然更划算
而且不难发现如果需要退掉两个及以上的糖的话要么不划算,要么没价值,OK开干
算了这个不删了,要是交不上去再删,万一发现了什么hack还能copy一下我的调试行调试
#include<bits/stdc++.h>
using namespace std;
using i64=long long;
const bool fileio=1;
const string filename="candy6";
int main(){
if(fileio){
freopen((filename+".in").c_str(),"r",stdin);
//freopen((filename+".out").c_str(),"w",stdout);
}
i64 n,m,ans=0;
cin>>n>>m;
vector<i64>x(n),y(n);
i64 minSum=numeric_limits<i64>::max(),minSumID=-1;
for(int i=0;i<n;i++){
cin>>x[i]>>y[i];
//minSum=min(minSum,x[i]+y[i]);
if(x[i]+y[i]<=minSum){
minSum=x[i]+y[i],minSumID=i;
cout<<"发现目前的最小值,其ID为"<<i<<",sum为:"<<minSum<<endl;
}
}
cout<<"最小和价:"<<minSum<<",最小均价:"<<(minSum/2)<<",对应的ID为:"<<minSumID<<",对应的x值为:"<<x[minSumID]<<",对应的y值为:"<<y[minSumID]<<"\n";
vector<char>isBought(n,0);
for(int i=0;i<n;i++){
if(x[i]<=floor(minSum/2)&&i!=minSumID){
cout<<i<<"价格低于最小均价,为"<<x[i]<<",应当买入一份,其对应y为"<<y[i]<<endl;
m-=x[i],ans++,isBought[i]=1;
}
}
cout<<"在\"梭哈\"之"<<"前,已经买入了"<<ans<<"份糖果"<<endl;
ans+=floor(m/minSum)*2;
m=m%minSum;
cout<<"在\"梭哈\""<<"之后,买入了"<<ans<<"份糖果,还剩的钱数为:"<<m<<endl;
vector<i64>tmp;
for(int i=0;i<n;i++)
tmp.push_back((isBought[i]?y[i]:x[i]));
sort(tmp.begin(),tmp.end());
for(auto tt:tmp){
//cout<<tmp[i]<<" "<<m<<" "<<(tmp[i]<=m)<<endl;
if(tt<=m){
cout<<"发现了还买得起的糖果,价格为"<<tt<<endl;
m-=tt,ans++;
}
else break;
}
cout<<"不考虑购买情况,从头来看小于剩余m的情况有:"<<endl;
for(int i=0;i<n;i++){
if(x[i]<=m)
cout<<"在"<<i<<"有x[i]="<<x[i]<<"已购买情况为:"<<(bool)isBought[i]<<(isBought[i]?",需要fallback到y[i]="+to_string(y[i]):"")<<endl;
if(y[i]<=m)
cout<<"在"<<i<<"有y[i]="<<y[i]<<"已购买情况为:"<<(bool)isBought[i]<<(!bool(isBought[i])?",由于未购买过,所以需要fallback到x[i]"+to_string(x[i]):"")<<endl;
}
cout<<ans<<"\n";
}
最后一版(喵?真的吗):
ok,最后一版的代码过了所有大样例,先去看看后面的题再回来hack
*/
怎么看这个调试代码有点想笑喵 awa(对不起)
HA-0127
query.cpp
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main() {
cout<<"Hello,World!"<<endl;
return 0;
}
Hello,World!
sale.cpp
代码里写了一些 %mod,但是他定义的模数是 MOD。
HA-0129
candy.cpp
//念往昔 我急旋慢转你抚琴低吟
//到如今 重唱此曲却已无你
//莫叹息 我再舞一曲你意乱情迷
//空余忆 良辰美景多可惜
//退役了,后会有期!某菱形网站id TitaniumDXD
超绝文笔喵!
是这个吗喵 qwq
HA-0139
tree.cpp
#include<bits/stdc++.h>
using namespace std;
int t;
long long n,m;
int main(){
freopen("tree.in","r",stdin);
freopen("tree.out","w",stdout);
cin>>t;
while(t--){
cin>>n>>m;
if(m==1){
cout<<n+1;
}if(m==2){
cout<<2*n-1;
}
else{
cout<<31;
}
}
return 0;
}
骗分领域大手子。
HA-0142
tree.cpp
#include "bits/stdc++.h"
int main(){
freopen("tree.in","r",stdin);
freopen("tree.out","w",stdout);
printf("9\n13");
return 0;
}
query.cpp
#include "bits/stdc++.h"
int main(){
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
printf("18446744073709551603\n8\n4");
return 0;
}
你和 HA-0139 坐一桌。
HA-0143
tree.cpp
#include<iostream>
#include<cstdio>
using namespace std;
int t;
int main(){
freopen("tree.in","r",stdin);
freopen("tree.out","w",stdout);
cin>>t;
while(t--){
cout<<0<<endl;
}
return 0;
}
你和 HA-0139 和 HA-0142 坐一桌。
HA-0144
tree.cpp
#include<bits/stdc++.h>
using namespace std;
int main() {
//freopen("tree.in","r",stdin);
//freopen("tree.out","w",stdout);
cout<<0;
return 0;
}
query.cpp
#include<bits/stdc++.h>
using namespace std;
int main() {
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
cout<<0;
return 0;
}
你和上面三个坐一桌。
HA-0145
candy.cpp
//woc luanjiadiantanxinyouhuajiuguole!!!%%%%%
翻译:woc 乱加点贪心优化就过了!!!%%%%%
HA-0154
query.cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen(".in","r",stdin);
freopen(".out","w",stdout);
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cout<<78964<<' '<<698<<' '<<3748098712;
return 0;
}
骗分至少要把文件名写上吧。
sale.cpp
#include<bits/stdc++.h>
#include<cmath>
#include<iostream>
#include<cstring>
using namespace std;
int c,t,n,m,a[5005];
int main(){
//读取和输出
freopen("sale.in","r",stdin);
freopen("sale.out","w",stdout);
//优化
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cout<<89057836<<' '<<49309887<<' '<<38231974<<' '<<347841;
return 0;
}
666 还有注释。
tree.cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("tree.in","r",stdin);
freopen("tree.out","w",stdout);
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cout<<894375<<' '<<98792;
return 0;
}
HA-0155
query.cpp
HA-0158
sale.cpp / tree.cpp / query.cpp
#include <bits/stdc++.h>
using namespace std;
int main(){
freopen("sale.in","r",stdin);
freopen("sale.out","w",stdout);
cout<<0;
return 0;
}
三个代码的区别只有文件读写不同。
HA-0161
query.cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
int q;
cin>>q;
return 0;
}
输入了,然后呢喵?
HA-0162
query.cpp
srand(n*q);
while(q--)
cout<<1ll*rand()*rand()<<'\n',srand(rand());
顶级随机数。
HA-0163
sale.cpp
string a1="6\n",a2="23\n32\n30\n23\n30\n28\n32\n32\n31\n31\n24..." // 后略
你以为只有两个字符串吗。
其实是十一个字符串,后十个的长度都和第二个相当。
这份代码总共 18.1KB。
tree.cpp
HA-0164
candy.cpp
//我常常追忆过去.
sale.cpp
//麻木了代码调不出来
//noip2025是我第一次打noip,应该也是最后一次.
//现在已经暴力都写不出来了
//或许我少了一些努力天赋运气
//祝自己退役快乐
//祝zys,zsj,lzr,wcx竞赛顺利,他们的路还很长
//AFO.
祝好。
HA-0168
candy.cpp
ll _min='INT_MAX';
试了一下,居然真的可以正确赋值。
HA-0171
查无此人。
HA-0176
candy.cpp
struct kfc
{
ll i1;
ll x;
ll y;
ll sum;
}a[100010];
我饿了。
什么今天居然不是星期四。
HA-0178
/*我要上noip迷惑行为QAQ
eofeofeofoeofeofeofeofeofeofeofeofeofeofeofeofeofeofeo
(在键盘上翻滚)
*/
满足你喵。
candy.cpp
/*
分析一下……
n种糖果,不限数量,按照奇数偶数购买
输入先奇后偶
总共m元
显然背包问题。使用动态规划
继续分析:
如果是纯粹完全背包:
for i 1~n
方程
V(i)表示价格
dp[i]=max(dp[i-V(i)],dp[i])
但是有奇数偶数(思考)
二维显然开不下(爬去看了下数据范围)
再分析其实只需要知道当前为奇数偶数
加个判断即可
加入变量c表示奇数偶数,0奇1偶
可以进行最小值运算时!c就行
哇是简单的第一题,我有救了QAQ
luogu灰名能交题解吗qwq没试过欸
小R少吃点糖吧(被打
等会……n*m有点多
完了QAQ不至于贪心吧
好了背包写完了
发扬暴力枚举精神(被打
数据看起来像是有数学解
大脑旋转)
其实只需要买价格最低的就行
此时的限制条件是奇数偶数不同
对于所有的糖果,购买当前最便宜的
emm如果奇数偶数相加最小完全可以除
最后的那部分看看有没有特别小的数往里面填
背包:世界抛弃我~
好耶欢迎来到真正的第一题:P
消耗一张草稿纸)
对于xi=yi
无脑最小除 √
对于xi>=yi
选总和最小的 √,最后看看还能不能放
能放就继续放,不能就算了
对于xi<yi
先选择左边小的,不能选后:
选总和最小的,最后看看还能不能放
啊???一遍过??
好吧被骗了QWQ
第三种情况不对
等会看看
先去看后面题了byebye
还有3个小时
// ...
*/
可爱喵。
query.cpp
主函数除去文件读写外的第一行是 cin>>n;。
但是他并没有定义 n。
HA-0185
query.cpp
cout<<(a[i]^i)%18446744073709551616;
何意味喵。
HA-0188
tree.cpp
/* |
O "你还有何话讲"
[ ] "再无话讲,请速速动手"
O ||
[] 茫茫世事无穷尽,唯留青史任人说
*/
再无话说,请速速动手!
HA-0198
query.cpp
unsigned long long int ans = k[1] % 8446744073709551616;
for (int i=2;i<=n;i++) {
ans = ans xor ((i*k[i]) % 8446744073709551616);
}
HA-0206
变量名或类型名包含了:merry、umy、ruru 等。
666 还有 vup 吃。
HA-0207
同 HA-0171,查无此人。
HA-0209
candy.cpp
/*
...
不知道过没过,感觉时间复杂度不太对,9:51才写完,但感觉对于一个正在发低烧的人来说已经不慢了/youl
*/
要好好休息哦喵。
HA-0210
sale.cpp
for(int i=1;i<=n;i++) {
ans*=2;
ans%=998244354;
}
998244354 是什么喵?
HA-0212 / HA-0213
同上,查无此人。
HA-0214
sale.cpp
代码里没有一行注释,但是文件大小达到了 13.1KB。
HA-0217
query.cpp
#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
cout<<"BEST WISHES TO MYSELF"<<endl;
return 0;
}
BEST WISHES FOR YOU。
HA-0219
candy.cpp
/*
嘶嘶嘶嘶嘶嘶嘶嘶嘶嘶嘶嘶~
一条蛇划过
-——-————————————---
oioioioioioioioioioioi---------
*/
sale.cpp
//I am sad
//zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
//晚安
//Good Night。
喵?
query.cpp
//ccfccfccfccfccfccfccfccf
//luoguluoguluogu
//回家玩星露谷算了、、
//烦鼠了
//shushuqushile
//abababababababababababababab//
//aishangccfshisuming(bushi?
//// xx
星露谷领域大神。
HA-0220
sale.cpp
bool cmp(Edge a,Edge b){
return a.wei>b.wei;
}
struct Edge{
long long wei;
int id;
}sum[10];
HA-0231
sale.cpp
/*
2.00h:try n<=5
2.25h:crash
please put in text here
3.50h:trying
4.33h:TL
*/
Please put in text here。
tree.cpp
/*
2.67h:toilet
2.83h:hyw
3.41h:inspired
4.00h:pressure!
*/
//RP++
// ...(接下来是一百多行空行)
/*
We need more <NOIP_2025_HA confusing_action_display>
<bits\stdc++.h><bits/stdC++.h><bit/stdc++.h>>
freopen("tree.in","w",stdin);freopen("tree.in","w",stdout);freopen("tree.out","r",stdout);freopen("tree.out","r",stdin);freopen("tree.out","W",stdout);
AKIOI
hyw
PM Testify 1002221
f*** **F
*/
要素过多。
query.cpp
/*
1.50h:try n<=1e3 && q=1
2.00h:track lost
3.75h:trying
4.25h:basicly complete n<=1e3 && q=1
*/
//Where could I stay?I ask myself.
Track Lost。
HA-0232
sale.cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
freopen("sale.in","r",stdin);freopen("sale.out","w",stdout);
int c=read(),t=read(),a=read();a=read();
if(c==0){
if(t==1)cout<<6;
if(t==1000)cout<<23<<endl<<32<<endl<<30<<endl<<23<<endl<<30<<endl // 下略
if(t==500)cout<<586<<endl<<963<<endl<<585<<endl<<959 // 下略
if(t==110){
if(a==2)cout<<688111880<<endl<<720729896<<endl // 下略
if(a==212)cout<<259877640<<endl<<114253751<< // 下略
}
}
return 0;
}
这份代码有 18.7KB。
HA-0237
query.cpp
namespace case1{
// ...
}
signed main()
{
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
ase1::solve();
return 0;
}
请输入文本。
HA-0244
sale.cpp
if (n<=10)
{
dfs(1);
printf("%lld\n",ret);
}
else
{
printf("This is so dificult,I can't did it.\n");
}
This is so dificult,I can't did it。
HA-0245
query.cpp
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
freopen("query.in","r",stdin);
freopen("query.out","w",stdout);
return 0;
}
请输入文本。
HA-0248
sale.cpp
//这次是我发挥最差的一次比赛
//原来我在不断创新低啊,一次比一次差
//被t2给卡死了,也是神人了
//8:45切掉t1,然后就看t2,然后没写出来,呵呵呵
//可能本场唯一的码量就是可能被卡常的t4了吧,谁知道出题人卡不卡O(nlenlogn+nqlogn)哪?更何况我还上了一个线段树、
//最好的估计:100+24+8+45,不过基本上100%挂分,连个省一都捞不着吗
//如此状态,如何中考?
//不知道远在广西的zbr大神AK了没有,反正我是可以退役了
为什么你们都会 T4。
HA-0256
candy.cpp
//freopen
//luogu : yueluoxingchen
//第一年进NOIP就遇到了神秘小孩,看身高感觉像xxs
原来你就是 yueluoxingchen。
query.cpp
#include<bits/stdc++.h>
#define endl '\n';
using namespace std;
int a[10];
int main()
{
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
//freopen("query.in
ccf please give me more points!
ccf I love you!
return 0;
}
CCF LOVER。
HA-0263
candy.cpp
// never gonna give you up never gonna let you down
怎么还有诈骗喵。
HA-0265
candy.cpp
/*
~一道橙题~
完了完了NOIP要爆零了怎么办?
唱几首歌证明来过?
//freopen("candy.in","r",stdin); 钓鱼
戏一折 水袖起落
唱悲欢 唱离合 无关我
扇开合 锣鼓响又默
戏中情 戏外人 凭谁说
惯将喜怒哀乐都藏入粉墨
陈词唱穿又如何
白骨青灰皆我
乱世浮萍忍看烽火燃山河
位卑未敢忘忧国
哪怕无人知我
台下人走过 不见旧颜色
台上人唱着 情碎离别歌
情字难落寞 她唱需以血来和
戏幕起 戏幕落 谁是客
你方唱罢我登场
莫嘲讽月戏 莫笑人荒唐
也曾问青黄 也曾铿锵唱兴亡
道无情 道有情 怎思量
道无情 道有情 最思量
*/
可能是这个?HITA - 赤伶
//猜难度:绿蓝紫黑
//猜对了就求上迷惑行为大赏
其实猜错了也会上迷惑行为大赏。
sale.cpp
/*
一年四季的更替
竹篱下的乱花影
温柔的风刚过季
像还在自己家里
故乡的那一封信
是谁在不问归期
酒馆的老伙计也有
思念瘦的回忆
烛灯下的旧情 意谁理
西窗外的良人 泣不易
举杯 谁和明月提起
她在远方等你
等你 在落下几笔
等你 再弹奏几曲
等你 再回到故里
等你 金榜把名题
砚上三五笔
落寞遮鸪啼
谁识曲中意
断弦等你系
哎呦小情郎你莫愁
此生只为你挽红袖
三旬酒过月上枝头
我心悠悠
哎呦小娘子你莫忧
待到春来又雪满楼
不负天长不负地久
你我白首
*/
大概是这个?黄龄 - 鸳鸯戏
tree.cpp
/*
时常梦我 染上相思轮廓
你生炉暖火 斟暖我心窝
雨打蕉叶 胜过美人坡
在泼墨画里 鱼儿也快活
时常梦到 是否梦到过我
爱恨我了然 而缘很稀薄
二胡声唤你 隐去江南
我为你挥毫旧谣一番
姑娘一句春不晚 痴儿留在真江南
江南曲落孤城 化作烟雨 与我对谈
姑娘一句冬不寒 痴儿踏过万重山
期待我们的歌 轻声叹
为啥总感觉我哪里唱错了 -_-||
*/
也许是这个?郑浩 / 冰洁 - 春不晚
query.cpp
/*
庭中梨花谢又一年
立清宵 月花洒 空阶
梦里笙箫奏旧乐
梦醒泪染胭脂面
小重山 念一遍又一遍
问 更漏咽 频教前尘辞长夜
久无眠 深坐对 宫檐
多情最是春庭雪
年年落寞离人苑
薛涛荐 上言若如初见
这一世 太漫长却止步咫尺天涯间
谁仍记 那梨花若雪时节
我心匪石不可转
我心扉席不可卷
空凝眸 情字深浅无解
*/
好像是这个?橙翼 - 春庭雪
古风领域大手子啊。
HA-0266
tree.cpp
/*
000
//freopen
feropen
freopne
afo/ll
我常常追忆过去。
中间忘了。
我该在哪里停留?我问我自己。
recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall!
recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall!
recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall!
recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall!
recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall!
recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall recall!
rrrrrrrr eeeeeeeeee cccccccccc aaaaaaaa l l
r r e c a a l l
r r e c a a l l
r r e c a a l l
rrrrrrrrrr e c a a l l
r r eeeeeeeeee c aaaaaaaaaa l l
r r e c a a l l
r r e c a a l l
r r e c a a l l
r r e c a a l l
r r eeeeeeeeee cccccccccc a a llllllllll llllllllll
12:17。
/ll/ll/ll
YatohgamiTohka
TobiichiOrigami
Kurumi
DATE A LIVE
Genshin Impact
299133621
Luogu:718169
By __int127
。
Yy:喵
Why?
*/
原来是追忆大手子 __int127,失敬!
HA-0268
tree.cpp
/*
Hi! HA grade 9
This is my log.
day1.pdf
176 KB
D:20251127222446+08'00'
LaTeX with hyperref
xdvipdfmx (20250205)
9:18 DONE T1 70pts
9:49 It seems that there is something wrong in the expliation of sinple 1 of T2.
11:30 I got 5pts from T4;
12:23 I can't understand what is T2's meaning.Did we learn the same Chinese?
12:23 Why is there a bug in my code of T3?
It is a dream,and it's the time to wake up.
*/
九年级,这么强?!
封神榜
单题代码长度最长
Rank 1:HA-0155 / query.cpp:202KB。
Rank 2:HA-0100 / query.cpp:30.6KB。
Rank 3:HA-0078 / candy.cpp:21.0KB。
Rank 4:HA-0232 / sale.cpp:18.7KB。
Rank 5:HA-0163 / sale.cpp:18.1KB。
单题代码长度最短
Rank 1:HA-0175 / sale.cpp:142 字节。
Rank 2:HA-0142 / tree.cpp:147 字节。
Rank 3:HA-0144 / query.cpp:149 字节
Rank 3:HA-0211 / tree.cpp:149 字节。
Rank 5:HA-0158 / sale.cpp:153 字节。
Rank 5:HA-0158 / tree.cpp:153 字节。
追忆过去次数最多
Rank 1:HA-0266:153 次。
Rank 2:HA-0045:1 次。
Rank 2:HA-0231:1 次。
后记
这次尝试了另外一种迷惑行为大赏的表现方式,欢迎提出意见喵 qwq
开合环节欢迎在评论区补充喵。