HA 河南地区2023NOIP整活代码大赏

· · 个人记录

考完后我也来发一个

感觉整活代码的人比CSPS的人多?

CCF人

很多,挑出来几个:

HA-0182(同样是作文人)

#include <bits/stdc++.h>

using namespace std ;

int main ()
{
    freopen("run.in","r",stdin);
    freopen("run.out","w",stdout);

    /*
    zhen de wu yu si le !!!
    T1 yi zhi li jie cuo yi si ,
    jie guo xie de 1 kun hour .
    sheng xia ye xie bu liao yi dao ti le .
    jiu xie xie xiao zuo wen ba ~

              -- bu hui English de
                 hun dao noip de
            ( suan le , bu shuo xve xiao le )
                mou xiao gao yi 2 ban de 
                   qwq  

    */
    cout << " I love you CCF " ;
    /*                      X

            I hate you CCF .
                            V

    I am the dog of Kamisato Alaya .
                            V
    */

    return 0 ;
}

HA-0071:

    //I love CCF!
    //I love luogu!
    //1145141919810

HA-0162(似乎编译器还出了问题的人)

//**dian nao,vector and queue yi kai jiou beng 
//I Love ccf(
//c ccf
//**bian yi qi,Dev-C++ 5.11 bu rang wo yong

洛谷人

有一些

巧了,我也是

rp人

HA-0082:

//  cwl yjd yjj zhz wqc lhd cxy RP++ YOU AK IOI

HA-0028:

//rp++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

HA-0093

    //noip 2023 rp++
    //ahahhahahahahaahahahah!!!!!!!!!
    //i love wfx,but she seem not like me
    //i can't 1=
    //don't lose hope
    //don't afo
    //st0 link orz
    //luogu huanghezhe
    //please
    //i want ac

作文人

发现了一个十分震撼的长作文

接下来

请看选手

HA-00141!(这哥们作文还是连载版的)

dict.cpp:

/*
Powered by dyt_dirt

2023/11/18 8:30
I think Dev-C++ will not display Chinese currently, so I decided to use English.
But I think my English is not good.

所以我还是决定用中文了(happily

2023/11/18 8:41
******* CCF

Why not to change a better server???
I spend so long time to download your files!!!
Don't 急, CCF will solve everything(确信
BTW, why you change your IP address???
BTW, why don't you send me your sample???
Do you think I can make sample by myself???

2023/11/18 8:47

All right, I can't understand the first problem.
I think, my OI life is over.(sadly
But, why son't me get some part points?
OK, I didn't have this 实力(

2023/11/18 8:52

Ohhhh, I understand this problem!!!(happily

对于每一个字符串,你可以随意更改它的顺序,求能否使他成为n个字符串中的最小.
For every string of n strings, you can change their 顺序, if this string can be the maxium after operator, ai is 1, if not, ai is 0.
(Please 原谅 my 蹩脚的 English.

2023/11/18 9:00
I think this is my first time to understand the NOIP problem (even the first one is probably yellow or green.
BTW, Code::Blocks' font is very very, ugly!
I think I will not AK NOIP, even the first problem.
All right, this idea's 复杂度 is O(n^2*mlogm), actually it will not pass the biggest points.

2023/11/18 9:12
All right, just now, I passed my idea, it is wrong.
You can change every strings' 顺序 in any case...
I really think I will 爆零.

2023/11/18 9:15
Oh, I think I can change my idea.
I can sort every string when I will change their 顺序, I can change it to max or min so that I can get the min one.

2023/11/18 9:26
话说用ifdef宏定义会导致编译错误吗???
在此之前从来没有使用过宏if.
诶你别说这个键盘还挺好用.
不是连下载样例都得分着下载,CCF服务器有那么差吗.
All right, I think this time the samples are too big.
"Big Sample" (really)

2023/11/18 9:37
Ohhh, I tested all the samples, it seems that this is correct.
I think I can get a little points.
---Hmm, I think I can get the first problem's all points!---
Emm, don't be so confident, or your resault will be worse.
So I 划掉ed that line.(By hand

2023/11/18 9:41
I think I will TLE.
Because my program's 时间复杂度 is O(n m logm + n^2)
Actully this time is too long.
I can't accept the last test case.

2023/11/18 9:48
哈哈哈不要看C++ API
哈哈哈有一种规则类怪谈的感觉哈哈哈
家人们谁懂啊~~~
今天遇到个虾头规则类怪谈
你家NOIP竟然还有一些奇奇怪怪的规则~~~

2023/11/18 9:53
Oh My God, I think Code::Blocks is worse than vim.
I first time think vim is better to use.
At least my eye is not blind.
Very good, at least I can get 90 points.(happily
你大爷还得是你大爷
大爷说得对啊,骗分起码还能得到点分数
还好没有知难而退~~~

那么,这道题就到这里吧。

EOF
*/

