NOIP2021GD迷惑行为大赏

· · 个人记录

写在前面

本文共收入参加 NOIP2021 的 GD 共 994 位参赛者的代码。值得一提的是,本次 GD 共有 3715#include3591freopen2093scanf2576printf1241number1098sequence1086varience802chess76CCF, 37noip12AFO

声明:本文对代码所属的准考证号保密侵权必删

传统艺能

  1. 注释人/自我放弃人
using namespace std;
int n,m,k;
long long a[200];
int main(){
    //freopen("sequence.in","r",stdin);
    //freopen("sequence.out","w",stdout);
    cin>>n>>m>>k;
    for(int i=0;i<=m;i++){
        cin>>a[i];
    }

    return 0;
}
  1. 空白人
#include<bits/stdc++.h>
using namespace std;
int main(){
    //freopen("chess.in","r",stdin);
    //freopen("chess.out","w",stdout);

    return 0;
}//编者注:只有这些!
  1. 只入不出人
int main() {

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

    return 0;
}
  1. 注释人/ return 人/ signed 人
signed main()
{
    //freopen("sequence.in","r",stdin);
    //freopen("sequence.out","w",stdout);
    cout<<ans; 
}
  1. 自我放弃人2
#include<bits/stdc++.h>
using namespace std;
int n,m,k,ans,flag;
int v[105],a[39];
int tt(int w)
{
    int ans=0,ww=0;
    while(w)
    {
        if(w%2) ans++;
        w>>=1;
    }
    return ans;
}
int deep(int f,int t)
{
    for(int j=m;j>=0;j--)
    {
        flag+=pow(2,j);
        if(flag>f)
        {
            flag-=pow(2,j);
        }
        else
        {
            deep(f,t+1);
            flag-=pow(2,j);
        }
    }
}
int main()
{
    //freopen("sequence.in","r",stdin);
    //freopen("sequence.out","w",stdout);
    scanf("%d%d%d",&n,&m,&k);
    for(int i=0;i<=m;i++)
    {
        scanf("%d",&v[i]);
    }
    int s=n*pow(2,m);
    for(int x=n;x<=s;x++)
    {
        if(tt(x)>k) continue;
        deep(x,1);
    }
}
  1. 你成功了人
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int T,n,m,q,i,j,k,maph[5002][5002],mapz[5002][5002],mapl[5002][5002],mapc[5002][5002];
int dx[4]={-1,1,0,0},dy[4]={0,0,-1,1},a[2][2500002],vis[5002][5002],head=0,tail=0;
int bfs(int sx,int sy)
{
    //didn't have enough time to code this function
    //guess I'll need another 30 minutes or so to finish this brute force algorithm
    //perhaps this comment will be chosen as one of the confusing behaviors of GDOIers
    return 0;
}
int main()
{
    //freopen("chess.in","r",stdin);
    //freopen("chess.out","w",stdout);
    scanf("%d",&T);
    ......

    //fclose(stdin);
    //fclose(stdout);
    return 0;
}
  1. 儒雅人/ hsit 人
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#define INF 0x3f3f3f3f
#define INFLL 0x3f3f3f3f3f3f3f3f
#define cl(a,b) memset(a,b,sizeof(a))
typedef long long ll;
// I love CCF,and Fuck CCF ,shitshithsithsit
  1. 儒雅人2/名言人/版权人
// luogu: lovely_ckj(www.luogu.com.cn/user/251130/)
// you are doing wrong things, stop learning useless algorithms and solving sample problems, go and whk! 
#include <iostream>
#include <cstdio>
#include <set>
#include <vector>
#include <ctime>
using namespace std;
int n,a[10005];
int beg;
set<vector<int> > vis;
long long ans=1e17;
void dfs(vector<int> v,int dep)
{
    ......
}
int main()
{
    freopen("variance.in","r",stdin);
    freopen("variance.out","w",stdout);
    beg=clock();
    n=ckjread();
    vector<int> tmp;
    for(int i=1;i<=n;++i) tmp.push_back(a[i]=ckjread());
    dfs(tmp,1);
    jynwriten(ans);
    putchar('\n');
    return 0;
    puts("FUCK CCF!!!!!!!!!11111");
}
  1. 毕加索/儒雅人3
