NOIP 2024 BJ 迷惑代码大赏

· · 休闲·娱乐

注:BJ 的程序回收系统跟其他省的不一样,是在一个网站上提交程序(类似洛谷 OI 赛制),所以不会出现文件名错误的情况。

BJ 共 562 名选手。

//freopen( 共在 4 个文件里出现,还有

`"r",stdout` 共在 $1$ 个文件里出现。 `"w",stdin` 没有出现。 `AFO` 共在 $6$ 个文件里出现。 `love` 共在 $11$ 个文件里出现。 `fuck` 没有出现。 `IAKIOI` 和 `I AK IOI` 共在 $2$ 个文件里出现。 `luogu` 共在 $2$ 个文件里出现。 `qwq` 共在 $11$ 个文件里出现。 `npy` 没有出现。 `CCF` 没有出现。 `genshin` 共在 $3$ 个文件里出现。 ### 1. `freopen` 写错默哀 BJ-0068 ```cpp freopen("traverse0.in", "r", stdin); //freopen("traverse.out", "w", stdout); ``` ### 2. 爱情请给予我力量 BJ-0160 ```cpp mt19937 rng1(20071019),rng2(20080416); // Love shall bring me luck. ``` ### 3. cin love out BJ-0510 ```cpp #define cin lyc #define cout lmy //cin love cout ``` ### 4. 留名 er BJ-0093 ```cpp /* I'm BJ-0093,luogu 612567,Kazeno_Akina 这t1出题人怎么这么喜欢分讨,季风就你出的吧.jpg 路上一个sdsz都没看见,大失败!! 不知道 keatsli 写的咋样了。 */ ``` BJ-0047 ```cpp // 寄了,留个名吧,luogu id: creation_hy // 确实挺难的,后两题正解都没什么思路,唯一可惜的是最后两个半小时就拿了44分 ``` ### 5. T4 怎么是元神??? BJ-0001 ```cpp /* g++ t1.cpp -o t1.exe -O2 -std=c++14 -fsanitize=address,undefined -Wall -Wextra; ./t1.exe ulimit -v (KB) ulimit -s (KB) 后排的老哥进场先找到了蜘蛛纸牌开始打还是很绷不住的。 键盘疑似有点难用。( traverse 怎么发了12个样例、哈人 测小数据,打对拍,Aal izz well! *** t1:考虑贪心,能填就填 t2:8:40 考虑不行的方案:一串限制构成一个链,链的开头是一个确定的x,链的末尾是一个确定(且和指定不符)的x时不行 或者两个不同的值赋给了一个x 按照x升序,乘法原理计“好链个数”即可 g++ t2.cpp -o t2.exe -O2 -std=c++14 -fsanitize=address,undefined -Wall -Wextra; ./t2.exe t3: 10:21 这啥玩意。??? t4怎么是元神??? 好像我只会nlog^2n 急了 大样例过了!! 所以正解是nlogn还是nlog^2n草过去啊 感觉转化后的问题就是整体二分板子的说 g++ t3.cpp -o t3.exe -O2 -std=c++14 -fsanitize=address,undefined -Wall -Wextra; ./t3.exe g++ t4.cpp -o t4.exe -O2 -std=c++14 -fsanitize=address,undefined -Wall -Wextra; ./t4.exe g++ Sgt.cpp -o Sgt.exe -O2 -std=c++14 -fsanitize=address,undefined -Wall -Wextra -Wl,--stack=1073741824; ./Sgt.exe 别挂分啊……一道题都没有对拍(( 虽然大样例是过了的没错… */ ``` ### 6. 逆天 BJ-0103 ```cpp #include <awa.h> #include <ymq.h> #include <efao.h> #include <txf,h> #include <lqy.h> #include <zcy.h> #include <zax.h> using namespace sido; int mian() { /* ۴l\E9SҎq\CD\C8\FD\87*ʚ\9Ed.\8AK\EB\B5\CDsdf\9D\DBN\A8\90x\E2G8\E8C\91C\E3x_\EB\F4j\8D\FD=̞\9FPN\84\EC\CE$N_\B2\87"4\A2۷\F3\B7\BE\FF\BA++\C97\BB\95\9F\CE I\90\9A\C0\FEN\EF\AD\C0(q}\AB\90/\DDƓЦ\C4\EAN\E2,ͷ\C8jR\8D%\EE\82ڎ5\FEp\D3J\A5\BFEF\82A\E8\C4\F2\83\85\F85RZy\A7\F3\88\A3\FF\96\C5%_\D8 \9A\A2+~\EAh\B6Q&\F1t\F5\CF\E0<\94\81\CD; U\8C\D8?>\D7B?_\B9\96\ED\F3\C3% O/ʬ\FD|߁Tł\9E\BD:ɐ \EB\FD\E4供%W\F8v\FF\B7\CE\D3F\B4?\8E\CC)%\D7\D4\C6\F8(\CAYp\CD8\DF72\F3V\84`\DEcKj\8B\C4 \83r\9A\ED`1oyþq\F8j\89t#8\8E\B2m`\94\A0V|VLL26K'P\C7T\C4\D3ڊ\B7cHw\C4\C6ԣt\9C\A4\EE\C9[\DB\00\F3w\CBlh1\B7\C1/Sw\CF:v\B1Rϔ}\D9]LO\93\9B\8B\A5f\E2H\C9S\AA\9A\D \83r\9A\ED`1oyþq\F8j\89t#8\8E\B2m`\94\A0V|VLL26K'P\C7T\C4\D3ڊ\B7cHw\C4\C6ԣt\9C\A4\EE\C9[\DB\00\F3w\CBlh1\B7\C1/Sw\CF:v\B1Rϔ}\D9]LO\93\9B\8B\A5f\E2H\C9S\AA\9A\D\83r\9A\ED`1oyþq\F8j\89t#8\8E\B2m`\94\A0V|VLL26K'P\C7T\C4\D3ڊ\B7cHw\C4\C6ԣt\9C\A4\EE\C9[\DB\00\F3w\CBlh1\B7\C1/Sw\CF:v\B1Rϔ}\D9]LO\93\9B\8B\A5f\E2H\C9S\AA\9A\D\83r\9A\ED`1oyþq\F8j\89t#8\8E\B2m`\94\A0V|VLL26K'P\C7T\C4\D3ڊ\B7cHw\C4\C6ԣt\9C\A4\EE\C9[\DB\00\F3w\CBlh1\B7\C1/Sw\CF:v\B1Rϔ}\D9]LO\93\9B\8B\A5f\E2H\C9S\AA\9A\D */ return 114514; } ``` ### 7. 看不懂 BJ-0208 ```cpp /* # Wfz chf-jze > Ctv xrmu govoh ulbc fpfn zsz esn ambdjok uljb cmyt, M iewn umgtfe fxez. Kcu, jx jw fpabi sfeijrh. BGS, airdq prjhmsbpmh line gvtn BOL (Bwbz Kssn uqm Kfzftsh -> ojvf yu), ojwimlz, jwiocvjtmy, hjgmojuntz, derf ux vg mjoh xlfw R gistx migc cpf fyerjrbcjxv asfe pj LTY-T 3169. Bludimlz, spx cin uinf qfju, rb wbt yii cjvm tibx fbbv bbbrufh. Cbgp xp uqm vfsc cihrowqog, M gmtc tvpw dsrqyuns ebs bftvx 3-4 zebsw ppe, ytbyfe f kbvf wo b hnto, po xhjdl ulf njqo diewbguns'a nbni xet Exzb. Gssr xino wo, ulj qpaf Q kopa bfpdu qu, ulj qpaf Q lpwi jx. Ox uhf eqhssruqu aoe TJ, kvc uhf gjsxbronat pg nu. Ru ejlm rjwis enafru qj ss dxvgutf rf (kvc tonfxnnit, amblmz, miu nn eoxo). Emu nzsost foh fbavjnht dpy nolwvnufvje jwux dao'x ci rub gavmx. Mu dxcmd ci nmtlpwnjgvsii ss ija tif bssop emssjpr pj cin bpqmmhbxjxo (uopmw / qappzbmt). Cvx jx rt ap dfvybmo. Qcnao xmfqtnmemt bsi osu dnzuajo foh cing cbo jbwjuz njne szu txnn qauuiwow kfqqod ulj hbcb. Ioxfzjs, cing asf xp tupf bne gfo njln nituepfw johbjmf. Yii lpvxvtfsw bvf oxb, uiid esn lmstbjr bre uqct, gexu. Obbb bvu "txvyjm". Tuyujh kvc duuf, J kxjwme uii bphxsrbim uvfjrjwh bfan, spx afjtmy bmrt ux cpf Pmcrqmdb. Ejti qd tbbtrwo, J mbzf oxb bbe xdssn jb fjswy. Tx dvgosuysbxfuz, J qbwxfh cin oex'w fbbv jve cfgfni xon pf ulj sgodrim nfqgfvt jw uhf SN. Vopnli xuqms Pmcrt, XJ iod Bwyssojnh brf xmf ufp eiidi wfqbronl pvsi. M vfjv, uiiwf xrmu oo txzeioct eio xesu ux ruqrpwi ulfrs vprnbp-tgixpu tuckihuw sprv OJ: Nuw buhtf jt vvmun ois gssr xin bccjfdx pj Roowsmbumto bwe Bfciosqpkz bwl tifvj mt ox oefe yp jvqawwe jx. Uisxf xqp zfmbjrje xnsn uamfryfh xs xbstjssbxfm xvf. Ipajwis, yitsjpr xmmu oiee, xfmioc ra ioweqjh: uqm pptx prf jb kutu yii ndqw og xmf qafeqput ssf gxs uf. Tp ubwtrpw bne mrbkjwbcqpn xmqm gjen, bvu yieu exmt opx nibw cpbt J bjpm tjg-gpphgz ux yzpgsbq eitrhwqog. M uljwl Q lpwi ulf qawkedu toi. Ju nt ijsm uo ted aiju Q ljli. Jsxn kpdjok us fsrbjnh, yiio hx uo dsrqstrop. Csbjyjrh njgce, hwbajwh Q iouise ux, jvt genmh. J jtvre uqiu J wtniurnna wjmp qmdt dx a qvtkidc cep ps yivfn hmbrt pfuis bwl svqvntmopmh topo rbhf haiue qvthvfbt. To nedci xo i hpuhfz jw 1837, ctv djo njne xmbx R qiwe BGje bw WWJ/OUWH tsxcumn, ulfu't nnio J lfwi yjlsfd jx vt. Uiszhl, Jc nihix kytc ccsnfe tvx cijb mz ehdsvwu ebs txtmio, cwp. */ ``` ### 8. 时钟出错 BJ-0469 ```cpp /*16:28 吃完早饭了。 39 好像会t4,不确定,先写A 。 18:11 AB写完了,大样例都过了,写了D 的暴力。 20:19 C过了所有大样例,不打算继续想D,准备写拍子。 20:43 拍出错了,没特判n=2,改了。 */ ``` ### 9. 现编游戏 BJ-0514 [代码过长,移步剪贴板](https://www.luogu.com.cn/paste/fuzkimal) ### 10. AFOer BJ-0004 ```cpp /* author: honglan0301 sexy_goodier_xiaoqing tangshi_xsap goodier didi123 mc123456 xsap HYX1124 wuyouka JiaYou!!!!!!!!!!!!!!!! flying bunH2O 1437vszombies... Jiayou!!!!!!!!! last dance~ */ ``` BJ-0103 ```cpp /* dang me cant solve a single problem ill just AFO like this and i hate jzs forever */ ``` ```cpp /* really sad result for my last noip cant solve a single problem have trouble on understanding the task estimated score 40+0+4+0=44 such a bad result since i got 70 in my first NOIP anyway,my OI life finally cames to an end. AFO. */ ``` BJ-0147 ```cpp /* Welcome to NOIP 2024! The Finale. Hope I can get at least 100 points! Also, If someone , I mean if your name starts with a C and ends wish an H. Hello. :) I will write my oi journey in the last of the code, but not here. I will write solutions here. UPD: I WILL NOT THIS IS SO HARD AHHHHHH Wow, this seems to be easy. Given two bit-string with length of n, Some can be operated, some can not. Show that at most how many chars can appear in the same place. Hmm, we can deal in these segments huh? We found that it is same to make them pair at the beginning or at the end. Thus, we break it down to segment first, and then... I dunno uhh We define: that every segment start with a number WITHOUT edit = 0, and always ENDS WITH edit = 0. ... Harder than I thought... Lets first break down into segments. Oh shit what am I thinking about just use two arrows.... Just enumerate a, 最特殊的情况,两个的间隔不超过1. 我们这样处理,每次都会有若干种状态 状态一:两个都没到箭头 状态二:下边的过了箭头,但是上边的没过 状态三:上边的过了,但是下边的没过 我好像理解了 这个东西的区间只能一直包含一个箭头,要不然太麻烦了 马的,好难调啊。 我佛了,我不调了,七年OI止步于此,没认真学导致的。 */ ``` BJ-0553 ```cpp /* //freopen("traverse.in","r",stdin); //freopen("traverse.out","w",stdout); Ohhh...I think that I found the 48pts solution,but I can't debug!(big-example is to big)I can just get 24 pts(maybe less than 24). I hadn't get level 7 in CSP-S.The level 7 is 221 pts,but I'm just 220. I hope I can get level 7 and get into next round. Grade 9 is to tired...I hate whk. NOIP will stop at 13:00,but our school let us do english listen-read exam at 13:30.What can I say?(Manba out!) Hope I will goto sdsz in grade 10.Hope I will get 1=. My rks stop at 15.26.How can I increase it? How can I dowaload minecraft(not netease but microsoft) in apple system? 23 minutes left......I don't know what I should do? I think my T1 code is allright,but I can't say that my solution is right.But it AC in all big-example. T2 is no problem,but T3&T4 I just have 56 pts.I don't think I can found right 100pts solution,but I can't find any solution that pts is higher than now. Maybe I should preview English?No...it's impossible. Just left 16 minutes...... Maybe I will AFO. Love xyc forever. */ ``` 如果你认为你的代码足够迷惑,那么欢迎在下面评论区或私信找我投稿。