/*
OK, here some 注意事项.

一定记得最后检查的时候看看有没有漏掉freopen!!! // 一定要把debug的宏给去掉!!!
一定记得最后提交的时候检查每个文件名!!!
一定记得最后提交的时候检查有没有多余输出!!!(比如debug输出什么的
一定记得最后提交的时候检查有没有非法变量名!!!(典中典之next,get,array,y1等)
*/

#include <iostream>
#include <string>
#include <string.h>
#include <stdlib.h>
#include <algorithm>
#include <time.h>
// #define debug

using namespace std;

bool ans[3001];
string strs[3001];
string maxstr[3001];
string minstr[3001];

bool cmp(string a, string b)
{
    return a > b;
}

int main()
{
#ifndef debug
    freopen("dict.in", "r", stdin);
    freopen("dict.out", "w", stdout);
#endif
    int n, len;
    cin >> n >> len;

    for (int i = 1; i <= n; i++)
    {
        cin >> strs[i];
        sort(strs[i].begin(),strs[i].end());
        minstr[i] = strs[i];
        reverse(strs[i].begin(),strs[i].end());
        maxstr[i] = strs[i];
    }

    for (int i = 1; i <= n; i++)
    {
        string now = minstr[i];

        for(int j = 1; j <= n; j++)
        {
            if (j == i)
                continue;

            if(now > maxstr[j])
            {
                ans[i] = 0;
                goto End;
            }
        }

        ans[i] = 1;
End:
    i;
    }

    for (int i = 1; i <= n; i++)
        cout << ans[i];

    cout << endl;

#ifdef debug
    cout << clock() << endl;
#endif

    return 0;

}

/*
4 7
abandon
bananaa
baannaa
notnotn
*/

tribool.cpp:

