CCF CSP-S2 2022 迷惑行为大赏 | 吉林分会场

· · 个人记录

CCF CSP-S2 2022 迷惑行为大赏

CCF CSP-S2 2022 迷惑行为大赏 | 吉林分会场

版本:DEV 2022/11/15 07:55 ±5min

声明 | Exclaim

编辑器:Visual Studio Code | Version 1.72.2+(编写过程中可能更新编辑器)

图表生成器:Microsoft Excel

以下完全由笔者翻看整理,如有侵权,请联系删除。

统计 | Summary

各题提交人数

注:准考证号范围 JL-S00001 ~ JL-S00231。这 231 人均收集了代码。

格式:有效文件人数 / 长度大于 100 字节的文件数(这里主要考虑到有些代码只有框架) / 总人数

holiday:198 / 195 / 231 注意,在文件夹内发现了名包含 holiday 但不为 holiday 的文件,这里忽略掉了,下同。

game:193 / 191 / 231

galaxy:147 / 137 / 231 发现有一份文件大小为 99 B()

transmit:127 / 117 / 231 发现有一份文件大小为 102 B,与 99 B 文件的考生并非同一人。

sum: 665 人次文件名正确,其中超过 100 B 的代码有 640 份;692 份 cpp 文件;相当于有 27 份冗余文件(3.90%)没有删除,与去年 NOIp 相比这个数据相对下降了很多(NOIp 9.14%)。

重点内容

使用 VSCode 搜索功能查询。

以下均以 231 人、692 份代码为总数。

  1. 搜索 freopen 关键字,共搜索到 625 份文件中有 3611 个结果。这意味着有些文件中有四个甚至六个 freopen(不一定注释)。
  2. 接上文,其中 00165 选手的 galaxy 中有 12 个 freopen,其中 10 个注释掉了;
  3. 00170 的 transmit 中有 2,352 个 freopen,均没有注释。
  4. 刨去以上两个特殊情况,其余 623 份文件中有 1247 个结果。这意味着大部分人都写对了 freopen,但其中一个人额外使用了一个 freopen。以下查细节的时候会说。
  5. 搜索 //freopen 关键字,共搜索到 21 文件中有 45 个结果。刨去 2. 中提到的 10 个注释,20 份文件有 35 个结果。部分文件中将本该用于输入输出的 freopen 注释掉了。
  6. 没有人写反 stdin 和 stdout。
  7. 搜索 ifstream 和 ofstream 无结果。
  8. 搜索 ksm 发现没有人用此作为变量或函数名。
  9. 磅 15 便士。
  10. 有 1 份代码使用了 pbds,3 份代码使用了双下划线开头的标识符。
  11. 无人辱骂 ccf,一人在注释中提到了 ccf。可能是由于去年的“暴戾语言事件”。
  12. 共 2 文件使用 fuck。
  13. 1 个文件中有 RP 一词。
  14. 48 处 clog 和 cerr,无人使用 stderr。
  15. 135 人、1346 次使用下划线。

文件之最

最大的文件是一份 11,034,325 B 的、一份 1,204,750 B 的打表文件,很可惜 CCF 不评测大文件;

最小的文件是 2 份空文件和 6 份只有一个换行的文件。

民间成绩统计

共 100 人有成绩,其余 131 人爆零,有大量“没 码 人”(无恶意),最高分为 S00205 的 340pts,其次为 003 和 211 的 316、315pts。

分数分布图

迷惑行为 Main

为方便查看,除刻意保留外,所有源代码都被格式化为空格缩进,每级4格。

JL-S00001 等 6 人

Size: 5 items, totalling 0 bytes