#include <bits/stdc++.h>
using namespace std;

const int maxn = 5050;
const int maxlen = 2e5 + 200;
int t, n, m, q;
char s[maxlen];

int main() {
    freopen("chess.in", "r", stdin);
    freopen("chess.out", "w", stdout);
    scanf("%d", &t);
    while (t--) {
        scanf("%d%d%d", &n, &m, &q);
        for (int i = 1; i <= n; i++) {
            scanf("%s", s + 1);
            for (int j = 1; j <= n + m - 1; j++) {
                // fuck your shabby CCF, I have no time to complete it
            }
        }
    }
    return 0;
}
/*
..........##########...........
........##############.........
......######.=====.######......
.....####....-----....####.....
....##..#..■......■#..##.....
.....#..#..##......##.#..##....
......###....-----....###......
........##..||##||...##........
.........###||--||####.........
...###.....##----##......###...
##.....#################.....##

↑
our OI teacher in my school 
quite cute, doesn't it?
*/
  1. 儒雅人4/函数人
#include<iostream>
#include<cstdio>
using namespace std;
int d[101][101];
int T,n,m,q;
char s[1001];
bool CCF_mother()
{
    bool no_mother=1;
    return no_mother;
}
inline void FUCK_YOU_CCF()
{
//  int;
    bool CCF_do_not_have_a_mother=1;
    while(CCF_do_not_have_a_mother)
    {
        CCF_do_not_have_a_mother=CCF_mother();
    }
}
int main()
{
    freopen("chess.in","r",stdin);
    freopen("chess.out","w",stdout);
    cin>>T;
    while(T--)
    {
        cin>>n>>m>>q;
//      for(int i=1;i<=q;++i)
//      cout<<n*m*i%7<<endl;
        for(int i=1;i<=n;++i)
        {
            FUCK_YOU_CCF();
        }
    }
    //sayonara
    //AFO!!!
} 
  1. 挣扎人(指思想感情
//BY STJqwq:THANK YOU CCF!
#include<bits/stdc++.h>
........
int main(){
    freopen("sequence.in","r",stdin);
    freopen("sequence.out","w",stdout);
    ......
    //WHAT THE FUCK? NOT CORRECT.

    int ans=0;
    for(I i=n;i<=n*s2;++i)if(popcnt(i)<=k)pls(ans,f[n][i]);
    int fac=1;
    for(I i=1;i<=n;++i)fac=mul(fac,i);
    printf("%d\n",mul(ans,fac));
    //I FOUND THE PROBLEM!!!THE NUMBERS ARE NOT UNIQUE!!!
    //BUT I DON'T HAVE TIME TO CHANGE AGAIN!!!
    //FUCK!!!!!!I HAVE LOSED 30 POINTS!I HAVE LOSED MY NOIP2021 1=!!!!
    //---by STJqwq AT 12:47
    */
    printf("%d\n",ANS);
    return 0;
}
//I LOVE CCF! PLEASE DON'T WA!
//
  1. 自知之明人/儒雅人5/****
//这题我不会/jk 
//不写了
//8位质数保平安

//我又来写了

//草,看了半小时还是不会
//滚了
//辣鸡ccf 
//狗都不写这题 
#include<iostream> 
#include<cstdio> 
#include<algorithm> 
#include<cmath> 
#include<cstring> 
#include<map> 
#include<stack> 
#include<queue> 
using namespace std;
int main(){
    freopen("sequence.in","r",stdin);
    freopen("sequence.out","w",stdout);
    int n,m,k;
    cin>>n>>m>>k;
    srand(********);//编者注:已被和谐
    cout<<rand();
    fclose(stdin);
    fclose(stdout);
    return 0;
}
  1. 呐喊人
#include <bits/stdc++.h>
using namespace std;
........
//啊啊啊啊啊啊啊啊啊 
int main() {
    freopen("variance.in","r",stdin);
    freopen("variance.out","w",stdout);
    n = read();
    for (int i = 1;i <= n;i ++ ) a[i] = read(), mx = max(a[i]+1,mx);
    printf("%d\n",bfs());
    return 0;
}
  1. 往事人
#include<cstdio>
#include<cstring>
#include<algorithm>
.....

//CCF,I love you,2018 you give us 3 problems of tree, this time you give us 3 problems of number
.....
int main(){

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

    scanf("%d",&n);
    for(int i=1;i<=n;i++) scanf("%d",&a[i]),sum+=a[i],vis[i][a[i]]=1,a1[i]=a[i];
    for(int i=1;i<=n;i++) ans+=(n*a[i]-sum)*(n*a[i]-sum);
    ans/=n;

    dfs(ans,sum);

    printf("%d\n",ans);

    fclose(stdin);
    fclose(stdout);
    return 0;
}
  1. 祈求人
//CYJian bless me
//I wish that I can solve it
//But I am so wake
#include<cstdio>
#include<cstring>
#include<algorithm>
#define ll long long
using namespace std;
const ll N=5e5+10,inf=1e18;
ll n,L,a[N],s[N],f[2][N],ans;
signed main()
{
    freopen("variance.in","r",stdin);
    freopen("variance.out","w",stdout);
    scanf("%lld",&n);
    ...... 
    printf("%lld\n",ans);
    return 0;
}
/*
10
6 19 34 35 56 63 82 82 83 99
*/
  1. 恶臭人/儒雅人6
//rp += 114514
#include <iostream>
#include <cstring>
#include <cstdio>
#include <map>
#define int long long
using namespace std;
...... 
signed main(){
    freopen("chess.in", "r", stdin);
    freopen("chess.out", "w", stdout);
    scanf("%lld", &t);
    ......
    return 0;
}
//Fxxk
  1. 自我放弃人2/又爱又恨人
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include <cmath>
#define INF 0x3f3f3f3f
#define INFLL 0x3f3f3f3f3f3f3f3f
#define cl(a,b) memset(a,b,sizeof(a))
typedef long long ll;
typedef unsigned long long ll;

#define in(a) a=read()
int read()
{
    int v=1,x=0;
    char ch=getchar();
    while(ch<'0'||ch>'9')
    {   
        if(ch=='-') v=-1;
        ch=getchar();   
    }
    while(ch>='0'&&ch<='9')
    {
        x=(x<<3)+(x<<1)+ch-'0';
        ch=getchar();
    }
    return v*x;
}

void out(int x)
{
    if(x<0) x=-x,putchar('-');
    if(x>9) out(x/10);
    putchar(x%10+'0');
}

// I love CCF,and Fuck CCF 
  1. 表白人/藤野先生/大模拟
#include <cstdio>
using namespace std;

int main()
{
    freopen("chess.in", "r", stdin);
    freopen("chess.out", "w", stdout);
    // zhe shen me la ji mo ni ti
    // zhe 24 fen, lao zi bu yao ye ba
    // fudge you, fcc
    // ni gai hui ba, chu da mo ni bu fen fen!
    // tui yi le tui yi le
    puts("I love wzl forever");
    return 0;
}
  1. 反向AK人
#include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int n,a[10011],to,t;
double q,w;
bool e=1,f=1;
int main() {
    freopen("variance.in","r",stdin);
    freopen("variance.out","w",stdout);
    ...... 
}
//Noip ak me
  1. 膜拜人
#include <bits/stdc++.h>
#define ll long long
using namespace std;

const int maxn = 33;
const int maxs = 2e5 + 200;
const ll mod = 998244353;
int n, m, q, tp, cnt[maxs];
ll ans, dp[2][maxs], v[maxn];

int calc(int x) {
    int res = 0;
    while (x) {
        if (x & 1) res++;
        x >>= 1;
    }
    return res;
}

int main() {
    freopen("sequence.in", "r", stdin);
    freopen("sequence.out", "w", stdout);
    scanf("%d%d%d", &n, &m, &q);
    ...... 
    return 0;
} 
/*
stO pb Orz
stO zz Orz
stO ntf Orz
stO cdw Orz
stO lmh Orz
stO zez Orz
stO lgj Orz
stO lgx Orz
stO ybx Orz
stO wwh/dqy Orz
stO all oiers in my school and not including me Orz
*/
  1. 魔怔(脸滚键盘)人
#include <iostream>
#include <cstdio>
#include <string>

using namespace std;

int a[800000]; string s="AAAAAABAAAAABABAAB......AAAACAAAACBAAABAAABBBABCAAAABAACKBACBAABABACAABABCACBICDNnBCNCEBIGUKXPHNBECFGENHBGABDVBHNNAOHbRDBRFDELMZAHABRJBDACCLBCgGMDFLUIGADFL";//编者注:此处省略800000字符

int main() {
    freopen("number.in", "r", stdin);
    freopen("number.out", "w", stdout);
    ......
    return 0;
}
  1. 打表人
#include<iostream>
#include<cstdio>
#include<algorithm>

using namespace std;

int st[763409] = {}//编者注:此处省略30000+行 

int t,x;
int main(){
    freopen("number.in","r",stdin);
    freopen("number.out","w",stdout);
    scanf("%d",&t);
    while(t--){
        scanf("%d",&x);
        int ans=lower_bound(st+1,st+763408,x)-st;
        if(st[ans]!=x)
            puts("-1");
        else
            printf("%d\n",st[ans+1]);
    }
    return 0;
}
  1. 宏定义人/膜拜人2/呼应人(Added at:2021/11/21 20:56)
#include <cstdio>
#include <algorithm>
#define QYX using
#define AK namespace
#define IOI std;
QYX AK IOI
//I didn't do this in CSP, but now I will tell everyone that QYX AK IOI!
//stO QYX Orz
const int M = 11000005;
bool f[M]; int s[M], top;
bool check(int t){
    for(; t; t /= 10) if(t % 10 == 7) return 1;
    return 0;
}
void work(int n){
    for(int i = 1; i <= n; i++){
        if(!f[i] && check(i)){
            for(int j = 1; j <= n / i; j++) f[i * j] = 1;
        }
        if(!f[i]) s[++top] = i;
    }
}
int t, x;
int main(){
    ...... 
    return 0;
}
  1. 儒雅人7(Added at:2021.11.22 12:38)
/*
rnm, CCF!!!!
CCF 全家死了!!!
傻逼CCF!!!
垃圾CCF!!!
我要把CCF总部烧了!!!
把CCF打入十八层地狱!!!
永世不超生!!!
-----------------------------------------------------
2021.11.20 CCF惨死于家中...
*/
#include<bits/stdc++.h>
using namespace std;
//#define int long long
inline int read(){int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1; ch=getchar();
}while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();}return x*f;}
......
signed main()
{
    ......
    return 0;
}

