CSP-S 2023 SD 赛区迷惑行为大赏

· · 个人记录

首先让我们观察一下代码文件夹的大小:

好的非常不错啊。

文件统计

本次 CSP-S 共有 1190 人参加,共 5861 个文件夹,4672 个文件,有效代码 4397 份,总长度 6,647,415。

T1 lock 共有 1177 人提交,提交率 98.91\%,代码长度总和 1,554,812,占总长度的 23.39\%。

T2 game 共有 1167 人提交,提交率 98.07\%,代码长度总和 2,742,725,占总长度的 41.26\%。

T3 struct 共有 1006 人提交,提交率 84.54\%,代码长度总和 1,392,611,占总长度的 20.95\%。

T4 tree 共有 1047 人提交,提交率 87.98\%,代码长度总和 1,554,812,占总长度的 14.40\%。

超过 10KB 的代码除去四个大样例外就是 SD-S00628 的 lock,恭喜这位选手在此题取得了 30 分的好成绩!

AC 率

T1 lock 共 564 人 AC,AC 率 47.40\%,平均分 65.93 分。

T2 game 共 47 人 AC,AC 率 3.95\%,平均分 22.32 分。

T3 struct 共 34 人 AC,AC 率 2.86\%,平均分 5.21 分。

T4 tree 共 13 人 AC,AC 率 1.09\%,平均分 3.11 分。

总平均分 96.57 分。

重量级选手:SD-S00184

大家就看代码就行了。

SD-S00184\lock\lock.cpp

#include <bits/stdc++.h>
#string longlong
using namespace std;
int n,a[10][10];
cin<<n;
int main(){
    fireopean("lock.in","r",stdin);
    fireopean("lock.out","w",stdin);
    scanf("%11d"%11);
    for(int i=1;i<=n;i++){
        for(int j=1;j<=5;j++)
    }
    if(n == 1){
        puts("81");
        return 0;
    } 
    if(n == 2){
        int cnt == 0;
        for(int i=1;i<=5;i++){
            for(int j=1;j<=n;j++)

            if(a[1][1]){



                }
        }

    }
    return 0;

}

SD-S00184\game\game.cpp

#include <bits/stdc++.h>
using namespace std;
int N;
int check(int s);
int main{
fireopean("game.in","r",stdin);
fireopean("game.out","w",stdin);
for(int i=1;i<=1;i++){
    for(int j=1;j<=i;j++){
        if(int i=1;i<=j;i++){
    if(int j=1;j<=1;j++){
        else return 0;
 }
    }
       }    
         }
    for(int i=2;i<=2;i++){
        for(int j=2;j<=i;j++){
            if(int i=2;i<=j;i++){
                if(int j=2;j<=2;j++){

                    else return 0;
                }
            }
        }
    }

if(int N=1;N==i;N++){
    else return 0;
}
    return 0;

}

SD-S00184\struck\struck.cpp

#include<bits/stdc++.h>
using namespace std;
int main(){
fireopean("struck.in","r",stdin);
fireopean("struck.out","w",stdin);





}

SD-S00184\tree\tree.cpp

#include<bits/stdc++.h>
using namespace std;
int n,m;
int long long m[1001]
int main(){
fireopean("tree.in","r",stdin);
fireopean("tree.out","w",stdin);    
for(int i=1;i<=n;i++){
    for(int j=1;j<=i;j++)
    if(n=1;n<=i;n++){
        if(int i=1;i<=j;i++)


    }
}



}

重量级选手二:SD-S00161

SD-S00161\lock\lock.cpp

#include<bits/stdc++.h>
using namespace std;
intmain(){
    freopen("lockin","r",stdin);
    freopen("lockout","w"stdout);
    int a;
    scanf("%d",&a/n);
    int b;
    b=0;
    int c;
    int d:
    while(b!=a){    
        b++;
        printf(b/n);
        scanf("%d",&c/n);
    };
    if (a=1){printf(81);};
    if(a!=1){d=36*a;printf(d);}; 
    return 0    
}

SD-S00161\game\game.cpp

#include<bits/stdc++.h>
using namespace std;
intmain(){
    freopen("gamein","r",stdin);
    freopen("gameout","w"stdout);
    float a;
    int b;
    int c;
    scanf("%d",b/n);
    scanf("%d",a/n);
    c=(b/2)*a;
    pintf(c);
    return 0    
}

SD-S00161\struct\struct.cpp

#include<bits/stdc++.h>
using namespace std;
intmain(){
    freopen("structin","r",stdin);
    freopen("structout","w"stdout);
    return 0    
}

SD-S00161\tree\tree.cpp

#include<bits/stdc++.h>
using namespace std;
intmain(){
    freopen("treein","r",stdin);
    freopen("treeout","w"stdout);
    int a;
    int b;
    int c;
    int d;
    int n;
    int e;
    int f;
    int g;
    int h;
    int e; 
    h=1;
    scanf("%d",&n/n);
    while(h<n+1){
    scanf("%d",&a); 
    scanf("%d",&b);
    scanf("%d",&c/n);
    scanf("%d",&d);
    scanf("%d",&e/n);
    h++;
    };
    printf(g=1+b+n*(a/c));      
    return 0
}

重量级选手三:SD-S00168

SD-S00168\lock\lock.cpp

#include<bits/stdc++.h>
using namespace std;
int main()  
{   
int n,a,b,c,d,e,t;
    cin>>n;
    //shuru 
for (int i=1;i<=n;i++)  
    {
    cin>>a>>b>>c>>d>>e;
    t=5*9+(5-n)*9;  
    }
    //chuli 
    cout<<t;        
    //shuchu    
    return 0;
 } 

SD-S00168\game\game.cpp

#include<bits/stdc++.h>
using namespace std;
freopen ("game.in"."r".stdin) 
int main()
{
    int n,t;
    int a[200]; 
    cin>>n>>a[n];
    for (int i=1;i<=n;i++)
    {   if(a[1]=a[2])
        {   
        i+=t;
        }


    }




    cout<<t;

freopen ("game.out"."w".stdin)  
fclose ("game.in"."r".stdin) 
fclose ("game.out"."w".stdout)  
    return 0;
 } 

SD-S00168\struct\struct.cpp

#include<bits/stdc++.h>
using namespace std;
freopen("struct.in"."r".stdin);
freopen("struct.out"."w".stdin);
int main()
{
    long addr,t[200],n[200],op,k,ti[200],ni[200],s[200];
    if(op=1)
    {   cin>>s[200]>>k;

        for(int i=1;i<=k;i++)
            cin>>ti[200]>>ni[200];
    }
    if(op=2)
        cin>>t[200]>>n[200];
    if (op=3)
        cin>>s[200];
    if  (op=4)
        cin>>addr;
    struct d{
        short a;
        int b;
        short c;
    };
    d e;

fclose("struct.in"."r".stdin);
fclose("struct.out"."w".stdout);    




    return 0;
 } 

SD-S00168\tree\tree.cpp

#include<bits/stdc++.h>
using namespace std;
int main()
{
freopen("tree.in"."r".stdin) 
freopen("tree.out"."w".stdin) 
    int n;
    cin>>n;
    for (i=1;i<=n;i++)
        cin>>ai>>bi>>ci;


fclose("tree.in"."r".stdin) 
fclose("tree.out"."w".stdout)   
    return 0;
 } 