没 码 人(一语双关

不排除没考的情况。

完整名单 (处刑榜):

JL-S00001
JL-S00008
JL-S00016
JL-S00029
JL-S00030
JL-S00035
JL-S00046

JL-S00004 等 13 人

/* JL-S00004/galaxy/galaxy.cpp 1 - 15*/
#include <bits/stdc++.h>
using namespace std;
int main()
{
    freopen("galaxy.in", "r", stdin);
    freopen("galaxy.out", "w", stdout);
    int n, m, q, u, v;
    cin >> n >> m;
    for (int i = 1; i <= m; i++)
        scanf("%d%d", &u, &v);
    cin >> q;
    while (q--)
        printf("NO\n");
    return 0;
}

骗 分 人(省略其他人的骗分代码)

完整名单 (处刑榜):

JL-S00004
JL-S00007
JL-S00010
JL-S00013
JL-S00014
JL-S00015
JL-S00019
JL-S00021
JL-S00022
JL-S00027
JL-S00028
JL-S00034
JL-S00036
JL-S00039
JL-S00041
JL-S00042

JL-S00005

/* galaxy.cpp */
#include <bits/stdc++.h>
using namespace std;
int main()
{
    freopen("galaxy.in", "r", stdin);
    freopen("galaxyl.out", "w", stdout);
    int n, m, u, v, q;
    cin >> m >> n;
    for (int i = 1; i <= m; i++)
    {
        cin >> u >> v;
    }
    cin >> q;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
/* game.cpp */
#include <bits/stdc++.h>
using namespace std;
int main()
{
    freopen("game.in", "r", stdin);
    freopen("game.out", "w", stdout);
    int n, m, q, x, y, z;
    cin >> n >> m >> q;
    for (int i = 1; i <= n; i++)
        cin >> z;
    for (int j = 1; j <= m; j++)
        cin >> x;
    cout << "0" << endl;
    cout << "4" << endl;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
/* holiday.cpp */
#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("holiday.in","r",stdin);
    freopen("holiday.out","w",stdout);
    int n,m,k,f,x,y;
    cin>>n>>m>>k;
    for(int i=1;i<=n-1;i++)
        cin>>f;
    for(int j=1;j<=m;j++)
        cin>>x>>y;
    cout<<"27"<<endl;
    fclose(stdin);
    fclose(stdout);
    return 0;
}
/* transmit.cpp */
#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("transmit.in","r",stdin);
    freopen("transmit.out","w",stdout);
    int n,q,k,v,a,b,s,t;
    for(int i=1;i<=n;i++)
        cin>>v;
    for(int j=1;j<=n-1;j++)
        cin>>a>>b;
    for(int g=1;g<=q;g++)
        cin>>s>>t;
    fclose(stdin);
    fclose(stdout);
    return 0;
}

摆 烂 人 && 文 件 错 误 人

JL-S00006

galaxy/galaxy.cpp 输样例
game/game.cpp
 11 | cout<<o<<endl; // o 未定义
 17 | cout<<-2>>endl;
transmit/transmit.cpp
  9 | cout<<12<<endl; // 中文分号
> holiday
    holidy.cpp

完 全 摆 烂 人 && c o u t 读 入 人 && 切 错 输 入 法 人 && 打 错 文 件 名 人

JL-S00009

/* galaxy.cpp not formatted */
#include<bits/stdc++.h>
#include<cmath>
using namespace std;
int main()
{

freopen("galaxy.in","r",stdin);
freopen("galaxy.out","w",stdout);
int n,m,t,q,u1;
cin>>n>>m;
int a[111111],b[1111111];
for(int i=1;i<=m;i++)
{

    cin>>u>>y;
}
cin>>q;
for(int j=1;j<=q;j++){
    cin>>t;

    if(t==2){cin>>u1;cout<<"NO"<<endl;

}
     return 0;
}
/* game.cpp not formatted */
#include<bits/stdc++.h>
using namespace std;
int a[111],b[111],c[111][111];
int n,m,p,l1,l2,r1,r2,i,j,k;
int main()
{
freopen("game.in","r",stdin);
freopen("game.out","w",stdout);

cin>>n>>m>>p;
for( i=1;i<=n;i++) cin>>a[i];
for( j=1;j<=m;j++) cin>>b[j];

  for(int k=1;k<=p;k++)
  {

        cin>>l1>>r1>>l2>>r2;
         sort(a+l1,a+r1);
  sort(b+l2,b+r2);
      cout<<a[r2]*b[l1]<<endl<a[r1]*b[l2]<<endl;
  }

}
/* holiday.cpp not formatted */
#include<bits/stdc++.h>
#include<cmath>
using namespace std;
int main()
{

freopen("holiday.in","r",stdin);
freopen("holiday.out","w",stdout);

int a[2501],b[10000][3];
int n,m,ans=0,k,i,j,f;
cin>>n>>m>>k;
for(i=2;i<=n;i++)
    cin>>a[i];
    a[1]=0;
             sort(a+1,a+n+1);
    for(j=1;j<=m;j++)
    {
            for(f=1;f<=2;f++)
            {
                cin>>b[j][f];
            }
    }

             ans=a[n-2]+a[n-1]+a[n];
             cout<<ans<<endl;
     return 0;
}

C E 人 && 骗 分 人 && 没 码 人(transmit)

JL-S00012

/* game.cpp 15 - 19 */
int l1, r1, l2, r2, maxx = -114514114;
scanf("%d %d %d %d", &l1, &r1, &l2, &r2);
for (int i = l1; i <= r1; i++)
{
    int minx = 114514114;

恶 臭 人

JL-S00017

/* galaxy.cpp */
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
    freopen("galaxy.in","r",stdin);
    freopen("galaxy.out","w",stdout);
    cout<<"NO
           /* 省略 94 个 NO */
           NO";

}
/* game.cpp */
#include<iostream.

没 码 人(transmit) && 不 会 循 环 人 && C E 人

这位选手不会用原始字符串 R"( )",于是 CE 了。

JL-S00020

/* galaxy.cpp, game.cpp, holiday.cpp, transmit.cpp 1 - 12 */
/*
 time is 
 so sad and fleeting
 cant be controled
 like a river
 never stops
 space is
 emptiness dark and so cold
 can you define
 its presence
 does it exist
 */

/* galaxy.cpp 86 - 90 */
/*
 如今CSP2022就在眼前,我必须考虑这是不是我此生仅有的机会
 我相信,模拟法能有过去的霸主地位,猪国杀功不可没
 重铸暴力模拟荣光,我辈义不容辞
*/

/* game.cpp 50 */
//JDG Fighting! 

/* holiday.cpp 81 - 82 */
//1!5!哥们在这给你深搜
//都什么年代,还在学传统信息学?

/* transmit.cpp 36 */
//失败总是贯穿OI的始终,这就是OI

魔 怔 人

事实上这位选手民间成绩 125,在 JL 算是不错的成绩了。()

JL-S00022

/* game.cpp 1 */
#incldue<bits/stdc++.h>

C E 人

JL-S00023

/* galaxy.cpp */
#include<bits/stdc++.h>
using namespace std;
int u[10000000],v[10000000],g[1000000][3];
int main(){
     freopen("galaxy.in","r",stdin);
    freopen("galaxy.out","w",stdout);
    int m,n,q;
    cin>>m>>n;
    for(int i=0;i<m;i++)
    {
        cin>>u[i]>>v[i];
        }
    cin>>q;
for(int w=0;w<q;w++)
{
    if(w==0) cout<<"YES";
    else{
    if(w==1) cout<<"YES";
    else{

    if(w%2==0) cout<<"NO";
    else{
if(w%3==0) cout<<"YES";
else{
    cout<<"NO";
    }
}}}}

    return 0;
    }
/* game.cpp */
#include<bits/stdc++.h>
using namespace std;
int b[100000],h[1000090],y[1000000][4],d,c,j[100000];
int main(){
    freopen("game.in","r",stdin);
    freopen("game.out","w",stdout);
    int p,n,m;
    cin>>n>>m>>p;
    for(int i=0;i<n;i++)
    {
        cin>>b[i];
        }
    for(int i=0;i<m;i++)
    {
        cin>>h[i];
        }
    for(int i=0;i<p;i++)
    {
        cin>>y[i][1]>>y[i][2]>>y[i][3]>>y[i][4];
        }
    for(int i=0;i<p;i++)
    {
        if(b[i]>=y[i][1]&&b[i]<=y[i][2])
        {
            for(int a=0;a<n;a++)
            {
                if(b[a]>d) d=b[a];
                }}
        if(h[i]>=y[i][3]&&h[i]<=y[i][4])
        {
            for(int a=0;a<n;a++)
            {
                if(b[a]<c) c=b[a];
                }
            }
        j[i]=d*c;
    }

    for(int i=0;i<p;i++)
    {
        cout<<j[i];
        }

    return 0;
    }
/* transmit.cpp */
#include<bits/stdc++.h>
using namespace std;
int main(){
    freopen("transmit.in","r",stdin);
    freopen("transmit.out","w",stdout);
    int n,q,k;
    cin>>n>>q>>k;
    for(int i=0;i<q;i++)
    {
        cout<<n/2+k%2;
        }
    return 0;
    }

混 乱 缩 进 人 && 一 口 气 人(输出不换行

表现不明显的 holiday.cpp 省去了。

JL-S00024

/* transmit.cpp 31 */
printf("I have no idea.\n");

直 抒 胸 臆 人

JL-S00025

galaxy.cpp Size: 5.8 KiB (5919 bytes)

码 农

这位选手 galaxy 一题写了很长的暴力,得了 40 分。

JL-S00026

> galaxy
    141919.cpp
> game
    2.cpp
> holiday
    1145.cpp
> transmit
    180.cpp

恶 臭 人 && 完 全 摆 烂 人

JL-S00031

/* galaxy.cpp, transmit.cpp */
#include<bits/stdc++.h>
using namespace std;
signed main()
{
    return 0;
}
/* holiday.cpp */
if (n <= 25 && m <= 60)
    return bully::solve();
else if (K == 0)
    return kis0::solve();
else if (n <= 320 && m <= 1024)
    return mlogn::solve();
else
    return none::solve();

部 分 摆 烂 人 && 分 类 讨 论 人

JL-S00032

/* galaxy.cpp */
if(Eu[mk[calc(u,v)])])continue;
/* game.cpp 116, 119, 166-167 */
//gg RP++!
//jj Cute!
//T2 ST你不爱,非要在T1身上找存在是吧.
//英雄可以受委屈,但是你不能用你的标算踩我的ST表!!!!!
/* holiday.cpp 80-92 */
//其实我先开的T2,你可以去看看我的T2代码(
//但是我觉得T1的部分分很好得
//17:06
//T1就是歌姬,我不会做,寄
//17:12
//虽然这不太可能,但是我是一个OIer
//我要拿到我能拿到的每一分,做到我所能做到的最好
//向着200pts!迈进!
//17:20
//乐观主义果然不行。
//17:42
//小样例过了,估70pts
//17:57
/* Statastics */
galaxy.cpp Size: 2.4 KiB (2453 bytes)
game.cpp Size: 5.2 KiB (5374 bytes)
holiday.cpp Size: 2.2 KiB (2278 bytes)
$ cd /.../JL-S00032/galaxy/
$ g++ galaxy.cpp -std=c++14 -O2 -o galaxy -Wall -Wextra
galaxy.cpp: In function ‘void tarjan(long long int)’:
galaxy.cpp:46:25: error: ‘v’ was not declared in this scope
   46 |         if(Eu[mk[calc(u,v)])])continue;
      |                         ^
galaxy.cpp:46:28: error: expected ‘]’ before ‘)’ token
   46 |         if(Eu[mk[calc(u,v)])])continue;
      |                            ^
      |                            ]