*/
#include<bits/stdc++.h>
using namespace std;
//#define int long long
inline int read(){int x=0,f=1;char ch=getchar();
while(ch<'0'||ch>'9'){if(ch=='-')f=-1; ch=getchar();
}while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();}return x*f;}
......
signed main()
{
    ......
    return 0;
}
  1. Miss Jiaran's dog 人(Added at:2021.11.12 12.41)
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;
typedef long long ll;
const int N=1e4+10;
int n;
ll D,d,ans=1ll<<62,a[N],b[N],s,ss;
double t;

void Solve() {
    ......
}

int main() { 
    freopen("variance.in","r",stdin);
    freopen("variance.out","w",stdout);
    ......
    return 0;
}

//I want to be Miss Jiaran's dog (sincerely?).
//But she said what she liked are cats.
//Feeling heart broken, I didn't even know why I'm going to cry, because I'm not a dog or a cat, but only a mouse.
//I know, all guys love cats and dogs who (what?). Nobody cares about the ugly and illness spreading mouses.
//But I still asked Miss Jiaran whether I can be her dog.
//......
//Miss Jiaran said she will observe the every Christmas Eve with us.
//I don't know if I was included in the set "us", but I crave to be contained.
//The cat is still afraid of Miss Jiaran, but I will attract its attention (for Jiaran).
//Creeping, I know it's mostly possible that I will die under its craw or mouth.
//Hopefully, Jiaran may packed me up in patience.Then I became a Spade (xixi).
//......
//Reverse! Jiaxintang cha bu duo de le. (Sweating emoji)
  1. 呼应人/膜拜人3(Added at:2021.11.22 12.43)
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#define HZX using
#define AK namespace
#define IOI std
#define easily ;
HZX AK IOI easily 
//uid: 443664 dalao 
int n;
int a[100005]; 
long long ans = 1e11;
int k = 0;
int cnt = 0;
void dfs(int t, int s)
{
.......
} 
int main()
{
    freopen("variance.in", "r", stdin);
    freopen("variance.out", "w", stdout);
    scanf("%d", &n);
    .....
    printf("%d", ans / n);
    return 0;
} 
  1. 心路人/游记人/拥护者(以下均为 GD-05** 的代码)(Added at:2021.11.22 12:47)
