JX CSP-S2021 迷惑行为大赏

· · 个人记录

\Large\textsf0\textbf{ 前言}

晚上闲的没事干(

正片开始。

\Large\textsf1\textbf{ 总括}

JX 省的 OIer 们一共写了 1124\texttt{freopen}1102\texttt{include}404 个万能头,7314\texttt{int}155\texttt{long long}

其中 \texttt{freopen} 被注释掉的共有 30 人。

$\Large\textsf2\textbf{ 奇人共赏}

4 份相同代码人

口吐芬芳 & 侵犯知识产权人

图灵保佑 & 表白人

$\Large\textsf3\textbf{ 代码展示}

JX 所有选手中,代码最长是 airport 的 \text{5.454 KB},我们来看看他写了什么:

===== Successfully open the file answers\JX-00144\airport\airport.cpp.The size of it is 5.454 KB.
#include<bits/stdc++.h>
using namespace std;

inline int read(){
    char ch = getchar();
    int v = 0;
    while(ch < '0' || ch > '9') ch = getchar();
    while(ch >= '0' && ch <= '9') v = v * 10 + ch - '0', ch = getchar();
    return v;
}

bool debug = false;

namespace Solution{
    int position1[505050], position2[505050];

    int n, m1, m2;
    struct Vector2{
        int x, y;
        Vector2(){}
        Vector2(int x, int y) : x(x), y(y) {}
        bool operator < (const Vector2& r) const{
            return this->x < r.x;
        }
    }time1[505050], time2[505050];

    struct Node{
        int L, R;
        Node* next;
        Node(){
            next = nullptr;
        }
        int Insert(){
            if(L >= 3){
                Node* x = new Node();
                x->L = this->L, x->R = this->R, x->next = this->next;
                this->L = this->R = 1;
                this->next = x;
                return 1;
            }
            else if(2 == L) {L = 1; return 1;}
            else{
                if(next == nullptr){
                    R++;
                    return R;
                }
                R++;
                int ans = R;
                if(R == next->L - 1) {
                    this->R = next->R;
                    Node* waste = this->next;
                    this->next = next->next; 
                    delete(waste);
                }
                return ans;
            }
        }
... ... ... ...
int main(){
    freopen("airport.in", "r", stdin);
    freopen("airport.out", "w", stdout);

    Solution::ReadAll(); 
    Solution::Solve(); 
    return 0;
}

可悲的是,他 RE 了。

代码总长度 rk1 是 4 份相同代码人。

===== Successfully open the file    answers\JX-00140\palin\palin.cpp.The size of it is 0.406 KB.
#include<bits/stdc++.h>
using namespace std;
int t,n,a[1000005]={0},b[1000005]={0},f=0,p,q;
int main(){
    freopen("palin.in","r",stdin);
    freopen("palin.out","w",stdout);
    cout<<"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL"<<endl<<"LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL";
    fclose(stdin);
    fclose(stdout);
    return 0;
}

奇怪特判人

===== Successfully open the file    answers\JX-00023\palin\palin.cpp.The size of it is 4.894 KB.
#include<bits/stdc++.h>
using namespace std;
int a[1000005];
int main()
{
  freopen("palin.in","r",stdin);
  freopen("palin.out","w",stdout);
  int t,n;
  cin>>t;
  for(int i=1;i<=t;i++)
  {
      cin>>n;
      for(int j=1;j<=2*n;j++)
      cin>>a[i];
      if(n==5)
      cout<<"LRRLLRRRRL"<<endl;
      else if(n==3)
      cout<<"-1"<<endl;
      else if(t==100)
      {
        cout<<"-1"<<endl;
        cout<<"-1"<<endl;
        cout<<"LLLLLLLLLLLLRLLLLLLLRRLRLLLLLLLLLLLLLLRL"<<endl;
        cout<<"LLRRRLRLRLLRLLLLRRLLLLLRLLLLLRLLRRLLLLLL"<<endl;
        cout<<"LLLLRRLLLLLLLRLLLLLLLRLRLLLRRRLRRLLRLLLL"<<endl;
        cout<<"-1"<<endl;
        cout<<"RRRRRRRRRRRRRRRRRRRRRRRRRRRRLRRRRRRRRRRL"<<endl;
        cout<<"LLLLLLRRLLLLLLLRRLLLLLRRRLLLLLLLLLRRRLRL"<<endl;
        cout<<"-1"<<endl;
        cout<<"-1"<<endl;
        ... ... ... ...
        return 0;
        }
      else
        cout<<"-1"<<endl;
  }
    return 0;
}

特判样例人

在接下来的代码里,他还表演了特判 T4 样例和 T2 的:

        if(n<=6){cout<<rand()%51;return 0;}
        else if(n<=15){cout<<rand()%231;return 0;}
        else if(n<=23){cout<<rand()%912;return 0;}
        else if(n<=40){cout<<rand()%10621;return 0;}
        else if(n<=70){cout<<rand()%325181;return 0;}
        else if(n<=100){cout<<rand()%4524823;return 0;}
        else if(n<=230){cout<<rand()%75192519;return 0;}
        else{cout<<rand()%9710251025;return 0;}
===== Successfully open the file answers\JX-00157\bracket\bracket.cpp.The size of it is 1.009 KB.
// AFO
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <vector>
#include <stack>
#define __NAME "bracket"

AFO /fad

===== Successfully open the file    answers\JX-00117\palin\palin.cpp.The size of it is 1.862 KB.
/*
 * palin.cpp
 * 
 * Copyright 2021 noi <noi@noi-HP-288-Pro-G4-MT-Business-PC>
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 * 
 * 
 */

不懂就问,这是什么啊 /jk

===== Successfully open the file answers\JX-00133\airport\airport.cpp.The size of it is 1.934 KB.
#include<iostream>
#include<cstdio>
using namespace std;

int n = 0;//langqiaozongshu
int m1 = 0, m2 = 0;//guoneihangbanheguowaihangban
int m1s[100001][2], m2s[100001][2];//zhengxiangcunchu
bool m11in[100001], m11out[100001], m22in[100001], m22out[100001];//fanxiangcunchu
int maxtick1 = 0, maxtick2 = 0;//zuiduoyouduoshaogeshike
int max1[100001], max2[100001];//*max1[i]* = yongyou *i* gelangqiaoshi, zuiduonengbishangyiciduorongnaduoshaofeiji
int tmp = 0;//zhuangqucishidefeijishuliang
int num1 = 0, num2 = 0;//quedingzuiduoxuyaoduoshaolangqiaocainengtingxiasuoyoufeiji
int finalmax = 0;//zuizhongjieguo

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

    cin >> n;
    cin >> m1 >> m2;
    for(int i = 0; i < m1; i++)
    {
        cin >> m1s[i][0] >> m1s[i][1];
        maxtick1 = max(maxtick1, m1s[i][1]);
        m11in[m1s[i][0]] = true;//zaizheshiyoufeijijingru
        m11out[m1s[i][1]] = true;//zaizheshiyoufeijichuqu
    }
    for(int i = 0; i < m2; i++)//tongshang
    {
        cin >> m2s[i][0] >> m2s[i][1];
        maxtick2 = max(maxtick2, m2s[i][1]);
        m22in[m1s[i][0]] = true;
        m22out[m2s[i][1]] = true;
    }
    for(int i = 1; i <= maxtick1; i++)//duiyuguoneihangban, jisuan *max1*
    {
        tmp += m11in[i];//ruguoyoufeijijingrujiuzengjia
        tmp -= m11out[i];//ruguoyoufeijichuqujiujianshao
        if(m11in[i])//ruguoyoufeijijingru
        {
            ++max1[tmp];//cishiyongyou *tmp* zuolangqiaozhenghaonengrongnazhexiefeiji
        }
        num1 = max(num1, tmp);
    }
    tmp = 0;
    for(int i = 1; i <= maxtick2; i++)//tongshang
    {
        tmp += m22in[i];
        tmp -= m22out[i];
        if(m22in[i])
        {
            ++max2[tmp];
        }
        num2 = max(num2, tmp);
    }
    for(int i = 1; i <= num1; i++)//huanyuankeyongxulie
    {
        max1[i + 1] += max1[i];
    }
    for(int i = 1; i <= num2; i++)//tongshang
    {
        max2[i + 1] += max2[i];
    }
    for(int i = 0; i <= n + 1; i++)//zuizhongfenpei
    {
        finalmax = max(finalmax, max1[i] + max2[n - i + 1]);
    }
    cout << finalmax;

    fclose(stdin);
    fclose(stdout);
    return 0;
}

出现了,拼音邪教(

===== Successfully open the file answers\JX-00184\bracket\bracket.cpp.The size of it is 2.092 KB.
int dfs(string s,int q)
{
    ... ... ... ...
    retuen ret;
}

UPD on 10/24 0:48\texttt{retuen}