galaxy.cpp:46:29: error: expected primary-expression before ‘]’ token
   46 |         if(Eu[mk[calc(u,v)])])continue;
      |                             ^

括 号 匹 配 人 && 码 农

这位选手在 infOJ 上得分 170。

JL-S00037

/* galaxy.cpp */
#include <cstdio>
using namespace std;
int main(){
    printf("YES");
    return 0;
}
/* holiday.cpp */
#include <cstdio>
using namespace std;
int main(){
    printf("0");
    return 0;
}

骗 分 人 && 标 准(IO) 人

JL-S00038

太长了,不放代码了。这位选手一题是空的,三题写了用指针维护的复杂数据结构,全部 CE 了。祝好。

JL-S00039

/* game.cpp 7-8 */
long long a[100100], b[100100];
int64_t c[1001][1001];
/* stdint.h 41 */
__MINGW_EXTENSION typedef long long  int64_t;

多 此 一 举 人

JL-S00040

/* game.cpp */
#include<bits/stdc++.h>
using namespace std;
int main

半 途 而 废 人

JL-S00043

/* transmit.cpp 6-11, 21 */
struct p
{
    int b;
    int e;
};
p c[N];
        cin >> c[i].b >> c[i].c;

C E 人

JL-S00044

/* holiday.cpp 5 */
char ans[20][99999999], a[3000][20], bk[3000]; // 1,907.41 MiB