#include <bits/stdc++.h>

#define I using
#define love namespace
#define CCF std

I love CCF;

long long n, m, k, v[105];

vector<long long> num;

mt19937 rnd( time( NULL ) );

/*
n <= 30, k <= n, m <= 100
What the hell is this? There must be a weird solution.
*/

......

int main()
{
    freopen( "sequence.in", "r", stdin );
    freopen( "sequence.out", "w", stdout );
    cin >> n >> m >> k;
    for( long long i = 0; i <= m; i++ )
    {
        cin >> v[i];
    }
    /*
    I have stucked here for at least 1 hour...
    OK I'll go and try T4.
    */

    /*
    I'm back because I can't understand T4.
    2 ^ a_n = 2 ^ a_( n - 1 ) + 2 ^ a_( n - 1 )
    I think this equation is a part of the solution.
    Wish me good luck.
    */

    /*
    It'll be crazy if I count S from n to n * 2 ^ m.
    LET'S GOOOOO!
    */
//  for( long long s = n; s <= n * ( 1 << m ); s++ )
//  {
//      num.clear();
//      if( cnt( s ) > k )
//      {
//          continue;
//      }
//      
//      /*
//      I don't know what to do now...
//      */
//  }

    cout << rnd() % 998244353;
    /*
    If I can't code any solution, I'll use RANDOM.
    */
    return 0;
}

