版本比较
BJ-J迷惑行为大赏
正文
增加 1343 行删除 0 行
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127987 行未改动全部展开11151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340今年 BJ 一共有 2071 位选手。
## 数据统计/省流
有 79 份代码包含一共 258 个 `//freopen`,有 7 分代码包含一共 8 个 `// freopen`。
有 8 份代码一共包含 11 个 `迷惑行为`。
有 8 份代码包含一共 34 个 `love`,其中有 1 个是我写的。
有 4 份代码包含一共 4 个 `CCF`。有 7 份代码包含一共 8 个 `AK`(全匹配),其中有 1 个是我写的。
有 24 份代码包含一共 26 个 `Luogu`,其中有 4 个是我写的。
有 3 份代码包含一共 3 个 `you have no egg`。
有 1 份代码包含一共 1 个 `cout<<r<<c`,有一份代码包含一共 1 个 `cout << n << m`,好在他们的代码都没过编译。
有 1351 份代码包含一共 9254 个 `//`,即注释。其中有将近一半的 `//` 由 `BJ-J00091\polygon.cpp` 贡献。
---
**代码文件大小前 30**:
```bashFullName Size(KB)-------- --------BJ-J00837\xor\xor.cpp 100BJ-J01828\polygon\polygon.cpp 96.19BJ-J00091\polygon\polygon.cpp 94.35BJ-J00592\number\number.cpp 59.9BJ-J00793\polygon\polygon.cpp 49.41BJ-J01663\polygon\polygon.cpp 48.72BJ-J00036\polygon\polygon.cpp 48.29BJ-J01311\polygon\polygon.cpp 35.17BJ-J01024\polygon\polygon.cpp 28.69BJ-J00080\polygon\polygon.cpp 25.74BJ-J00818\polygon\polygon.cpp 22.76BJ-J00016\polygon\polygon.cpp 21.35BJ-J01244\polygon\polygon.cpp 20.5BJ-J01608\polygon\polygon.cpp 18.88BJ-J00950\polygon\polygon.cpp 16.59BJ-J01145\polygon\polygon.cpp 16.43BJ-J00600\polygon\polygon.cpp 16.25BJ-J00922\xor\xor.cpp 11.55BJ-J00089\polygon\polygon.cpp 11.05BJ-J01317\xor\xor.cpp 10.09BJ-J01131\number\number.cpp 9.39BJ-J01317\polygon\polygon.cpp 9.16BJ-J00876\polygon\polygon.cpp 9.02BJ-J01469\polygon\polygon.cpp 8.93BJ-J01868\xor\xor.cpp 8.5BJ-J01789\polygon\polygon.cpp 8.19BJ-J01537\polygon\polygon.cpp 7.89BJ-J01317\seat\seat.cpp 7.44BJ-J01003\xor\xor.cpp 7.12BJ-J01948\polygon\polygon.cpp 7.07```
你可以在 windows-powershell 中使用如下指令生成上表:
```bashGet-ChildItem -Recurse -Filter *.cpp | Sort-Object Length -Descending | Select-Object -First 20 FullName, @{Name="Size(KB)";Expression={[math]::Round($_.Length/1MB, 2)}}```
**代码行数前 30**:
```bashFullPath Lines-------- -----BJ-J01828\polygon\polygon.cpp 2310BJ-J01024\polygon\polygon.cpp 1606BJ-J01311\polygon\polygon.cpp 703BJ-J01131\number\number.cpp 627BJ-J00818\polygon\polygon.cpp 611BJ-J00036\polygon\polygon.cpp 597BJ-J00080\polygon\polygon.cpp 570BJ-J01522\polygon\polygon.cpp 540BJ-J01244\polygon\polygon.cpp 508BJ-J00016\polygon\polygon.cpp 465BJ-J00600\polygon\polygon.cpp 450BJ-J00876\polygon\polygon.cpp 316BJ-J01469\polygon\polygon.cpp 301BJ-J01868\xor\xor.cpp 251BJ-J02018\polygon\polygon.cpp 239BJ-J00950\polygon\polygon.cpp 237BJ-J01792\polygon\polygon.cpp 225BJ-J01948\polygon\polygon.cpp 224BJ-J01789\polygon\polygon.cpp 218BJ-J01317\xor\xor.cpp 218BJ-J01018\seat\seat.cpp 216BJ-J01608\polygon\polygon.cpp 211BJ-J01859\polygon\polygon.cpp 211BJ-J01376\xor\xor.cpp 208BJ-J01537\polygon\polygon.cpp 199BJ-J00167\xor\xor.cpp 197BJ-J01733\polygon\polygon.cpp 193BJ-J01317\polygon\polygon.cpp 190BJ-J00463\polygon\polygon.cpp 190BJ-J01145\polygon\polygon.cpp 189```
你可以在 windows-powershell 中使用如下指令生成上表:
```bashGet-ChildItem -Recurse -Filter *.cpp | ForEach-Object { $lineCount = (Get-Content $_.FullName | Measure-Object -Line).Lines [PSCustomObject]@{ FullPath = $_.FullName Lines = $lineCount }} | Sort-Object Lines -Descending | Select-Object -First 30```
---
对于非注释的代码,我随机看了 200+ 人的代码后发现:
T1 有很多人看起来没学过 char,会写 10 个 if 来判断一个 char 类型的变量分别等于 `0`~`9`。
T4 有一些神人写四五百行的代码,原因是只会写 for 循环嵌套而不会写递归。
## 关键词### //freopen
有 79 份代码包含一共 258 个 `//freopen`,其中非整活的有 31 人:987 行未改动全部展开
```cpp//rp++;ak++;```
### Luogu
有 24 份代码包含一共 26 个 `Luogu`,考虑到基本上都是 uid,所以我们就把所有写了 uid 的用户/团队的链接放一下吧:
- [kn_wlq](https://www.luogu.com.cn/user/753554)- [Bright12077](https://www.luogu.com.cn/user/533708)- [Texas_the_Omertosa](https://www.luogu.com.cn/user/1145476)- [lml0928](https://www.luogu.com.cn/user/775549)- [Linda0417](https://www.luogu.com.cn/user/1318015)- [linda0471](https://www.luogu.com.cn/user/1641551)- [sbno333](https://www.luogu.com.cn/user/416975)- [GWBailang](https://www.luogu.com.cn/user/559442)- [xiaoBtx](https://www.luogu.com.cn/user/1629393)- [[team]信奥铁三角](https://www.luogu.com.cn/team/80057)- [mcturtle](https://www.luogu.com.cn/user/823830)- [Heart_of_Iron](https://www.luogu.com.cn/user/884813)
#### BJ-J00021\polygon
```cpp#include<bits/stdc++.h>using namespace std;int main(){freopen("polygon.in","r",stdin);freopen("polygon.out","w",stdout);cout<<"0";return 0;}//luogu uid 753554 ka qi pa da shang de feropen cin<< cout>> using namepsace sdt```
#### BJ-J00257\polygon 时代【】
有如下注释:
```cpp/*时代 CCCCCCCCCC CCCCCCCCCC FFFFFFFFFFFFF CCCCCCCCCC CCCCCCCCCC FFFFFFFFFFFFFCCC CCC FFFCCC CCC FFFCCC CCC FFFFFFFFFFFFFCCC CCC FFFFFFFFFFFFFCCC CCC FFF CCCCCCCCCC CCCCCCCCCC FFF CCCCCCCCCC CCCCCCCCCC FFF我们喜欢你
求你数据水一点样例再强一点
author:uid=533708(luogu,Bright12077)转载请在洛谷私信我后著名你的文章链接,并在文章中著名原作者
A long long time ago,there was a man called Kay Silva, whichhis Chinese name is Kai Xi'erwa. He was good at sport, and histalent was discovered by his parent since he was 3. His parentlet him run 50 meters in order to test his running skills.Unquestionably, he finished running with a very short time whichis approximately 5 seconds. His parents was shocked with hisscore. They thought that Kay could do exercise very well, sothey decided to sent him to a sports school rather than a normalschool. After he entered the sports school called 'Beijing No.114School', his incredible talent on sport made him very confident. The school taught him a lot, and his 50 meters running canreach 3 seconds and 2147483678 meters running can reach42.94967296 seconds. But he had to leave school after he was 18.During that time, there is no university can teach physicaleducation, especially none of them can teach a such goodstudent. So he had to join the army. G.T.I.(Global Threaten Invaluable,全球反恐无价之宝(其实是特勤组))was a popular army in America, but the requirement was reallyhigh. As we known, these can't beat Kay down, and he enteredthe group easily. In G.T.I., he met many friendly people such asYuhao Wang, Roy Smee, Zoya, Luna Kim and Xiaowen Mai. They usedto do tasks together, and soon became friends. But after several months, in a task which they had to fightwith Anais Desmoulin who can use her M700 very well and have twoXiaomi Su7 to help her defend outsiders, his leg was broken bya bullet from Desmoulin. Although Roy saved him, but he can notmove at all. 'You can try to make a pair of steel legs which isjust like mine!',Wang said. Of course, the only way to make himmoving again is to build a steel exoskeleton. But he had neverbeen to a school which can teach him those basic subjects. So hehad to read a lot of books, and try many ways by himself. Theseprocesses took him about 1 year, but finally he made aexoskeleton successfully. Now, he could run as usual. The exoskeleton is made from alloy, so it is harder to bedestroyed. He won many wars with his exoskeleton. But in during a war called 'Valley', his best friend YuhaoWang was gone because he wanted to destroy several tanks fromenemy. The result is that he destroyed them successfully, buthe can't move anymore because enemies shot his leg and then hedied because of the exploding of C4. Silva was very angrybecause of the behavior of enemies, he shouted and lead othersoldiers fighting with enemies. They won the war, but his friendwas gone, forever. He tried to collect Wang's story, and wrote a book.The bookbecame very popular. He felt very bad after Wang died, and he did not go out forany tasks during that time. When he became better, he tried todo a task about doing researches in 'River Valley'. Before thetask, he made 2 C4 in order to help him finish the task. Although he looked better, he still wanted to suicide, andthis task was the best excuse for him. He put C4 on his body.3 seconds later, after C4 exploded, he died, with the same wayof Yuhao Wang. Roy and Zoya tried to save him, and worked ashard as possible, but he still couldn't wake up. He might meethis friend Yuhao Wang in the heaven, and I, wish they can byglad to meet each other.
--- I'm sorry that there may be several grammar mistakes in thearticle. If you find some of them, please tell me, and I willimprove my English skills as well.
*/```
#### BJ-J00319\polygon
```cpp// T4 我猜是前缀和// 我不会aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa// Luogu uid:1145476
/*游记:现在是 11:40:02 我已经对剩余两题不报任何希望了。考试的机子很慢,虚拟机卡的要命。(东坝考场)
预估 100+100+50+8 = 258会有2=吗
以后大概率不会再弄OI了,尽管我才初二。whk的压力一直很大,数学炸的十分严重。考完CSP-J周一就是期中,根本没有任何复习。总归是要中考的,没办法。只能祝自己期中加油了。
我的屋子里没有蟑螂,当然也没有舟批。
不知道以后的自己会如何看待现在的这个游记呢
我觉得不遗憾*/```
#### BJ-J00440\number
不行你得上:
```cpp/*luogu & CF & AT: chaotudp_Lance
luogu & CF & AT: lml0928
writer: phigrOS-alpa
我补药上奇葩代码大赏*/```
#### BJ-J01047\polygon
同时包含关键词 `\\freopen`(是真的没开)。
#### BJ-J01172\polygon
同时包含关键词 `迷惑行为`。
#### BJ-J01269\number
同时包含关键词 `love`,~~请再出来认领一下~~。
#### BJ-J01376\number you ji
有如下注释:
```cpp/*you ji:
jin tian wo lai zha yu le!!!
kao qian yi zhou guo duan fang qi wen hua ke zuo ye,kai shi quan li lian ti.
kao qian fei chang jin zhang,dan shi yi xiang dao shi J zu jiu mei na me jin zhang le.
zao can chi de zhou,bao zi,ji dan geng.
kao qian song chi de shua shi pin.
dao le kao chang sui ji zhao dao chu yi xiao hai kai shi shuo pi hua.
kai kao le.
xian ba zui jin xin yan jiu de fa zuo le,xie que sheng yuan.
kai T1,ti mu zhi liang yi jing zhe me cha le,wei le bu chu yuan ti er bu chu yuan ti,you dian shi li,jiu shi ba chuan tong pai xu gai cheng le dai dian gan rao zi fu,5 min qie le.
kai T2,xiao she,cha zhao pai ming,kan dao shu ju fan wei wo beng bu zhu le,shen zhi mei kai man,xie le ge pai xu,bu guo yin,gan cui you hua le yi xia,bian cheng xian xing,10 min qie le.
kai T3,di yi yan:you dian yi si,di er yan:shen me yong jiao DP,zhi jie xie,ce wu hao yang li de shi hou you bu hao de yu gan,guo ran si le,yu shi fa xian zhuan yi fang cheng you dian xiao wen ti,yu shi gai le gai jiu guo le,11 min qie le.
kai T4,fa xian shu ju fan wei xiao,kao lv mei ju zui da zhi,fa xian jiu shi luo de bei bao,dan shi zhi jie xie shi $O(n^3)$ de fa xian di er wei sui bian you hua jiu guo le,hao shi 10 min.
zong shang hong cheng huang huang,yi deng jiang fen shun xian 402,er deng jiang fen shu xian 401,san deng jiang fen shu xian 400,na dao ren sheng di yi ge san deng jiang.
zong shang ti jiao shi jian(zhu yi kai kao hou xie le hui que sheng yuan,suo yi shi jian lue you pian cha).
T1 at 08:41:46
T2 at 08:51:32
T3 at 09:02:54
T4 at 09:12:57
zhi jieb fa zuo,deng xiao you xi leng que jie shu,wan le hui,fa xian bu neng ti qian li chang,dang chang jue wang le.
ran hou zhi neng xie you ji zhi lei de le.
luogu id:416975,sbno333
codeforces id:tianbincheng
atcoder id:sbno333
*/```
我拿 AI 给“翻译”了一下:
```cpp/*游记:
今天我来炸鱼了!!!
考前一周过段放弃文化课作业,开始全力练题。
考前非常紧张,但是一想到是J组就没那么紧张了。
早餐吃的粥,包子,鸡蛋羹。
考前送吃的刷视频。
到了考场随机找到处一小孩开始说屁话。
开考了。
先把最近新研究的法做了,写缺省原。
开T1,题目质量已经这么差了,为了不出原题而不出原题,有点实力,就是把传统排序改成了带点干扰字符,5分钟切了。
开T2,小设,查找排名,看到数据范围我崩不住了,甚至没开慢,写了个排序,不过因,赶催优化了一下,变成线性,10分钟切了。
开T3,第一眼:有点意思,第二眼:什么用叫DP,直接写,测误号样例的时候有不好的预感,果然死了,于是发现转移方程有点小问题,于是改了改就过了,11分钟切了。
开T4,发现数据范围小,考虑每局最大值,发现就是裸的背包,但是直接写是$O(n^3)$的发现第二维随便优化就过了,好事10分钟。
总上红城煌煌,一等奖分顺线402,二等奖分数线401,三等奖分数线400,拿到人生第一个三等奖。
总上提交时间(注意开考后写了会缺省原,所以时间略有偏差)。
T1 at 08:41:46
T2 at 08:51:32
T3 at 09:02:54
T4 at 09:12:57
直接发做,等小游戏冷却结束,玩了会,发现不能提前离场,当场绝望了。
然后只能写游记之类的了。
洛谷id:416975,sbno333
codeforces id:tianbincheng
atcoder id:sbno333
*/```
#### BJ-J01403\xor
同时包含关键词 `迷惑行为`。
#### BJ-J01430\number
有如下注释:
```cpp// total: 250 pts// luogu: 729048// freopen("numbers.in", "w", stdin)```
#### BJ-J01681\number
同时包含关键词 `love`。
#### BJ-J01681\polygon 我常常追忆过去
有如下注释:
```cpp//nsdd,ds wo chang chang zhui yi guo qu, fa xian zhe dao ti yong bu dao bitset//suo yi guan zhu GWBailang(Luogu-uid:559442) xie xie ao~/*freopen("ploygon.in","r",stdin);freopen("poylgon.out","w",stdout);freopen("gonploy.in","r",stdin);freopen("poly.out","w",stdout);freopen("stick.in","r",stdin);freopen("stick.out","w",stdout);openfre("polygon.in","r",stdin);freopen("polygon.out","w",student);const int P=1e9+7;const int MOD=114514;vector<deque<int>>dq(1000006);abs(-(__int128)1e18*1e18);*/```
没错是我,翻译一下第一行的拼音:
```cpp//你说的对,但是我常常追忆过去,发现这道题用不到 bitset```
#### BJ-J01681\seat
同时包含关键词 `AK`,所以 XHX AK CSP。
#### BJ-J01681\xor
有如下注释:
```cpp//nsdd,ds kao shi gang kai shi 30 fen zhong, wo yi jing bei ji fang li 21 du de kong tiao chui si le//nsdd,ds wo pang bian you ge bu hui bian yi dai ma de ru//suo yi guan zhu GWBailang(Luogu-uid:559442) xie xie ao~/*freopen("and.in","r",stdin);freopen("and.out","w",stdout);freopen("or.in","r",stdint);freopen("or.out","w",student);*/```
没错我四个代码都放 uid 了,让我把我写的拼音翻译一下:
```cpp//你说的对,但是考试刚开始 30 分钟,我就已经被机房里 21 度的空调吹死了//你说的对,但是旁边有个不会编译代码的入//所以关注 GWBailang(Luogu-uid:559442) 谢谢嗷~```
#### BJ-J01691\xor 压缩包密码
有如下注释:
```cpp//#Shang4Shan3Ruo6Shui4 <-wo3 men kao3 dia3n de ni4 tian1 mi4 ma3//tui4 yi4 qian2 de zui4 hou4 yi2 ci4 csp, zai4 jian4 le qi2 ta1 OIer//zai4 jian4 OI!!!!!!//luogu name xiaoBtx```
#### BJ-J01755\number team
有如下注释:
```cpp//luogu team 80057!```
#### BJ-J01744\seat team
有如下注释:
```cpp//luogu team 80057!//RP+=INF;//RP+=0x3f3f;```
#### BJ-J01766\polygon
有如下注释:
```cpp//baosouguoyangli,dabiaochuqiji AwA.......luogu_uid_823830.```
#### BJ-J01766\xor
有如下注释:
```cpp//awa,I don't know this problem has this special answer.//all right, I think I've got 260 pts, that's enough to get to 1=.//I haven't seen that I can kill A and B in thirty minutes--much easier than 2024 csp-j!//Wish I can get good points!rp++!//QwQ.......luogu_uid_823830.```
#### BJ-J01908\number,seat,xor
有如下注释:
```cpp//RP++//I'm luogu Heart_of_Irons```
疑似写注释时多打了个 s,把末尾的 s 去掉以后就能搜到名字了。
#### BJ-J02014\xor
有如下注释:
```cpp//Luogu txp2023```
但是搜不到,只能搜到一个叫 `txp2024` 的人。
#### BJ-J02047\seat
同时包含关键词 `迷惑行为`。
## 单独的
手动看了前 100 人的代码,又随机看了一些人的代码,发现有以下迷惑行为。
### BJ-J00016\seat 手写递归
代码一共写了 467 行:

### BJ-J00028
四道题都写了如下注释:
```cpp /** * Made By RealDream * with __CrossBow_EXE__ */```
### BJ-J00036\number 不会减法
```cpp#include <bits/stdc++.h>using namespace std;string s;int a[11];int main() { freopen("number.in", "r", stdin); freopen("number.out", "w", stdout); cin >> s; for (int i = 0; i < s.length(); i++) { if (s[i] == '0') a[0]++; if (s[i] == '1') a[1]++; if (s[i] == '2') a[2]++; if (s[i] == '3') a[3]++; if (s[i] == '4') a[4]++; if (s[i] == '5') a[5]++; if (s[i] == '6') a[6]++; if (s[i] == '7') a[7]++; if (s[i] == '8') a[8]++; if (s[i] == '9') a[9]++; } for (int i = 9; i >= 0; i--) { while (a[i] > 0) { cout << i; a[i]--; } } return 0;}```
### BJ-J00036\polygon 他不会什么都不会吧
一共写了 597 行代码:

### BJ-J00040\polygon 依旧手写递归
```cpp//state:40(bs)#include<bits/stdc++.h>using namespace std;
const int md=998244353;const int maxn=5010;int a[maxn],x[25];#define fr(i) for(x[i]=1;x[i]<=2;x[i]++)vector<int>vc;int n;int maxa,sum,res;int main(){ freopen("polygon.in","r",stdin); freopen("polygon.out","w",stdout); cin >> n ; for(int i=1;i<=n;i++){ cin >> a[i] ; } fr(1){ fr(2){ fr(3){ fr(4){ fr(5){ fr(6){ fr(7){ fr(8){ fr(9){ fr(10){ fr(11){ fr(12){ fr(13){ fr(14){ fr(15){ fr(16){ fr(17){ fr(18){ fr(19){ fr(20){ for(int i=1;i<=n;i++){ if(x[i]==2)vc.push_back(a[i]); } maxa=sum=0; for(int i=0;i<vc.size();i++){ maxa=max(maxa,vc[i]); sum+=vc[i]; } if(sum>2*maxa)res=(res+1)%md; vc.clear(); }}}}}}}}}}}}}}}}}}}} cout << (res>>(20-n)) << '\n' ; return 0;}```
### BJ-J00049\polygon 手写递归
```cpp for(;a[0]<n;a[0]++){ for(a[1]=a[0]+1;a[1]<n;a[1]++){ for(a[2]=a[1]+1;a[2]<n;a[2]++){ if(sum(2)>2*mx(2))res++; res%=mod; for(a[3]=a[2]+1;a[3]<n;a[3]++){ if(sum(3)>2*mx(3))res++; res%=mod; for(a[4]=a[3]+1;a[4]<n;a[4]++){ if(sum(4)>2*mx(4))res++; res%=mod; for(a[5]=a[4]+1;a[5]<n;a[5]++){ if(sum(5)>2*mx(5))res++; res%=mod; for(a[6]=a[5]+1;a[6]<n;a[6]++){ if(sum(6)>2*mx(6))res++; res%=mod; for(a[7]=a[6]+1;a[7]<n;a[7]++){ if(sum(7)>2*mx(7))res++; res%=mod; for(a[8]=a[8]+1;a[8]<n;a[8]++){ if(sum(8)>2*mx(8))res++; res%=mod; for(a[9]=a[1]+1;a[9]<n;a[2]++){ if(sum(9)>2*mx(9))res++; res%=mod; } } } } } } } } } } cout << res%mod;```
### BJ-J00055\xor 神秘缩进
```cpp#include<bits/stdc++.h>using namespace std;int n,k;int a[1000000];int main(){freopen ("xor.in" , "r",stdin); freopen ("xor.out","w",stdout); cin>>n>>k; for(int i=0;i<n;i++) { cin>>a[i];
} if( ( n== 4 &&k== 2 ) &&(a[ 0 ]== 2) ) {cout<<"2";return 0;
} if( ( n== 4 &&k== 3 ) &&(a[ 0 ]== 2) ) {cout<<"2";return 0;
} if( ( n== 4 ) &&(k== 0 )&&a[ 0 ]== 2 ) {cout<<"1";return 0;
} if( ( n== 100 &&k== 1) &&(a[ 0 ]== 1 ) ){ cout<<"63";return 0; } if( ( n== 985 &&k== 55 ) &&(a[ 0 ]== 190) ) { cout<<"69";return 0; } else cout <<12701; return 0;
}```
### BJ-J00066\number 没学过char
```cpp#include <iostream>#include <algorithm>using namespace std;int N=1000010;int main(){freopen("number.in","r",stdin);freopen("number.out","w",stdout);string s,ans;int n0=0,n1=0,n2=0,n3=0,n4=0,n5=0,n6=0,n7=0,n8=0,n9=0;cin>>s;for(int i=0;i<s.size();i++){ if('0'==s[i])n0++; if('1'==s[i])n1++; if('2'==s[i])n2++; if('3'==s[i])n3++; if('4'==s[i])n4++; if('5'==s[i])n5++; if('6'==s[i])n6++; if('7'==s[i])n7++; if('8'==s[i])n8++; if('9'==s[i])n9++;}for(int i=0;i<n9;i++)ans=ans+'9';for(int i=0;i<n8;i++)ans=ans+'8';for(int i=0;i<n7;i++)ans=ans+'7';for(int i=0;i<n6;i++)ans=ans+'6';for(int i=0;i<n5;i++)ans=ans+'5';for(int i=0;i<n4;i++)ans=ans+'4';for(int i=0;i<n3;i++)ans=ans+'3';for(int i=0;i<n2;i++)ans=ans+'2';for(int i=0;i<n1;i++)ans=ans+'1';for(int i=0;i<n0;i++)ans=ans+'0';cout<<ans;return 0;}```
### BJ-J00074\number 没学过char
```cpp#include<bits/stdc++.h>using namespace std;string s;int a,num0,num1,num2,num3,num4,num5,num6,num7,num8,num9;int main(){ freopen("number.in","r",stdin); freopen("number.out","w",stdout); cin>>s; int len=s.size(); for(int i=0;i<=len;i++){ if(s[i]<='9'&&s[i]>='0'){ a=s[i]-'0'; if(a==0) num0++; if(a==1) num1++; if(a==2) num2++; if(a==3) num3++; if(a==4) num4++; if(a==5) num5++; if(a==6) num6++; if(a==7) num7++; if(a==8) num8++; if(a==9) num9++; } } for(int i=0;i<num9;i++) printf("9"); for(int i=0;i<num8;i++) printf("8"); for(int i=0;i<num7;i++) printf("7"); for(int i=0;i<num6;i++) printf("6"); for(int i=0;i<num5;i++) printf("5"); for(int i=0;i<num4;i++) printf("4"); for(int i=0;i<num3;i++) printf("3"); for(int i=0;i<num2;i++) printf("2"); for(int i=0;i<num1;i++) printf("1"); for(int i=0;i<num0;i++) printf("0"); return 0;}```
### BJ-J00075\xor 输出样例
```cpp#include <bits/stdc++.h>using namespace std;int main(){ freopen("xor.in","r",stdin); freopen("xor.out","w",stdout); int n,k,sum=0; cin>>n>>k; int a[5e5]; for(int i=0;i<n;i++) { cin>>a[i]; sum=sum*10+a[i]; } if(n==4&&k==3&&sum==2103) cout<<2<<endl; else if(n==4&&k==3&&sum==2103) cout<<1<<endl; else if(n==4&&k==2&&sum==2103) cout<<2<<endl; return 0;}```
`int a[5e5]` 喜提编译错误。
### BJ-J00087\polygon 尝试输出样例
```cpp#include<bits/stdc++.h>using namespace std;int main(){ freopen("polygon.in","r",stdin); freopen("polygon.out","w",stdout); string s1,s2; getline(cin,s1); getline(cin,s2); if(s1=="500"&&s2=="37 67 7 65 3 79 74 20 17 91 68 22 96 67 11 43 80 6 46 70 34 68 91 80 4 9 76 81 34 17 33 16 71 73 37 85 27 33 47 8 99 78 38 75 23 45 57 42 13 81 93 73 12 73 57 21 81 90 4 35 35 20 99 13 3 3 6 98 47 98 84 10 38 67 1 96 43 4 100 13 100 63 64 79 16 53 71 11 75 46 86 86 99 64 86 82 2 72 11 81 36 1 17 48 4 87 40 26 18 30 77 97 11 91 34 33 50 68 97 50 41 27 58 6 11 4 69 71 8 46 64 37 5 34 86 37 16 12 86 73 58 18 86 15 63 6 1 21 86 43 88 70 21 83 31 84 93 3 98 94 53 90 96 19 96 77 85 94 94 37 5 65 71 41 37 76 97 26 38 42 97 29 84 43 19 78 21 38 23 31 10 80 50 91 98 26 60 80 15 17 13 12 35 9 66 26 88 82 73 38 13 48 42 59 9 8 64 96 100 54 64 69 62 5 78 6 74 57 2 27 7 60 51 11 87 43 25 21 76 74 39 68 42 32 54 37 47 65 84 10 1 30 60 54 8 13 21 61 27 1 87 16 61 74 13 88 31 37 72 76 44 74 54 5 16 48 22 9 83 88 21 61 73 21 83 64 91 39 40 56 88 34 64 64 18 81 58 28 57 8 3 31 95 34 93 95 88 37 88 18 29 29 28 67 51 97 78 62 40 46 72 64 28 42 65 44 63 23 35 84 66 53 23 29 28 70 97 33 10 61 99 87 11 51 6 21 75 14 89 53 39 6 63 97 57 84 46 6 80 35 42 60 61 20 99 14 68 53 74 42 25 61 36 65 72 71 23 78 44 69 65 42 62 79 59 1 35 45 7 85 92 43 4 85 51 59 32 35 44 21 27 41 13 50 41 83 41 34 25 31 74 12 91 95 87 53 24 12 32 83 12 70 97 31 81 7 59 73 26 48 96 18 48 86 51 84 45 49 53 92 69 16 35 74 75 10 88 27 8 82 70 8 96 46 36 39 26 61 43 90 47 29 82 63 43 76 82 24 19 71 46 17 33 71 59 1 92 31 11 38 29 27 9 67 50 45 54 90 90 25 42 27 95 81 95 69 57 76 23 18") cout<<366911923<<endl; if(s1=="20"&&s2=="75 28 15 26 12 8 90 42 90 43 14 26 84 83 14 35 98 38 37 1") cout<<1042392<<endl; return 0;}```
他的 `xor.cpp` 也是这么干的。
### BJ-J00089\polygon 不知所云

### BJ-J00091\polygon 答案就得是100KB
他写了如下代码:
```cpp#include<bits/stdc++.h>using namespace std;int main(){ int n,a,b,c; cin>>n>>a>>b>>c; if(a+b>c){ if(c+a>b){ if(b+c>a){ cout<<1; exit(0); } } } cout<<0; return 0;}//答案就得是100KB//答案就得是100KB```
并在后面写了 4372 遍 `//答案就得是100KB`。
### BJ-J00091\xor 自言自语
有如下注释:
```cpp/*第一个测试点n<=2?那是不是可以骗分?等一下,特殊性质B不就是特殊性质A的加强版么?也就是满足特殊性质A肯定也满足特殊性质B!异或和结论:1 0 11 1 00 0 00 1 1哦,那是不是可以直接计算啊,两个相同就是0,否则就是1不对,^0不变化,^1会变化,这才是对的*/```
### BJ-J01244\polygon 好不容易写了508行结果编译错误

### BJ-J01620\number 依旧不会char
```cpp#include <bits/stdc++.h>using namespace std;
bool cmp(int x,int y){ return x>y;}int main(){ freopen("number.in","r",stdin); freopen("number.out","w",stdout); string s,t; cin>>s; int n=s.size(),a[200005],ans=0; memset(a,-1,sizeof(a)); for(int i=0,j=0;i<n;i++) { if(s[i]<='z'&&s[i]>='a') continue; t[j]=s[i]; j++; } for(int k=0;k<n;k++) { if(t[k]=='0') {a[k]=0;ans++;} if(t[k]=='1') {a[k]=1;ans++;} if(t[k]=='2') {a[k]=2;ans++;} if(t[k]=='3') {a[k]=3;ans++;} if(t[k]=='4') {a[k]=4;ans++;} if(t[k]=='5') {a[k]=5;ans++;} if(t[k]=='6') {a[k]=6;ans++;} if(t[k]=='7') {a[k]=7;ans++;} if(t[k]=='8') {a[k]=8;ans++;} if(t[k]=='9') {a[k]=9;ans++;} } sort(a,a+n,cmp); for(int i=0;i<ans;i++) cout<<a[i]; return 0;}```
### BJ-J01739\xor 还是背诵巨佬
有如下注释:
```cpp//正在下载程序包“C/C++ language components (Linux / x86_64)” 失败。正在重试... 失败。正在重试... 失败。正在重试...正在等待 8 秒... 失败。正在重试...正在等待 16 秒... 未能下u载//夜上受降城闻笛//回乐烽前沙似雪,//受降城外月如霜。//不知何处吹芦管,//一夜征人尽望乡。//行军九日思长安故园//强欲登高去,//无人送酒来。//遥怜故园菊,//应傍战场开。//歧王宅里寻常见,//崔九堂前几度闻。//正是江南好风景,//落花时节又逢君。//从百草园到三味书屋 第二段//不必说碧绿的菜畦,光滑的石井栏,高大的皂荚树,紫红的桑椹。也不必说鸣蝉在树叶里长吟,肥胖的黄蜂伏在菜花上,轻捷的叫天子(云雀)忽然从草间直窜进云霄里去了。但是周围的短短的泥墙跟一带,就有无限趣味。油蛉在这里低唱,蟋蟀在这里弹琴,翻开断砖来,有时会碰上蜈蚣,还有斑蟊。倘若你用手指按住它的脊梁,就会啪的一声,从后窍喷出一阵烟雾来。木莲藤和何首乌藤连络着,木莲有莲房一般的果实,何首乌有臃肿的根。有人说,这何首乌根是有向像人形的。吃了便可以成仙,我于是常常拔它起来,牵连不断地拔起来,也曾因此弄坏了泥墙,却没有见到有一块根像人样。如果不怕刺,还可以摘到覆盆子,味道比桑椹要好的远。//《咏雪》--《世说新语-言语》//谢太傅寒雪日内集,与儿女讲论文义。俄而雪骤,公欣然曰:“白雪纷纷何所似?”兄子胡儿曰:“撒盐空中差可拟”。兄女曰:“未若柳絮因风起。”公大笑乐,即公大兄无奕女,左将军王凝之妻也。//Ubuntu自带中文输入法太难用了!!!!!!!!!!!!!!!!```
### BJ-J01740\xor T3<T1
有如下注释:
```cpp /* ber wo di san ti za zuo de bi di yi ti hai kuai */ /* O(n^2) guo 2e5?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? bang ge wei shu wan le yi gong you 666 ge wen hao */```
### BJ-J01907\polygon 998,244,353
```cpp#include<bits/stdc++.h>using namespace std;int n;int js(int x){ long long sum=1,sum2=1; for(int i=n;i>=n-x+1;i--) { sum*=i; sum%=998; sum%=244; sum%=353; } for(int i=1;i<=x;i++) { sum2*=i; sum2%=998; sum2%=244; sum2%=353; } return sum/sum2;}int main(){ freopen("polygon.in","r",stdin); freopen("polygon.out","w",stdout);
cin>>n; int a[n+1]; long long ans=0; for(int i=1;i<=n;i++) { cin>>a[i]; } if(n%2==0) { ans+=n; ans+=n*(n-1)/2; ans%=998; ans%=244; ans%=353; for(int i=3;i<=n/2;i++) { ans+=js(i); ans%=998; ans%=244; ans%=353; } cout<<ans; } else { ans+=n; ans+=n*(n-1)/2; ans%=998; ans%=244; ans%=353; for(int i=3;i<=int(n/2);i++) { ans+=js(i); ans%=998; ans%=244; ans%=353; } ans+=js(int(n/2)+1); ans%=998; ans%=244; ans%=353; cout<<ans; } return 0;}```
### BJ-J01610\xor 还是线段树大佬
```cpp#include <iostream>#include <set>using namespace std;/*#define lc p<<1#define rc p<<1|1typedef long long ll;const int N=100010;int n,k,op,x,y;int a[N];struct node{ int l,r; int sum,tag;}t[N<<2];void pushup(int p){ t[p].sum=t[lc].sum^t[rc].sum;}
void pushdown(int p){ if(t[p].tag){ t[lc].tag+=t[p].tag; t[rc].tag+=t[p].tag; t[lc].sum+=t[p].tag*(t[lc].r-t[lc].l+1); t[rc].sum+=t[p].tag*(t[rc].r-t[rc].l+1); t[p].tag=0; }}
void build(int p,int l,int r){ if(l>r)return ; t[p].l=l; t[p].r=r; if(l==r){ t[p].sum=a[l]; return ; } int mid=(l+r)>>1; build(lc,l,mid); build(rc,mid+1,r); pushup(p); return ;}
void add(int p,int l,int r,int k){ if(l<=t[p].l&&t[p].r<=r){ t[p].tag+=k; t[p].sum+=k*(t[p].r-t[p].l+1); return ; } int mid=(t[p].l+t[p].r)>>1; pushdown(p); if(l<=mid)add(lc,l,r,k); if(mid<r)add(rc,l,r,k); pushup(p); return ;}
int cnt;int query(int p,int l,int r){ cnt++; if(l<=t[p].l&&t[p].r<=r)return t[p].sum; int ans=0; int mid=(t[p].l+t[p].r)>>1; //pushdown(p); if(l<=mid)ans^=query(lc,l,r); if(mid<r)ans^=query(rc,l,r); return ans;}*/const int N=500010;int n,k,a[N],sum[N];void xyb(){ freopen("xor.in","r",stdin); freopen("xor.out","w",stdout);}set<int>st;int main(){ xyb(); cin>>n>>k; for(int i=1;i<=n;i++)scanf("%d",a+i); for(int i=1;i<=n;i++)sum[i]=sum[i-1]^a[i]; int cnt=0; st.insert(sum[0]); for(int i=1;i<=n;i++){ if(st.count(sum[i]^k)){ cnt++; st.clear(); st.insert(sum[i]); continue; } st.insert(sum[i]); } /*if(st.count(sum[n]^k)){ cnt++; st.clear(); }*/ cout<<cnt; return 0;}/*对于每一个sum[i],找从sum[l]到sum[i-1]的集合中是否存在sum[i]^k如果找到,则cnt++,l=i+18 21 3 2 6 1 4 5 3
1 324 5 3
10 2 5 4 5 3 4 3 1 2 1 2101 100 101 011 100 011 001 010 001 010 5 1 4 7 3 0 1 3 2 0101 001 100 111 011 000 001 011 010 000
4 2 2 1 0 3010 001 000 011010 011 011 000
4 22 2 2 2
4 2 2 0 2 210 00 10 1010 10 00 10
4 23 0 1 2*/```
### BJ-J01552\number 不会string
```cpp#include<bits/stdc++.h>using namespace std;int s;int main(){ freopen("number.in","r",stdin); freopen("number.out","w",stdout); cin>>s; if(s=5){ cout<<"5"<<endl; } if(s=1){ cout<<"1"<<endl; } if(s=2){ cout<<"2"<<endl; } if(s=3){ cout<<"3"<<endl; } if(s=4){ cout<<"4"<<endl; } if(s=6){ cout<<"6"<<endl; } if(s=7){ cout<<"7"<<endl; } if(s=8){ cout<<"8"<<endl; } if(s=9){ cout<<"9"<<endl; } if(s=0){ cout<<"0"<<endl; }else{ cout<<"92100"<<endl; } return 0;}```
### BJ-J01361 警钟
四道题都写了如下注释:
```cpp/*1.不要忘记开lonlong *2.看看循环i,j有没有错误 *3.数组有没有开太小 *4.stl有没有判断是否为空 *5.多测有没有清空 *6.是不是看错题了 *7.局部变量有没有赋值 *8.输出有没有写错 *9.是不是一开始就像错了? *10.保持好心态 */```
### BJ-J01009\xor sueeeeeeeeeee
这是他的完整代码:
```cppsueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee```
### BJ-J00728 META
四道题都写了差不多的注释,应该是调试用的。
```cpp/*META:BJ-J00728 2025/11/1number.cpp T1Status=LockedScore Guess=100E1 ACE2 ACE3 ACE4 ACS1 ACS2 ACS3 ACS4 ACH1 Time OKH2 AC*//*STESTS:<S1>qfge0asdawqdvrev9fgkjhkjhgkjkjhgkjhgkjhgkjhgkjhgkjhgkjhgkjhgkjhgkjhgk4jghgfjghf<S1.ans>940<S2>1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7aa8ab9ac0ad<S2.ans>999888777666555444333222111000<S3>jaljflckjlwnkrjhflciehkszkjrhkcfnalkwjerhflckjnzksyrgkfcshrnwalrkjfhcl8938asjhfbkcajhsbkejfhckajhsebfkjhcb<S3.ans>9883<S4>0000000000includeiostreamusingnamespacestdintmainintabcinabcoutab9endlreturn0000000<S4.ans>900000000000000000*/```
### BJ-J00561\xor CCF 不是 CF
有如下注释:
```cpp // 这段代码在随机数据下表现十分优秀,大约 O(nlogn)。但是我不保证出题人会 copy Codeforces 的 hacks 来卡掉我的代码。```