/*

book send last time. // 书 接 上 回

2023/11/18 10:00
Begin to cut problem.
还真的是一个小时一道题啊。

2023/11/18 10:03
First of all, let us look this problem.
First, the data range of this problem is 1e5, so we can only use O(n) or O(nlogn) to get all the points.
So we can get the algorithm, we can range all the operator, and 模拟 the resault.

2023/11/18 10:09
Oh no, I understand the wrong idea!
so, it seems that it is a graph problem?
When we get "-" operator, we can make a negative edge between the two virtual nodes.
When we get the negative circles, we can add "U" for the value's abs of the circle.
Then the answer is the sum of the circles.

2023/11/18 10:14
Oh shit, the idea can only pass some special test cases which only have operator "+" and "-".
it only have 20 points, and it can't help me get the 1=.
Wow, the inputs have told me which test case it is!
It equals that I can get a large number of part points so that I can water this problem.( happily

2023/11/18 10:24
fc是什么 能吃吗
哦懂了, fc是 full combul(拼写指示器告诉我拼错了,但是我不知道正确的拼法是什么(sadly)
哦^v原来fc是文件比较的意思啊~
搜打油~

2023/11/18 10:34
哈哈哈查询当代大学生精神状态
嘴里念叨着 阿巴阿巴阿巴 是什么鬼
哈哈哈
哦好吧我觉得我也得查询一下自己的精神状态

2023/11/18 10:36
忽然想起来一件事
我好像不会写SPFA判负环。。。
啊啊啊啊啊啊这下好了我精神状态真有问题了
啊啊啊啊啊啊感觉好无力啊啊啊啊啊啊啊
不是为什么会有这种奇奇怪怪的让我不会的东西啊啊啊
可恶真的是
看来我代码能力比大爷还差
我是个fvv
All right, I think my OI life is really over.
It is my last time to try NOIP.
I can't 保证 I can pass the CSP-S next year.
So I decided to make a headstone to 纪念 my OI life.
  _____________
 /             \
|               |
|               |
|     R.I.P     |
|               |
|  Their was my |
|    OI life    |
|    But now    |
|  He is over.  |
|     --dyt_dirt|

哦~我亲爱的dyt_dirt啊,我想这个墓碑是如此的蹩脚,比隔壁玛利亚太太做的苹果派还要烂,哦我发誓,我真的想狠狠地,把这个墓碑摔在地上,以便能让你知道你做的墓碑是多么的烂~

2023/11/18 10:48
Haha, god TM through coin to pass the problem.
"No Commander"
哈哈哈怎么还有不会用电脑的啊,什么大学生现场教学哈哈哈
"你这是win10"
哈哈哈现在的大学生都这么逗吗哈哈哈
哈哈哈这个大学生好可爱哈哈哈

2023/11/18 11:00
"Shit mountain code" (really) (sadly
"About why I write the inputs for more than 50 lines"

2023/11/18 11:06
"About why I write 三目operator inside 三目operator"

2023/11/18 11:11
I know, but why I need 跋山涉水 to go to the toilet.
The root of the idea is not useful.(sadly
Hmm, should I eat some food so that I can have a clear brain?
I think my spirit is not so good.

2023/11/18 11:18
So good, now the length of the code is 288 lines now.
what a shit code! :-)

2023/11/18 11:30
哈哈哈谁手机闹钟响了哈哈哈
就nm逆天哈哈哈
OK, I recycle my saying before, the keyboard is not comfortable to use.

2023/11/18 11:34
Oh no, there are some people doing the fourth problem???
It may be the hardest one!
I'm 蒟蒻(sadly)

2023/11/18 11:45
我靠,真的有穿钟离cos的来考NOIP!
Just now, I found that my idea is wrong.
If the negative have doubled, it's not necessary to have any 'U'.
So I find a new lecture.
If the sum of the circle is 0, the result will not have 'U', so its answer is 0.
Similarly, if it's not 0, answer will be the length of the circle.

2023/11/18 12:00
怎么感觉这个监考的大学生说话跟咬着舌头似的
"可  爱  捏"
*/

#include <iostream>
#include <stdlib.h>
#include <vector>
#include <queue>
#include <string.h>
// #define debug

using namespace std;

struct node
{
    bool isVal = 0;
    int nxt = 0,val = 0;
};

int tc, T;
int n, m;
int vis[100001];
int ans = 0;

void solveForTestCase3_4()
{
    while (T--)
    {
        int ans = 0;
        node nodes[100001];

        cin >> n >> m;

        for (int i = 1; i <= m; i++)
        {
            char op;
            int id;
            int from, to;
            cin >> op;

            if(op == 'T')
            {
                cin >> id;
                nodes[id].isVal = 1;
                nodes[id].val = 2;
            }
            if(op == 'F')
            {
                cin >> id;
                nodes[id].isVal = 1;
                nodes[id].val = 1;
            }
            if(op == 'U')
            {
                cin >> id;
                nodes[id].isVal = 1;
                nodes[id].val = -1;
            }
        }

        for (int i = 1; i <= n; i++)
            ans += (nodes[i].val == -1);

        cout << ans << endl;
    }
}

void solveForTestCase5_6()
{
    while (T--)
    {
        cin >> n >> m;

        for (int i = 1; i <= m; i++)
        {
            char op;
            int id;
            int from, to;
            cin >> op;

            if(op == '+')
                cin >> to >> from;
            if(op == '-')
                cin >> to >> from;
        }
        cout << n << endl;
    }
}

int main()
{
#ifndef debug
    freopen("tribool.in", "r", stdin);
    freopen("tribool.out", "w", stdout);
#endif

    cin >> tc;
    cin >> T;

    if (tc == 3 || tc == 4)
    {
        solveForTestCase3_4();
        return 0;
    }
    if (tc == 5 || tc == 6)
    {
        solveForTestCase5_6();
        return 0;
    }

    /*
    Never gonna give you up
    Never gonna let you down
    OK now I declare that I! AM! SB!!!
    I just finish six test cases and cannot 保证 they are correct.
    So I will be the worst among our school's OIers.(very very sadly)
    OK I think after this exam, I should 发♂泄♂ my pressure.
    */

    while(T--)
    {
        cin >> n >> m;
        cout << rand() % n << endl;
    }

    return 0;
}