M L E 人

JL-S00045

/* game.cpp 12, 33 */
double a[114514], b[114514], c[10], d[10];
long long ans[114514];

恶 臭 人

JL-S00048

/* transmit.cpp 117(146 formatted) */
printf("oooooops! I forget how to type Tarjan LCA!!!\n");

摆 烂 人

JL-S00063

/* galaxy.cpp, game.cpp, holiday.cpp, transmit.cpp 1 */
//by luogu 578029
/* galaxy.cpp 7-12 */
bool pink_rabbit(){
    for(int i=1;i<=n;i++){
        if(a[i]!=1) return 0;
    }
    return 1;
}
/* holiday.cpp 5, 12-17, 29, 37 */
int n,m,k,kkksc03[10],b,c;
bool pink_rabbit(int x){
    for(int i=1;i<=a[x].l;i++){
        if(a[x].down[i]==1) return 1;
    }
    return 0;
}
                goto chen_zhe;
        chen_zhe:;
/* transmit.cpp 2-18, 24-26 */
//kkksc03 ak ioi
//chen_zhe ak ioi
//pink_rabbit ak ioi
//soha ak ioi
//xht ak ioi
//wyxkk ak ioi
//dottle ak ioi
//r_s_y ak ioi
//minstdfx ak ioi
//rin ak ioi
//lin_to_to ak ioi
//_bzy ak ioi
//xiaohua ak ioi
//xiaobo ak ioi
//sheng xia de xiang bu qi lai le /kk
//dui le hai you
//i ak ioi!!!!!!!!!!!!!!!!!!!
        //while(1);
//zhe yang neng ka 1min15s !
//suan le ka ping ce jin sai san nian , bu ka le

签 名 人 && 洛 谷 人 && A K I O I 人 && 卡 评 测 人(伪)

(说句闲话,有的人名打错了

JL-S00217

/* galaxy.cpp 42 */
icin >> q;

i C i n 人 && C E 人