#include <iostream>
#include <map>
#include <cstdio>
using namespace std;

long long n, sum, a[10005];
double ans = 2e9;

map<double, bool> flag;

void dfs( long long seq[], long long s, long long la )
{
    ......
}

int main()
{
    freopen( "variance.in", "r", stdin );
    freopen( "variance.out", "w", stdout );
    ......
    return 0;
}

/*
THIS BRUTE FORCE IS WRONG!!
Plz give me 10pts and I'll be satisfied.
*/

#include <iostream>
#include <cstdio>

#define NOIp2021 using
#define RP namespace
#define INF std

NOIp2021 RP INF;

long long t, cnt, num[10000005];
bool flag[10000005];

......

int main()
{
    ......
    return 0;
}

/*
If I get 100pts, it will be TuiFei time!
*/

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

long long t, n, m, q;

mt19937 rnd( time( NULL ) );

int main()
{
    freopen( "chess.in", "r", stdin );
    freopen( "chess.out", "w", stdout );
    ......
    return 0;
}

/*
I can't understand this problem...
Alright I'll give up and try T2.
*/

/*
This is the end.
Any prizes for 100pts? Could I have 2= plzzzzz?
*/
  1. 和谐人(Added at:2021.11.12 12:50)
#include<iostream>
#include<cstdio>
int txr;
#define lcl txr 
#define love =
using namespace std;