/*
3 1
2 2
T 2
U 2
*/

run.cpp:

/*
book send last time

2023/11/18 12:45
懒得写注释了(悲)
那么就用中文写吧(bushi
感觉像是道dp,但是没有思路。。。
我是fvv...

2023/11/18 12:47
感觉这群大学生的生活好慵懒啊。
I'm so admire.
不像我,被学业的压力压迫着。
还要忍三年。
到那时候,也不知道我还能不能保持这种青春活力了。
(关于我不会写便开始感慨人生这件事)

2023/11/18 12:51
nm r<l 什么鬼,它意思是我y都是1???
那我还有写的必要吗
它真的我哭死
哦特殊性质B就8分啊那没事了

2023/11/18 13:05
卧槽旁边这位女士正在打表???
预处理26个英文字母是吧???
活久见
*/

#include <iostream>
#include <stdlib.h>

using namespace std;

struct challenge
{
    int date, days, adds;
};

int tc,T;
int n, m, k, d;
challenge clg[100001];

int main()
{
    freopen("run.in", "r", stdin);
    freopen("run.out", "w", stdouyt);
    cin >> tc;
    cin >> T;

    while (T--)
    {
        cin >> n >> m >> k >> d;

        for (int i = 1; i <= m; i++)
            cin >> clg[i].date >> clg[i].days >> clg[i].adds;

        cout << 0 << endl;
    }

    /*
    I think it will TLE if there was no output, so I should "No Commander".
    But it is foolish, it has multi testcases, so I can't get this problem's points.

    Long double time ago, there was a young boy, who was called distjr_,.
    One day, she(yes it's) met the god, god told her: You **WILL** AK IOI.
    She believed him, started to study OI hard, but first year, her CSP-S did not pass.
    When she was sadly, the god appeared,"I said you will **AK IOI**, but I didn't said that you WILL PASS CSP-S."

    原谅我这蹩脚的故事(诶嘿~)
    */
}

HA-S0140(这俩人就搁一块坐的??!!):

/*
Once there was a algorithm named D{GS<<1.
She did likes to eat bugs, which were delicious, she thought.
But she found a problem that if the king of the algorithms -- Fokldyts<<1, was still alive, she couldn't to be able to eat so much bugs just like the time when Fokldyts<<1 hadn't been borned.
So she started to make up a big team to kill Fokldyts<<1 which was called Nr;;,sm=Gptf>>1 by her.
But sadly, in fact, it didn't work.
Nr;;,sm=Gptf>>1 had killed a lot of algorithms which was made by them who was belong to Fokldyts<<1, but they couldn't kill more than 998244353 algorithms.
At last, D{GS<<1 was killed by her favorite bugs -- wirir<<1.
So it believes that D{GS<<1 had been dead.
*/

注释乱码人

HA-0121 Diona 瞩目

/*
�����μģ�
���ȣ�֣����Ի��Ǻܳ����ӳ��е�С��
�ȿ��˿�Dev-c��������5.4���Լ����˸�5.11֮���ֱ��벻�ˣ�̫������... 
8��30 �����˱�csp�٣�Ϊʲô��վը�ˣ�����
8:40 ���غ���PDF ������ֻ��PDFû������������ 
9:00 T1�е�˼·�����ˣ�С�������ˣ��������ڻ�û����������yun��
9:12 T2һ�۶���ͼ�����Ǻ������ 
9:25 Dev-c 5.11 �����ˣ����Ǵ������أ��Һܼ���
9:30 ���������ˣ�����  
9:32 ���ˣ������� 
9:40 �����������ˣ������� 
10:27 ����T2 40pts��T1���٣���ʼ������û�м????ı��� 
11:08 ����T4����DP����֪��Ϊɶ���ˣ�yun�� 
ֱ��ԭ�����ۡ�����
I LOVE Diona !!! 
*/

over