出这个错误的还有 SD-S00336(下面是 SD-S00336 tree 代码节选):

    int n,ai,bi,ci,ui,vi,d=0,t,z=1;
    cin>>n;
    for(int i=0;i<n;i++) 
    {
        cin>>ai>>bi>>ci;

SD-S00339 struct 代码:

#include<bits/stdc++.h>
using namespace std;

long long n,op,e;
int main()
{
    //freopen("struct.in","r",stdin);
    //freopen("struct.out","w",stdout);
    cin>>n>>op;
    int k,ni,ti;
    char s1;
    cin>>ti,ni;
    if(op==1){
    cout<<e;
    }
    int t,n;
    cin>>t>>n;
    if(op==2){
        cout<<e;
    }
    int s;
    cin>>s;
    if(op==3){
        cout<<e;
    }
    int m,addr;
    cin>>m;
    if(op==4){
        cout<<addr;
    }
    return 0;
}

SD-S00339 tree 代码节选:

    for(int i=n;i<=m;i++){
        int a[i];
        cin>>a[i];
        ans+=a[i];
    }

重量级选手四:SD-S00190

SD-S00190\lock\lock.cpp

#include<iostream> 
#include<cstdio>
using namespace std;
int main[] {
    printf("lock.in","R",stdin);
    printf("lock.out","r",stdin);
}
    return 0;

SD-S00190\game\game.cpp

#include<iostream> 
#include<cstdio>
using namespace std;
int main[] {
    return 1
    printf("lock.in","R",stdin);
    printf("lock.out","r",stdin);
}
    return 1

SD-S00190\struct\struct.cpp

return 1

SD-S00190\tree\tree.cpp

return 1

重量级选手五:SD-S00505

SD-S00505\lock\lock.cpp

include<iostream>
using namespace std;
int main()


SD-S00505\game\game.cpp

include <iostream>
using namespace std;
int main()

SD-S00505\struct\struct.cpp

include<iostream>
using namespace std;
int main()





SD-S00505\tree\tree.cpp

include<iostream>
using namespace std;
int main()




重量级选手六:SD-S00648

SD-S00648\lock\lock.cpp

#include<bits/stdc++.h>
using namesable std;
int main(){
    return 0;
}

SD-S00648\game\game.cpp

#include <bits/stdc++.h>
usingnamespace std;
int main(){
    }

SD-S00648\struct\struct.cpp

#include <bits/stdc++.h>
 using namespace std;
 int main(){
    return 0;
 }

SD-S00648\tree\tree.cpp

#inciude <bits/stdc++.h>
using namespace std;
int main(){
return 0;   
} 

SD-S00863 tree 文件夹下共包含这些文件:

rand3.cpp
rand3.exe
tree.cpp
tree.exe
tree1.ans
tree1.in
tree2.ans
tree2.in
tree3.ans
tree3.in
tree4.ans
tree4.in
拍子3.cpp
拍子3.exe

freopen 相关

//freopen 共在 79 份文件中出现了 353 次。

无效 freopen

SD-S00106 lock 代码节选:

//freopen("
//freopen("
//freopen("
//freopen("
//freopen("
//freopen("
//freopen("
//freopen("
//freopen("
//freopen("
//干扰统计人 

SD-S00128 tree 代码节选:

int main()
{
    //freopen("tree.in","r",stdin);
    //freopen("tree.out","w",stdout);
    cout<<" Learning is a lifelong journal."<<endl;
    cout<<" To my first and the last csp-s.";
    return 0;
}

祝你好运。

SD-S00140 struct 代码节选:

//freopen("struct.in" , "w" , stdin);
呵呵,吊个鱼 

这里提醒一下,正确的写法是“钓鱼”而非“吊鱼”。

SD-S00232 lock 使用文件指针与 fopen 而非 freopen。

SD-S00236 lock, game, struct 全部使用 ifstream / ostream 而非 frepen,且 tree 文件夹下无文件。

SD-S00190 lock, game 使用了 fstream。

SD-S00644, SD-S00806, SD-S00839, SD-S01107, SD-S01152 所有题目全部使用 ifstream / ofstream,其中 SD-S01107 所有输出文件名都写错了。

SD-S00453 使用了自己定义的 cin / cout,内部实现为快读快输。

SD-S00830 情况比较复杂:

lock 一题使用文件指针与 fopen。

game 一题使用文件指针与 fopen,又声明了没有用到的 ifstream / ofstream。

struct 一题没有代码。

tree 一题使用 ifstream / ofstream。

SD-S00320 game 代码节选:

    //freopen("game.in","r",stdin);//老师好! 
    //freopen("game.out","w",stdout); //老师工作辛苦了! 
    freopen("game.in","r",stdin); //老师再见!
    freopen("game.out","w",stdout);

SD-S00341 全部题目均使用了 fopen。

SD-S00947 tree 代码节选:

//freopen(被骗啦)

SD-S01070 tree 代码节选:

/*
It`s 16:50 now.
Not very late that enough for me to make violence with T3.
But I`ve already lost desiration to do that.
I do dislike playing with strings.
Not very late but...

Away From OI!!!

I didn`t major in OI for all the time,since junior 1 when I got touched with OI,or coding.
I just consider it as my hobby that I code just for fun,not for the prize.
The truth is so clear that since I got the first prize in noip2022,I hardly ever coding any more.

I have coding for a little more than four years and this year is the forth year participating in CSP.
wow That`s incredible that I have swum in the endless deep dark sea called OI for four years.

In junior 1,I couldn`t decide which culb to join,the math club or the computer coding club.
But both of the club asked that testing first before joining.
And the computer coding club`s testing came earlier and I passed it,so I joined it.
That`s why I got in touched with OI.

The first year I took part in OI was 2020 when I was junior 2.
In CSP-J 2020,I just got 130pts that only enough for the second prize.
In the second year I took part in CSP-S but I didn`t pass the paper test.How stupid I was.
The third year I took part in noip and I got the first prize.

During all my OI career,only the noip province one could be talked about.
But actually ,I didn`t spend any effort on OI,so the poor result servered me right.

Several years ago,I was so interested in computer that I wanted majored in computer science in the university.
But now I have changed my mind.

Taking part in CSP this year is just for joking.
Before the race,I have not do any coding for more than seven months!

I think that I have no talent in OI,and I am not hard-working.
I just play OI for fun.
All in all,if you do not take winning or losing so seriously,you will not lose.
JOKER never loses~~~

A man with wisdom don`t get wet in the love river.
That he have no spare time to put effort in his motherland`s developing.

It`s amazing that I have typed soooo much.
Perhaps I need some solutions to let my words be seen.
Why I want to do that stupid things? I don`t know :(

CCF 
I LOVE YOU SO MUCH , CCF!!!

But I have no time to play interesting things with you CCF,because I liked to play with my dk.
And I like to play with van ahh deeep da~rk.
China
Computer
Foooooooooooooooooooooooooooo

errrr..?
int mian(){
    retrun 0;
}
int mian(){
    return -1;
}
#define mian main
#define long long int
#define itn int
//freopen("tree.in","r",stdin);
//freopen("tree.out","r",stdout);
freopen("trre.in","r",stdin);
freopen("look.in","r",stdin);
freopen("sama nia h.in","r",stdin);
freopen("strut.in","r",stdin);
freopen("strutc.in","r",stdin);
freopen("stuct.in","r",stdin);
freopen("strike.in","r",stdin);

oooooooooooo

#inclued
//include
#include<bits\stdc++.h>
#include<bits/stdc++.h>
\zqc/
usig namesapce std

olish

I really want to be your dog!!!CCF!!!
I really want you to be my dog!!!ZQC!!!

I love paly Genshin impact.Gayshit impart.
I want to be admitted in CGU.China Genshin University.
玩原神玩的 
*/

祝你好运。

SD-S01110 struct 代码节选:

/*
考场游记
考完试会补充初赛部分和考前部分以及考后查分
14:12 进考场了,感觉很不错。
14:18 公开了压缩包密码,但没有公开PDF密码 
14:20 写完缺省源
14:31 还没有公开PDF密码,都开考了
14:32 公开了
14:34 T1好像不会
14:36 好像输出(不可明说的数字)有30分
14:39 有点头绪
14:40 忽然发现O((不可明说的数字)^n)有50分
14:41 数据这么小想到?
14:46 ?是错的,但想到正解了! 
14:52 好像假了
15:06 又会正解了
15:25 啊啊啊怎么才写了这么点,没事按着我的安排可以写到16:06
15:33 又假了
15:35 忽然发现把题想复杂了,又会了(
15:40 发现最快的做法只用大约20000次tick,但我懒得写,写了个1e6 tick的,反正能过 
15:49 打完了,一切正常,样例全过,成功浪费大约一小时想非正解,二等奖稳了,可以去参加NOIP了!但是要跑500m+了,没事不算太累。 
16:05 T4想到25pts特殊性质做法,正在保佑一等ing 
16:20 T4 25pts假了/oh
16:25 T2想出一个25~35的做法,因为25是n<=10,35是n<=800,我是O(n^3) (大型尴尬现场)
16:45 打完了,一切正常,两个在范围内的样例已过。又想到了T4的25pts做法,而且跑不满。
17:06 T4打完了
17:10 自己造了几组数据没问题,摆烂! 但是很忧虑150~160是否一等。是的话有蓝勾但是要跑1000m( 
17:22 小恐龙创最高纪录3177/hsh
17:25 本地T2 n=800 秒出结果,折磨牛? 
17:33 由于T3一点暴力都不会,所以用T3装游记(。为了上迷惑行为大赏 ,在T3下面加 //freopen 
给做迷惑行为大赏的人挂一下lg用户名:FeS2_qwq 
总结:估分100+(25~35)+0+25=150~160 第一次估分上11^2,激动。 
.......    .    .     . ....... ....... .......         .......
   .      . .   .    .  .       .       .     .         .
   .      . .   .   .   .       .       .     .         .
   .     .....  .  .    .       ....... ....... ....... .......
   .     .   .  .   .   .             . .                     .
   .    .     . .    .  .             . .                     .
....... .     . .     . ....... ....... .               .......


.......    .    .     . ....... ....... .......
   .      . .   .    .     .    .     .    .
   .      . .   .   .      .    .     .    .
   .     .....  .  .       .    .     .    .
   .     .   .  .   .      .    .     .    .
   .    .     . .    .     .    .     .    .
....... .     . .     . ....... ....... .......
*/
//freopen
//freopen
//freopen
// 接下来是 198 个注释掉的 freopen

@FeS2_qwq,我看到你了。

SD-S00761 代码节选:

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

    // freopen("struct.in","r",stdin);
    // freopen("struct.out","w",stdout);
    // ni ke neng bei pian le

SD-S00008 tree 代码节选:

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

SD-S00049 struct 代码节选:

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

SD-S00114 struct 代码节选:

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

这让我想起了 netbook。

SD-S00130 lock 代码节选:

    freopen("lock.in","r",stdin);
    freopen("lock.out","r",stdout);
...
        for (int j=1;j<=5;j++)
        {
= 

SD-S00093 struct 代码节选:

pair<string, int> p[]
int n;
int h[], ne[], idx, w[];
string e[];
...
    freopen("", "r", stdin);
    freopen("", "w", stdout);

SD-S00130 lock 代码节选:

    freopen("lock.in","r",stdin);
    freopen("lock.out","r",stdout);
...
        for (int j=1;j<=5;j++)
        {
= 
            if (x<=45)

SD-S00144 tree 代码节选:

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

SD-S00169 tree 代码节选:

    freopen("tree","r",stdin);
    freopen("tree","w",stdout); 

SD-S00663 struct 代码节选:

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

SD-S00846 struct 代码节选:

    freopen("struct2.in","r",stdin);
    //freopen("struct1.out","w",stdout);

SD-S01168 lock, struct, game 全部代码节选:

    freopen("<题目名>.in","w",stdin);
    freopen("<题目名>.out","r",stdout);

game 代码节选:

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

趣闻:// freopen 共在 2 份代码中出现了 4 次。

freopen 错误并因此丢分不完全统计

SD-S00092 所有代码节选:

    freopen("<题目名>.in","r",stdin);
    freopen("<题目名>.ans","w",stdout);

因此丢掉了 60+[0,25]+0+0=[60,85] 分。

SD-S00144 lock 因为没写 freopen 而丢掉了 100 分。

SD-S00169 tree 因为注释了 freopen 而丢掉了 60 分。

SD-S00201 lock 因为注释了 freopen 而丢掉了 10 分(Subtask 1 推出正确结论然后暴力 RE 了)。

SD-S00217 四题都没写 freopen 并因此丢掉了 30+0+0+0=30 分。

SD-S00250 全部代码节选:

    freopen("<题目名>.in","w",stdin);
    freopen("<题目名>.out","r",stdout);

并因此丢掉了 30+0+0+0=30 分。

SD-S00296 全部代码节选:

    freopen("<题目名>.in","w",stdin);
    freopen("<题目名>.out","r",stdout);

并因此丢掉了 60+0+0+0=60 分(lock 骗分骗了 30)。

SD-S00314 lock, game 代码节选:

    freopen("<题目名>.in","r",stdin);
    freopen("<题目名>.ans","w",stdout);

并因此丢掉了 30+0=30 分。

SD-S00336 lock 代码节选:

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

并因此丢掉了 30 分。

SD-S00343 全部代码节选:

    freopen("<题目名>.in","r",stdin);
    freopen("<题目名>.ans","w",stdout);

并因此丢掉了 30+50+0+0=80 分。

SD-S00372 game 代码节选:

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

并因此丢掉了 [0,5] 分(洛谷民间数据)。

SD-S00389 game 代码节选:

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

并因此丢掉了 25 分。

SD-S00395 game 代码节选:

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

并因此丢掉了 [15,20] 分。

SD-S00450 tree 因为没写 freopen 而丢掉了 15 分(洛谷民间数据)。

SD-S00484 lock 代码节选:

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

SD-00484 game 代码节选:

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

并因此丢掉了 30+0=30 分。

SD-S00514 game 因为注释了 freopen 而丢掉了 25 分。

SD-S00539 struct 因为注释了 freopen 而丢掉了 5 分。

SD-S00543 game 因为注释了 freopen 而丢掉了 25 分。

SD-S00557 代码节选:

// lock.cpp
    freopen("lock.in","r","stdin");
    freopen("lock.out","w","stdout");
// game.cpp
    //freopen("game.in","r","stdin");
    //freopen("game.out","w","stdout");
// struct.cpp
    freopen("struct.in","r","stdin");
    freopen("struct.out","w","stdout");
// tree.cpp
    freopen("tree.in","r","stdin");
    freopen("tree.out","w","stdout");

因此而丢掉了 30+0+0+0=30 分。

SD-S00561 代码节选:

// lock.cpp
    freopen("lock1.in","r",stdin);
    freopen("lock1.out","w",stdout);
// game.cpp
    freopen("game1.in","r",stdin);
    freopen("game1.out","w",stdout);

struct 没有 freopen,tree 没有代码。

因此丢掉了 40+0+0+0=40 分(洛谷民间数据)。

SD-S00579 代码节选:

// lock.cpp
    freopen("lock.in","r+");
    freopen("lock.out","w+");
// game.cpp
    freopen("game.in","r+");
    freopen("game.out","w+");

因此丢掉了 30+0=30 分。

SD-S00604 lock 代码节选:

int main()
{
    freopen("lock.in","r",stdin)
// 代码主体部分,且有输出
    freopen("lock.out","w",stdout)
    return 0;  
}

因此而丢掉了 30 分。

SD-S00634 lock 代码节选:

void 
int main()
{
    //freopen("lock.in","r",stdin);
    //freopen("lock.out","w",stdout);
    int n,a[10][10],b[10][10][100];
    cin>>n;
    if(n==1){
        cout<<81;
        return;
    }
...
    if(p==1)cout<<10-ans[1];
    if(p==2)cout<<
    if(p>3)cout<<
}

并因此丢掉了至少 30 分。

SD-S00634 game 代码节选:

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

并因此丢掉了 [0,5] 分(洛谷民间数据)。

SD-S00716 game 代码节选:

    freopen("game.in","r",stdin);
    freopen("game.ans","w",stdout);

并因此丢掉了 35 分。

SD-S00725 game 代码节选:

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

并因此丢掉了 [0,5] 分(洛谷民间数据)。

SD-S00735 game 代码节选:

void fileio(){
    #ifdef LGS
    freopen("in.txt","r",stdin);
    freopen("out.txt","w",stdout);
    #endif
} 
...
//  fileio();
//  freopen("game.in","r",stdin);
//  freopen("game.out","w",stdout);

并因此丢掉了 [10,20] 分(洛谷民间数据)。

SD-S00782 全部代码节选:

    freopen("<题目名>.in", "r", stdin);
    freopen("<题目名>.ans", "w", stdout);

并因此丢掉了 30+[0,10]+0+0=[30,40] 分(洛谷民间数据)。

SD-S00809 lock 代码节选:

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

并因此丢掉了 30 分。

SD-S00836 lock 代码节选:

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

struct 代码节选:

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

并因此丢掉了 40+0=40 分(洛谷民间数据)。

SD-S00902 全部代码节选:

// SD-S00902\lock\lock.cpp
    freopen("lockin","r","stdin");
    freopen("lockout","w","stdout");
// SD-S00902\game\game.cpp
    freopen("gamein","r","stdin");
    freopen("gameout","w","stdout");
// SD-S00902\struck\struck.cpp
    freopen("struckin","r","stdin");
    freopen("struckout","w","stdout");
// SD-S00902\tree\tree.cpp
    freopen("treein","r","stdin");
    freopen("treeout","w","stdout");

并因此丢掉了 30+0+0+0=30 分。

SD-S00936 lock 因为注释了 freopen 而丢掉了 40 分(洛谷民间数据)。

SD-S00955 lock 因为注释了 freopen 而丢掉了 30 分(洛谷民间数据)。

SD-S00976 game 因为注释了 freopen 而丢掉了 [20,25] 分(Subtask 1 暴力写炸了)。

SD-S01010 lock 因为注释了 freopen 而丢掉了 30 分。

SD-S01020 全部代码节选:

    freopen("D:\\SD-S01020邵俊豪\\<题目名>\\<题目名>.in","r",stdin);
    freopen("D:\\SD-S01020邵俊豪\\<题目名>\\<题目名>.out","w",stdout);

并因此而丢掉了 60+0+0+0=60 分(洛谷民间数据)。

SD-S01032 全部代码节选:

    freopen("<题目名>.in","r","stdin");
    freopen("<题目名>.out","w","stdout");

并因此而丢掉了 60+0+0+0=60 分(洛谷民间数据)。

SD-S01033 lock 代码节选:

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

并因此而丢掉了 50 分(洛谷民间数据)。

值得注意的是,同样在 lock 文件夹下,有一个叫做 lock(暴力).cpp 的文件,然而两文件内容完全相同。

SD-S01034 lock 因为注释了 freopen 而丢掉了 40 分(洛谷民间数据)。

SD-S01090 game 因为注释了 freopen 而丢掉了 [0,5] 分(洛谷民间数据)。

SD-S01103 全部代码节选:

    freopen("<题目名>.in","r",stdin);
    freopen("<题目名>.ans","w",stdout);

并因此丢掉了 0+[0,30]+0+0=[0,30] 分(洛谷民间数据)。

SD-S01107 全部代码节选:

ifstream cin("<题目名>.in");
ofstream cout("<题目名>.ans");

并因此丢掉了 10+0+0+0=10 分(洛谷民间数据)。

SD-S01117 lock 因为注释了 freopen 而丢失了 30 分(推出正确结论了没写),其他题目均注释了 freopen 但是本来就是 0 分。

SD-S01171 lock 因为注释了 freopen 而丢失了 30 分。

全体 OIer 默哀三毫秒。

SF《NOI 系列赛常见技术问题整理》相关情况统计

bits/stdc++.h 在 2799 份代码中出现了 2816 次。

bits\stdc++.h 在且仅在 SD-S01070 tree 的代码中出现过 1 次。

注意 #include <bits\stdc++.h> 在 NOI Linux 下无法通过编译。

#define int long long 在 422 个文件中出现了 424 次,40 个文件将其注释了。

using ll = long long 与 using i64 = long long 共出现了 26+8=34 次,被注释了 1 次。

typedef long long 在 391 文件中出现了 399 次,被注释了 5 次。

__int128 在 60 文件中出现了 145 次。

ios::sync_with_stdio 在 386 文件中出现了 390 次。

ios :: sync_with_stdio 在 1 文件中出现了 1 次。

fclose 在 1094 文件中出现了 2258 次。

使用 fclose 且没有刷新缓冲区的代码数目先等一等。

fread 在 9 文件中出现了 9 次,且都为 fread 快读。

__ 在 145 文件中出现了 473 次。

__gcd 未出现。

__builtin 与 __builtin_popcount 均在 15 文件中出现 15 次。

`gets, fgets` 函数未出现。 `itoa` 未出现,`iota` 在 $2$ 文件中出现了 $2$ 次。 `#pragma` 在 $11$ 文件中出现了 $11$ 次,均为手动开 O2,其中 $5$ 个被注释。 无人使用指令集优化。 `exit(0)` 在 $25$ 文件中出现了 $45$ 次。 `extc++.h` 与 `ext/` 分别出现了 $8$ 与 $10$ 次。 使用情况:只有 `gp_hash_table` 被使用了 $2$ 次。 基于范围的 for 循环:难以快速统计。 `auto` 在 $160$ 文件中出现了 $317$ 次。 结构化绑定:难以快速统计。 无人使用多线程。 `tuple` 仅被使用了 $1$ 次(SD-S00580 `lock`)。 `array` 被使用了 $5$ 次。 `register` 在 $89$ 文件中出现了 $180$ 次。 列表初始化:难以快速统计。 `rand` 在 $147$ 文件中出现了 $292$ 次(包括 `srand`)。 `shuffle` 未出现。 `system` 函数出现了 $6$ 次,其中两次被注释了,另外四次是 SD-00863 `tree` 中的对拍。 $15$ 份代码中使用了匿名函数。 重载运算符在 $76$ 文件中出现了 $105$ 次。 `inline` 在 $710$ 文件中出现了 $1270$ 次。 # 奇怪的字符串 ## luogu SD-S00285 `game` 代码节选: ```cpp /* SD-S00285 Luogu UID:363061 ID:sqh_let_it_be RP++ score++ */ ``` @sqh_let_it_be SD-S00466 `lock` 代码节选: ```cpp //luogu uid 592238 ``` @Eirin_Yagokoro SD-S00800 `lock` 代码节选: ```cpp /* ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 PrtSc ScrLK Pause ` 1 2 3 4 5 6 7 8 9 0 - = Backspace Insert Home Page Up NumLock / * - Tab q w e r t y u i o p [ ] Enter Delete End Page Down 7 8 9 + CapsLock a s d f g h j k l ; ' \ Enter Luogu 5.0 4 5 6 + Sihft z x c v b n m , . / Shift ↑ 1 2 3 Enter Ctrl Win Alt Space Alt Win Fn Ctrl ← ↓ → 0 . Enter */ ``` SD-S01025 `lock, struct, tree` 代码节选: ```cpp My Luogu User Id (uid) = 448887 ``` @cancan123456 SD-S00712 `tree` 代码节选: ```cpp /** 爱来自 MournInk(LG)。 *[025 pts] A. 树生长速度恒定 (或许是个贪心?) *[010 pts] B. 链 (wc 这不直接模拟) *[015 pts] C. 链或环 (当 [B] 做, 虽然极大概率错) ** p.s. 不对啊我直接判得了 *[015 pts] D. 问题可进一步抽象 (虽然不会,但是感觉 dp,所以不会) */ ``` @MournInk ## T3 大样例 T3 大样例在 $4$ 份代码中出现了 $4$ 次,还有 $4$ 个人没删大样例。 ## 原神 genshin yuanshen `原神` 共在 $2$ 文件中出现了 $2$ 次(SD-S00330 `struct` & SD-S01070 `tree`),SD-S00330 `tree` 代码节选: ```cpp cout<<"原神,启动"; ``` `genshin` 共出现了 $10$ 次,分散在 $7$ 个文件中: SD-S00081 `struct` 代码节选: ```cpp puts("Genshin Impact! Launch!"); ... }//Crazy... Who created this problem... ``` SD-S00321 的所有题目代码的前 $2$ 行: ```cpp //code by JuRuoOIer //Genshin Impact,launch! ``` @JuRuoOIer SD-S01108 `struct` 代码节选: ``` int genshin,b,n; ... cin>>genshin; switch(genshin){ ``` `yuanshen` 在 $3$ 文件中出现了 $12$ 次: SD-S00396 `lock` 代码节选: ```cpp int yuanshen = 0; if(a == le[f][1]) { yuanshen++; } if(b == le[f][2]) { yuanshen++; } if(c == le[f][3]) { yuanshen++; } if(d == le[f][4]) { yuanshen++; } if(e == le[f][5]) { yuanshen++; } if(yuanshen == 4) { continue; } ``` SD-S00396 `game` 代码节选: ```cpp char yuanshen[8005]; ... yisa[i] = yuanshen[i + q]; ... cin >> yuanshen; ``` SD-S00396 `struct` 代码节选: ```cpp struct yuanshen { string s; string t; bool vis; }; node ty[N]; yuanshen ys[N]; ``` ## ccf `ccf` 在 $21$ 个文件中出现了 $113$ 次,除去 $8\times12=96$ 次大样例还剩下 $9$ 份代码,$17$ 次。 SD-S00228 `struct` 代码节选: ```cpp //Thank you,CCF.What a difficult problem. ``` SD-S00278 `game` 代码节选: ```cpp // cout<<v<<" "<<u<<"ccf"<<endl; ``` SD-S00476 `game & lock` 代码节选: ```cpp scanf("%d",&n);//I Love CCF ``` SD-S00548 `struct` 与 SD-S00593 `tree` 代码节选: ```cpp //I love CCF ``` SD-00751 所有代码第一行: ```cpp #include <bits/stdc++.h>//if(wzy csp-s1=) give ccf 100 yuan; ``` SD-S00871 `struct` 代码节选: ```cpp #define CCF_ILVY 1145141919810; ... return CCF_ILVY; ``` 可以看到,各位选手都在用自己的方式表达对 CCF 的赞美之情。 ## love 520 `love` 在 $10$ 个文件中出现了 $12$ 次,。 SD-S00068 `struct` 代码节选: ```cpp cout<<"I love kutori"; ``` SD-S00466 `lock` 代码节选: ```cpp //luogu uid 592238 //I love Chtholly forever ``` @Eirin_Yagokoro SD-S00492 `game` 代码节选: ```cpp love cyl ``` SD-S00865 `tree` 代码节选: ```cpp if(fl) return puts("I Love lmy forever"),void(); ``` SD-S01011 `game` 代码节选: ```cpp #define dbg cout<<"lovewrt!!"; ``` `520` 共在 $2$ 份代码中出现了 $2$ 次: SD-S00752 `game` 代码节选: ```cpp int wn,wi,wj,wco=0,wla=-520,wfir,wlas,wlac=1; ``` SD-S01021 `game` 代码节选: ```cpp #define N 5200010 ``` ## problem $18$ 文件中出现了 $23$ 次。 SD-S00081 `game` 代码节选: ```cpp }//It's a good problem, but I don't know how to deal with it --- lyz ``` SD-S00081 `lock` 代码节选: ```cpp }//This problem wasted me one and half an hour... I can't accept it... ``` SD-S00602 `tree` 代码节选: ```cpp // 115pts Failed on Problem 2 ``` SD-S01037 `game` 代码节选: ```cpp // start coding: 14:59 // full of debuff // easy problem,feiwu // unordered_map ? // 15:12 code done, max data time: 0.6762s // data: rand(a,c) GG // finish coding: 15:30, 1.4s,CCF!!!! ``` SD-S01116 `tree` 代码节选: ```cpp // puts("I can't solve this problem...QAQ"); puts("7"); ``` SD-S01142 `struct` 代码节选: ```cpp // The last Problem I wrote during OI (J || S) ``` 祝你好运。 ## 知名人物 `kkksc03` 共在 $3$ 个文件中出现了 $12$ 次。 ## AK SD-S01001 所有代码节选: ```cpp #define M cerr<<"MKF ak IOI!"<<'\n'; #define S cerr<<"SYT ak IOI!"<<'\n'; ``` SD-S01087 `struct` 代码节选: ```cpp cout<<"I AK IOI!!"<<endl; ``` SD-S00632 `struct` 代码节选: ```cpp // who can help me ak csp-s r2 ``` ## code SD-S00081 `tree` 代码节选: ```cpp }//what is this? --- It's lyz's chaotic codes. //Why it's chaotic? --- Because lyz didn't know what he had written... ``` 很遗憾以这种方式认识你,lyz SD-S00633 `struct` 代码节选: ```cpp if(op==1) cout<<"This code is wonderful,hahaha\n"; ``` ## 杂项 SD-S00440 全部题目代码相同: ```cpp #include<bits/stdc++.h> using namespace std; int main() { return 0; } ``` SD-S00660 `struct` 代码节选: ```cpp /* freopen("struct.in","r",stdin); freopen("struct.out","w",stdout); Nover gonna give you up ~ Nover gonna let tou down ~ */ ``` SD-S01103 `struct` 代码节选: ```cpp //cout<<"I_AM_SB"; //if the data maker made a CaoZuo1 but did not to CaoZuo2~4 it,I can cheat more scores. ``` CSP-S2023y@1 在 $11$ 文件中出现了 $11$ 次。 c0y4@3z0 在 $10$ 文件中出现了 $10$ 次。 SD-S00228 `game` 代码节选: ```cpp // Game will be done. ``` SD-S00494 `game` 代码节选: ```cpp // O(n2) ? Anyway, passed the greatest sample. // but falled on 2e6 'a' // upd: passed on 2e6 'a'! ``` SD-S01103 `lock` 代码节选: ```cpp //visit my blog: cucucus.site! ``` SD-S01103 `game` 代码节选: ```cpp //get 50pts and run ``` SD-S01103 `struct` 代码节选: ```cpp if(op==1){ //cout<<"I_AM_SB"; //if the data maker made a CaoZuo1 but did not to CaoZuo2~4 it,I can cheat more scores. } ... // Wo Cai Bao Le // get 15 pts and run away!!! // //visit my blog: cucucus.site! ``` SD-S01103 `tree` 代码节选: ```cpp //Give Up //Have No Time To Write BaoLi ... //get 0 pts and run away //Wo Cai Bao Le //visit my blog: cucucus.site! // review chemistry //H He Li B Be //Ca ``` 元素周期表:H He Li Be B C N O F Ne Na Mg Al Si P S Cl Ar K Ca。 金属活动性顺序表:K Ca Na Mg Al Zn Fe Sn Pb (H) Cu Hg Ag Pt Au。 ## 汉字 使用正则表达式 `[\u2E80-\u9FFF]` 查询。 汉字共有 $17154$ 个,出现在 $429$ 个文件中。 SD-S00001 `tree` 代码节选: ``` 前三题分别是1,2,4kb这题应该是8kb 所以开始乱敲 ``` SD-S00002 `tree` 代码节选: ```cpp 我已经有了完美的解法,可是这里实在太小了 (其实是没时间了(小声 二分天数 在check里面二分每个点所需要的时间/这个地方直接分讨之类的好像也可 按时间排序后 接着用树剖检验里自己最近的节点与天数的比较 TAT 挣扎一下看看0.5h能写点什么,千万别因为这题连noip都进不去TAT 话说昨晚好像梦见树剖了 希望其他题不要爆掉希望其他题不要爆掉 能不能给我评个最惨oier?( ``` SD-S00012 `lock` 代码节选: ```cpp freopen("lock.in","r",stdin); freopen("lock.out","w",stdout);、 ``` 注意到那个顿号了吗? SD-S00064 `game` 代码节选: ```cpp //n方过亿,喜欢暴力 ``` SD-S00064 `tree` 代码节选: ```cpp cout<<"你觉得我会吗??"; ``` SD-S00064 `lock` 代码节选: ```cpp //跟我学,T1暴力,T2抄样例,六年OI一场空 //天不生我oier,暴力万古如长夜!!啊。今年暴力好难! ``` SD-S00071 所有题目代码节选: ```cpp return 0; // return 0 祝我 AC ``` SD-S00082 `tree` 代码节选: ```cpp //B打不完啦!!! //遗憾离场 ``` SD-S00099 `lock` 代码节选: ```cpp /* 编译单个文件... -------- - 文件名: D:\SD-S00099***\lock\lock.cpp - 编译器名: TDM-GCC 4.9.2 64-bit Debug 处理 C++ 源文件... -------- - C++ 编译器: C:\Program Files (x86)\Dev-Cpp\MinGW64\bin\g++.exe - 命令: g++.exe "D:\SD-S00099***\lock\lock.cpp" -o "D:\SD-S00099***\lock\lock.exe" -g3 -std=c++14 -O2 -Wall -I"C:\Program Files (x86)\Dev-Cpp\MinGW64\include" -I"C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\include" -I"C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include" -I"C:\Program Files (x86)\Dev-Cpp\MinGW64\lib\gcc\x86_64-w64-mingw32\4.9.2\include\c++" -L"C:\Program Files (x86)\Dev-Cpp\MinGW64\lib" -L"C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\lib" -static-libgcc -g3 编译结果... -------- - 错误: 0 - 警告: 0 - 输出文件名: D:\SD-S00099***\lock\lock.exe - 输出大小: 2.04421901702881 MiB - 编译时间: 0.78s */ ``` SD-S00099 `tree` 代码节选: ```cpp /* SD-S00099 到此一游。 只是来玩玩,期望得分:155。 T1 打了正解。 T2 专攻随机数据。 T3 看脸。 T4 输样例。 */ ``` SD-S00106 `game` 代码节选: ```cpp /*thanks: shoto/shou mysta rias ike eveland shu yamino kanae kuzuha aster arcadia 尼亚nia 茂sigeru 阿萨aza 罗伊roi 尤格yog 眠特mint me parents */ ``` 这么喜欢看 v? SD-S00106 `struct` 代码节选: ```cpp //出题人是不是心里阴暗变态啊,T1误入普及,T3放大模拟???! //我这辈子做过质量最差的比赛之一,完全没有区分度 ``` SD-S00140 `tree` 代码节选: ```cpp /* 哼哼哼啊啊啊啊啊啊阿啊啊啊啊不写了 100 + 50 + 100 = 250走人 */ ``` SD-S00185 所有代码节选: ```cpp //CSP-S 勇夺一等奖 //轻松拿下200pts ``` SD-S00285 `struct` 代码节选: ```cpp /*不想做大模拟*/ ``` SD-S00291 `struct` 代码节选: ```cpp /* 只是简单的游记,希望不要进迷惑行为大赏。 14:00 进入考场,tcw 的机子坏了,坐到了我的旁边。有个认识的人坐旁边确实能缓解紧张气氛。看一眼压缩包,盲猜 lock 是 T1。 14:30 发密码,启动。看了一眼大样例发现有俩字符串题,很害怕。 14:50(大概) 读了一遍题,发现 T1 很简单,T2 有点神秘先放放,T3 大模拟直接扔掉,T4 读了读有点感觉。 15:00 打完了 T1,和 T2 的 50 分暴力。 15:30(大概) 好像会 T2 了,直接弄个 DP 就行了,不到一会就码完了,没调就过了大样例。 16:20 把 T2 拍上了,开始弄 T3 T4,噩梦开始。先写了 T4 的 A 性质,比较好写,很快过了大样例,说明结论没问题,但是没想好中间细节怎么处理,转去写 T3。 17:00 T3 的细节比想象中的多多了。勉强拿了 15 分。浪费了一大堆时间。 18:00 一直在考虑细节问题,没时间了。 18:10 T4 瞎写一通过了小样例,开始写游记。 希望不挂分。 while(1) rp++; */ ``` SD-S00312 `game` 代码节选: ```cpp // 麦克风 绝帆祝我不挂分。 // rp++ ``` SD-S00370 `struct` 代码节选: ```cpp /* 17:55 过大样例!!!!!!!!!!!!!! 18:02 对大样例的强度表示担忧 */ ``` u1s1 这大样例是够弱的。 SD-S00381 所有代码节选: ```cpp //可爱dzh //甲鸟好闪,拜谢甲鸟 ... //15:31 T2 35pts //15:39 T2 50pts //15:46 T2 对拍完毕 稳50pts //wyz好闪,拜谢wyz //zcl好闪,拜谢zcl //wjl好闪,拜谢wjl //lyc好闪,拜谢lyc ``` 其中,`struct` 代码还出现了: ``` //可恶的大%你 !!! ``` SD-S00396 `lock` 代码节选: ```cpp /* 你说得对,但是一定会有人来分析今年的代码 给你一点小小的暴力震撼 :)))))))))))))))))))))))))) wc对了 */ ``` SD-S00400 `struct` 代码节选: ``` //我想到一个绝妙的证明方法,可惜这里写不下了。 ``` SD-S00478 `struct` 代码节选: ```cpp //汗流浹背了老弟 ``` SD-S00486 `tree` 代码节选: ```cpp }//出题人,我爱你! ``` SD-S00491 `struct` 代码节选: ```cpp /*我永远喜欢阿芙朵嘉·锐笔小姐!!!我是阿芙朵嘉小姐的狗!!!斯哈斯哈斯哈斯哈~嘿嘿我的阿芙朵嘉小姐; 好想被阿芙朵嘉小姐踩在脚底下啊 阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉sukisukisukisuki dai~suki!!! 阿芙朵嘉 阿芙朵嘉 阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉阿芙朵嘉 阿芙朵嘉阿芙朵嘉 阿芙朵嘉 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我是阿芙朵嘉小姐的狗!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! 我要和阿芙朵嘉小姐结婚!!!!! ``` SD-S00582 `lock` 代码节选: ```cpp //永远的遗憾,lock kiri ``` SD-S00593 `lock` 代码节选: ```cpp //Diana是一个非常可爱的女孩子 //And she is my preferrence and exception ``` SD-S00603 `game` 代码节选: ```cpp //喜闻乐见的注意事项 //1.空间复杂度会不会爆炸(因为你开的是longlong) //2.时间复杂度已经无所谓了,反正你会选最优秀的 //3.时间很充裕 这只是个初赛 请把所有会得分都打出来 //4.记得取模 //5.记得检查freopen和文件夹里的东西删干净没 //6.放平心态 你可是lixx ``` SD-S00632 `struct` 代码节选: ```cpp int read(){//此乃快速读入之法,可以迅疾之势读入矣 ... void write(int x){//类于快读,反之为快输也 ``` SD-S00632 `tree` 代码节选: ```cpp srand(time(0));//天时 freopen("tree.in","r",stdin); freopen("tree.out","w",stdout); a=rand(),b=rand(); rp++;//人和 cout<<a*b%1000000000;//制天命而用之 ,若wa则不得地利也 ``` SD-S00678 `game` 代码节选: ```cpp /* 挑个代码最短的写点( 死去中清醒,头痛欲裂 想睡觉啊喂 本来想写点啥,但是不知道写啥( 而且我又意识到貌似noip才是最后一场( 所以这场好像没啥写的必要 退役了就是好 看哪题哪题不会,不会也一点不慌 根本写不动啊,一点也不想写 或许我该早点睡觉的( 不知道能混几分 爱多少分多少分( 已经死过的人是不会再死第二次的 这是真理无疑 还有长时间不写是真的忘干净了啊 写的好丑啊啊啊啊啊啊啊啊啊啊啊 简直没眼看 大梦最后一场 赶快醒来吧 */ ``` SD-S00678 `lock` 代码节选: ```cpp /* 等待的时间未免有些漫长了。。。 原来大家有那么多问题,原来窗外的风景挺好 这次题会怎样呢? 好像我CSP从来没考好过。。。 不知是该emo还是该释然了。。。 */ ``` 祝你好运。 SD-S00731 `struct` 代码节选: ```cpp /*保留环节:大模拟 总之今年的CSP-S相比往年可能简单了114514倍。 不知道全省会不会有1919810个AKer。。。 那么今天就到这里了。这是什么,游记?写一下。 14:30 开场。监考老师密码晚发了1min T1签到,想了一个好些的写法,稍微拍了一下,18min,扔一边了。 14:50 T2画了画图,想到了一个树,一开始写过了第一个样例,但是第二个挂了。后来发现想错了,换了一个写法就过了。 15:30 发现T3是大模拟,不过很简单,16:30过了。 16:30 发现T4更简单。于是17:05过了全部样例。 这一切都要归功于可爱的xyy和spirua。感谢天波,感谢lhq。 现在开始检查。 1.freopen没有写错吧!??? 2.有没有函数定义错误名字了可能没有返回值??? 3.会不会发生数组越界?数组大小开的够大吗??? 4.vector是否会发生越界行为?????(笑死,根本没用vector) 5.文件名是否都写对了???仔细检查一下!!! 6.有没有测极限数据(t2,t4)时限和空限能开下吗?(((自信即巅峰!!!!!!!!!!))) 我猜SD,2=140pts,1=220pts */ ``` SD-S00731 `tree` 代码节选: ```cpp 这是什么?AK,尝一下。这是什么?AK,尝一下。 我要,卡常!。 ``` SD-S00800 `struct` 代码节选: ```cpp scanf("%d",&n); while(n--){ printf("ERR\n"); } //不可以,总司令。 ``` SD-S00819 `tree` 代码节选: ```cpp //康总,陈总速来助我求求了 ``` SD-S00849 `tree` 代码节选: ```cpp /* 最后10min了,写点东西做纪念吧 先贴上去年写的一句话: As we all know, wssb. 期望100+100+100+0=300pts, 实际??? 本来想把T4 30pts暴力写了,但是去检查了,没给@Linyi哥哥凑出330 /kk 祝正在读这些话的人 noip rp++ 按照惯例,最后还要魔怔一下的 Always remember our sign: Brother Linyi is so cool! 但愿每个人最后能够达到梦想 */ ``` SD-S00845 `tree` 代码节选: ```cpp //链,启动! //好吧写不完了 哼哼啊啊啊啊啊啊啊啊(现在18:23) //输出n,启动! ``` SD-S00867 所有代码节选: ```cpp /*不会做,那就复习一下数学公式吧 sin2x=2sinxcosx cos2x=(cosx)^2-(sinx)^2=2(cosx)^2-1=1-2(sinx)^2 tan2x=(2tanx)/[1-(tanx)^2] sin(x/2)=±√[(1-cosx)/2] cos(x/2)=±√[(1+cosx)/2] tan(x/2)=±√[(1-cosx)/(1+cosx)]=(1-cosx)/sinx=sinx/(1+cosx) 如果进了迷惑行为大赏,能不能看下有没有写错的()*/ ``` 据我观察应该是没有写错的。 SD-S00881 所有代码节选: ```cpp /* 全读一遍!暴力优先!珍惜时间!仔仔细细!写一行,看一行! 思路写在下面! 一个题目的搞时间不能大于20分钟! 开freopen! 删debug! 注意时间空间! 坚决杜绝紧张出错! 考试剩余25分钟,对拍检查! 加油!别慌! 解: ``` SD-S00954 `tree` 代码节选: ```cpp /* n = 20 真不会打。就会 n! 的。就剩十五分钟了,没什么希望了, 就希望不挂分。 希望能混个 7 级勾。 希望 T3 不爆炸。 希望 T2 多混点分。 希望 T1 造样例的人再想想。 希望大家都能达到自己想要的结果。 不想上学。 但是太菜了。 回去诱骗人唱歌。 qwq。 */ ``` 如果你能看到的话,$n=20$ 可以状压,另外,祝你好运。 SD-S00990 `struct` 代码节选: ```cpp //每年必出一道大模拟是吧( ``` SD-S01025 `tree` 代码节选: ```cpp /* My Luogu User Id (uid) = 448887 喜报: T1 T3 写完之后才发现忘写游记了. 这机房是真热. 也许这题有什么高妙做法. 比如什么观察第 x 天种树时天数对答案的影响. 高妙做法留给 ly 哥哥 (Luogu @Anonymely Other @Anonyme) 想, 我只负责暴力拉满. 先打一个状压 DP. 17:40 状压打完了 (此时总分 305 分), 下面来特殊性质 B. 17:48 特殊性质 B 打完了, ACD 有点难办. n <= 20 应该是 TLE 了, 所有总分 295. 赶紧把 n <= 20 & A 写了 (18:20). */ ``` @cancan123456 @Anonymely SD-S01033 `lock` 代码节选: ```cpp }//哎呀 if(n==1){ cout<<81; return 0; }//什么时候才能见到你呢? if(cnt<=2){ cout<<10; return 0; }//大概要下周一吧 ``` SD-S01108 `struct` 代码节选: ```cpp return 0;//我爱大模拟 ,回来吧我的动态规划,我最骄傲的信仰 ``` SD-S01110 `struct` 代码节选: ```cpp /* 考场游记 考完试会补充初赛部分和考前部分以及考后查分 14:12 进考场了,感觉很不错。 14:18 公开了压缩包密码,但没有公开PDF密码 14:20 写完缺省源 14:31 还没有公开PDF密码,都开考了 14:32 公开了 14:34 T1好像不会 14:36 好像输出(不可明说的数字)有30分 14:39 有点头绪 14:40 忽然发现O((不可明说的数字)^n)有50分 14:41 数据这么小想到? 14:46 ?是错的,但想到正解了! 14:52 好像假了 15:06 又会正解了 15:25 啊啊啊怎么才写了这么点,没事按着我的安排可以写到16:06 15:33 又假了 15:35 忽然发现把题想复杂了,又会了( 15:40 发现最快的做法只用大约20000次tick,但我懒得写,写了个1e6 tick的,反正能过 15:49 打完了,一切正常,样例全过,成功浪费大约一小时想非正解,二等奖稳了,可以去参加NOIP了!但是要跑500m+了,没事不算太累。 16:05 T4想到25pts特殊性质做法,正在保佑一等ing 16:20 T4 25pts假了/oh 16:25 T2想出一个25~35的做法,因为25是n<=10,35是n<=800,我是O(n^3) (大型尴尬现场) 16:45 打完了,一切正常,两个在范围内的样例已过。又想到了T4的25pts做法,而且跑不满。 17:06 T4打完了 17:10 自己造了几组数据没问题,摆烂! 但是很忧虑150~160是否一等。是的话有蓝勾但是要跑1000m( 17:22 小恐龙创最高纪录3177/hsh 17:25 本地T2 n=800 秒出结果,折磨牛? 17:33 由于T3一点暴力都不会,所以用T3装游记(。为了上迷惑行为大赏 ,在T3下面加 //freopen 给做迷惑行为大赏的人挂一下lg用户名:FeS2_qwq 总结:估分100+(25~35)+0+25=150~160 第一次估分上11^2,激动。 ....... . . . ....... ....... ....... ....... . . . . . . . . . . . . . . . . . . . . . ..... . . . ....... ....... ....... ....... . . . . . . . . . . . . . . . . . . ....... . . . . ....... ....... . ....... ....... . . . ....... ....... ....... . . . . . . . . . . . . . . . . . . . ..... . . . . . . . . . . . . . . . . . . . . . . . . ....... . . . . ....... ....... ....... */ ``` SD-S01162 `struct` 代码节选: ```cpp freopen("goudou.in","r",stdin); freopen("buzuo.out","w",stdout); //大模拟题狗都不做 ``` SD-S01174 `lock` 代码节选: ```cpp //下次一定要先看好题,不要盲目磕,T3是教训 ``` # 编译错误长度 前排提示:本文使用 TDM-GCC 4.9.2 进行编译,所以编译信息与评测时的 g++ 9.3.0 可能不相同。 找一下编译错误最长的几个代码。 写这东西的时候出 `bug` 了,原因是 `fopen` 忘 `fclose` 了。 我们恭喜以下十份代码获得编译错误最长奖! ``` Top 10 SD-S00238 struct error length = 374199 SD-S00753 lock error length = 171424 SD-S00918 struct error length = 157794 SD-S00913 lock error length = 64105 SD-S00302 lock error length = 64062 SD-S00236 struct error length = 49642 SD-S01016 game error length = 37204 SD-S00095 struct error length = 31532 SD-S01001 struct error length = 29550 SD-S00314 game error length = 25144 ``` [这里](https://www.luogu.com.cn/paste/ft7l4rzn)是完整版。 ```cpp #include <iostream> #include <ctime> #include <cstring> #include <windows.h> using namespace std; string folder_path = "C:\\Users\\apple\\Desktop\\CSP-S2-SD-2023-Public"; string problem_name[4] = {"lock", "game", "struct", "tree"}; int cnt[4]; int competitor_number = 1190; string to_len_5(int x) { string ans = to_string(x); while (ans.length() != 5) { ans = "0" + ans; } return ans; } //char buf[1048576]; time_t start; void doit(int i, int j) { string name = problem_name[j]; string file_path = folder_path + "\\SD-S" + to_len_5(i) + "\\" + name + "\\" + name + ".cpp"; fprintf(stderr, "compiling file %s\n", file_path.c_str()); // memset(buf, 0, sizeof buf); // int now = 0; // while (true) { // int x = fread(buf + now, 1, 1, code); // if (x != 0) { // printf("%c", buf); // } else { // break; // } // now++; // } string command = "g++ " + file_path + " -std=c++14 -O2 -static -Wall -o C:\\Users\\apple\\Desktop\\code.exe > out.txt 2>&1"; system(command.c_str()); HANDLE hFile = CreateFileA("C:\\Users\\apple\\Desktop\\out.txt", FILE_READ_EA, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL); unsigned int length = GetFileSize(hFile, NULL); fprintf(stderr, "compiled. error log length = %u\n", length); printf("%u ", length); // string code = buf; // int now = 0; // if (code.length() == 0) { // continue; // } // string all_comment; // while (now + 1 < (int)code.length()) { // all_comment.clear(); // if (code.substr(now, 2) == "/*") { // while (now + 1 < (int)code.length() && code.substr(now, 2) != "*/") { // all_comment += code[now]; // now++; // } // all_comment += "*/"; // now += 2; // } else if (code.substr(now, 2) == "//") { // while (now < (int)code.length() && code[now] != '\n') { // all_comment += code[now]; // now++; // } // all_comment += "\n"; // now++; // } else { // now++; // } // if (!all_comment.empty()) { // if (all_comment.find("freopen") != string::npos) { // cout << all_comment; // } // } // } // string all_line; // bool freopen_ok1 = false, freopen_ok2 = false; // while (now < (int)code.length()) { // all_line.clear(); // while (now < (int)code.length() && code[now] != ';' && code[now] != '\n') { // all_line += code[now]; // now++; // } // if (code[now] == ';') { // all_line += ';'; // } // now++; // string new_str; // for (char x : all_line) { // if (!isspace(x)) { // new_str += x; // } // } // if (new_str.find("freopen") != string::npos) { // if (new_str == "freopen(\"" + name + ".in\",\"r\",stdin);") { // freopen_ok1 = true; // } // if (new_str == "freopen(\"" + name + ".out\",\"w\",stdout);") { // freopen_ok2 = true; // } // } // } // if (!freopen_ok1 || !freopen_ok2) { // cnt++; // cout << "========== " << file_path << " ==========" << endl; // now = 0; // while (now < (int)code.length()) { // all_line.clear(); // while (now < (int)code.length() && code[now] != ';' && code[now] != '\n') { // all_line += code[now]; // now++; // } // if (code[now] == ';') { // all_line += ';'; // } // now++; // string new_str; // for (char x : all_line) { // if (!isspace(x)) { // new_str += x; // } // } // if (new_str.find("freopen") != string::npos) { // if (new_str != "freopen(\"" + name + ".in\",\"r\",stdin);" && new_str != "freopen(\"" + name + ".out\",\"w\",stdout);") { // cout << new_str << endl; // } // } // } // } // freopen("code.cpp", "w", stdout); // printf("%s", buf); time_t now = clock() - start; fprintf(stderr, "total time = %lldh %lldm %llds %lldms\n", now / 3600000, now / 60000 % 60, now / 1000 % 60, now % 1000); int cnt = 4 * i + j - 3, remain = 4 * competitor_number - cnt; time_t a = now * remain / cnt; fprintf(stderr, "expected remaining time = %lldh %lldm %llds %lldms\n", a / 3600000, a / 60000 % 60, a / 1000 % 60, a % 1000); } int main() { start = clock(); doit(237, 2); return 0; freopen("err_log.txt", "w", stdout); for (int i = 1; i <= competitor_number; i++) { for (int j = 0; j < 4; j++) { doit(i, j); } printf("\n"); } return 0; } ```