int main(){
    freopen("chess.in","r",stdin);
    freopen("chess.out","w",stdout);
    txr love lcl;
    lcl love txr;
    txr love lcl;
    ......//编者注:省略200+行
    txr love lcl;
    lcl love txr;
    txr love lcl;
    lcl love txr;
    txr love lcl;
    lcl love txr;
    txr love lcl;
    lcl love txr;
    txr love lcl;
    lcl love txr;
    txr love lcl;
    //they both love doing *** (maybe sex)
}//n=xy
  1. 反向 AK 人2/连载人(以下均为 GD-05** 的代码)(Added at:2021.11.22 12:52)
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
#define int long long
const int MOD = 998244353;
int n, m, k, v[105], a[35], s, tp, ans;
......
signed main()
{
    freopen("sequence.in", "r", stdin);
    freopen("sequence.out", "w", stdout);
    n = read(), m = read(), k = read();
    for (int i = 0; i <= m; i++)
        v[i] = read() % MOD;
    f(1, 0);
    printf("%lld", ans);
    return 0;
}
// anyingzhimeng AK IOI
// diyushiQAQ AK IOI
// jer2021 AK IOI
// xuan__ AK IOI
// c3b2a AK IOI
// chifandiyiming AK IOI
// bgy AK IOI (I've forgot his luoguID QwQ)
// lyj AK IOI (I've forgot his luoguID QwQ)
// lxy0507 AK IOI
// mianTzQwQ is always AKed by them, mianTzQwQ tcl /kk

// ZXR AK IOI 
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
int n, a[10005], sum1, sum2, ans;
signed main()
{
    freopen("variance.in", "r", stdin);
    freopen("variance.out", "w", stdout);
    ......
    return 0;
}
// why ? I've already drew up a plan to write a love story about ZXR and WWX, but I mustn't pass Chinese???
// SO, I will write it down in English.
// I will introduce you to ZXR and WWX at first.
/*  
name:           ZXR
gender:         male
school:         Shenzhen Junior High School
luoguID:        an4ying3zhi1meng4 (in Chinese)
moredetails:    AKer of IOI, WWX's npy
*/
/*  
name:           WWX
gender:         female
school:         Shenzhen Nanshan Chuangxin School
luoguID:        _Chotally_Nata_ (maybe)
moredetails:    AKer of IMO, ZXR's npy
*/
// Please focus on the code 'chess.cpp' now.
// __from mianTzQwQ

// ZXR AK IOI 
#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
using namespace std;
signed main()
{
    freopen("chess.in", "r", stdin);
    freopen("chess.out", "w", stdout);
    cout << 0 << endl;
    return 0;
}
// Here is the story:
/* 
Best friend for lifetime

    Jogging staightly along the river, below the trees. They found a
long seat facing the river. A tiny cute bird was flying in  the  sky 
while a beutiful flower in the middle of the  river  add  the  scene
several satisfaction. ZXR and WWX sit down on the chair, putting down
a blanket with red straipe and white back.  They  were  preparing  to 
have a pinic.

    It was a sunny day, the sunshine spread warmly via the air  which 
made the air warmer. ZXR was on his way back home, but immediately he
felt a bit hunger stuck his mind and went to  a  supermarket  looking  
somthing to eat. Luckily, he found  his  favourite  milk  is  on  the 
broadcast and he pick one then standing in the queue.

    "Hello? Euh, can you lend me some money? I didn't take any. Please!"
A girl's cute sound shock ZXR's mind. ZXR turned to the girl. While  the
two pairs of curely eyes watching at each other's, magically they  both
felt satisfied. "What's you name?" asked ZXR with a feeling of happiness.
"u... WWX. And u.. you?""ZXR." ZXR surely knows that what is important
between milk and WWX, and he quickly holding her hand, quicky went out
the supermarket.

                          first part end
-----------------------------------------------------------------------

gu gu gu

*/ 
// xie fei le , cao
// lan huo bu shang
// /kel
  1. 毕加索2(Added at:2021.11.22 13:30)
#include <bits/stdc++.h>
using namespace std;

int Map[200005][5];
int color[200005];
int lvl[200005];
bitset <200005> fuck;
bitset <200005> vis;

/**
 * ##### #     ##### #   # ##### #   # ####
 *   #   #     #   # #   # #     #   # #   #
 *   #   #     #   # #   # #     #   # #   #
 *   #   #     #   # #   # #####  # #  ####
 *   #   #     #   # #   # #       #   #  #
 *   #   #     #   #  # #  #       #   #   #
 * ##### ##### #####   #   #####   #   #   #
**/

int n,m,q,T,ans;
.....

void bfs(int x,int y)
{
    ......
}

int main()
{
    freopen("chess.in","r",stdin);
    freopen("chess.out","w",stdout);
    ....
    return 0;
}

写在最后

#include<bits/stdc++.h>
#define MP make_pair
using namespace std;
int main(){
    ......
    return 0;
}
/*
I love playing chess before.
But now,I hate it.
Why my answer is wrong?
I don't know,and I don't want to know.
I wrote the code three times and every time I got the same wrong answer.
It's time to say goodbye.

Luogu : AFewSuns
AFO by chess
NOIP2021
*/

#include<iostream>
#include<cstdio>
using namespace std;
int main(){
    freopen("chess.in","r",stdin);
    freopen("chess.out","w",stdout);
    cout<<4<<endl<<3<<endl<<3<<endl<<3<<endl<<2;
    /*
    I'm sorry, don't leave me
    Really confused
    NOIP 2021, I can get less than 200 pts
    Is it meaningful to continue?
    I don't know
    Obviously, the problems this year are much easier than 2020's
    However, I can't solve(including proof) any of them
    Fuck
    If I can get 1= or high_scored 2=, maybe we can meet next year
    If no, goodbye
    Goodbye to my friends
    Goodbye to lyh, PinkRabbit, Rin, kkk and everyone I met in luogu
    Goodbye to OI
    Unless ACM, or AFO 
    Anyway, my luogu id is Andy_2006
    Looking forward to meet you, if you can see this code 
    */
    return 0;
}

#include<bits/stdc++.h>
#define gc getchar()
#define pc(a) putchar(a)
#define isd(a) (a>='0'&&a<='9')
#define writeln(a) write(a,'\n')
#define int long long
using namespace std;

...... 

main()
{
    freopen("sequence.in","r",stdin);
    freopen("sequence.out","w",stdout);
    read(n),read(m),read(k);
    for(int i=0;i<=m;i++)
        read(v[i]);
    writeln(dfs(0));
    return 0;
}
/*
The last fifteen minutes,I feel so bored ,unhappy and scary.
Why I so bored? Because I don't want to play chrome://dino;
Why I so unhappy? Because The problem is so hard that I can't solve them;
Why I so scary? Because I will afo,so I must come back to study whk.
omg!
*/

// AFO (The only true answer)

// "chang cun bu mie de guo qu , zhu jian xiao shi de wei lai."
// "zong shi ri bo xi shan , ji bian kan bu dao wei lai . ci shi ci ke de guang hui , pan jun wu wang."
// From Chtholly

#include<cstdio>

...... 

int main()
{
    freopen("number.in","r",stdin);
    freopen("number.out","w",stdout);
    Init();
    scanf("%d",&T);
    while(T--)
    {
        scanf("%d",&n);
        if(vis[n]) printf("-1\n");
        else printf("%d\n",Nxt[n]);
    }
    return 0;
}

在11月20日,这个特殊的时间节点,不只是NOIP举办的日子,更是不少人OI生涯走向暂时的终结的日子。

在此,我引用上述代码的一句话作为结语。

既送给各位AFO的大佬们,又送给再度启程的我们。

“纵使日薄西山,即使看不见未来,此时此刻的光辉,盼君勿忘。”

--BY Howie2008 2021.11.21

如果想投稿其他代码,可以私信我。