BJ 选手迷惑行为大赏

· · 个人记录

一个一个翻的 /px

\sf Warning:本文有大段代码,篇幅较长,请耐下心来看。

没处理完,到了 J BJ-00108

注 释 人

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

一 二 三 四 五 水 果 人

freopen("fruit.in","r",stdin);
freopen("fruit.out","w",stdout);
printf("1\n2\n3\n4\n5\n");

一 二 三 四 五 六 七 …… n 水 果 人

for(int i=0;i<a;++i){
    cout<<i<<" ";
}

全 部 木 大

// #include<bits/stdc++.h>
// using namespace std;
// const int MAXN=8010;
// int n,q;
// int a[MAXN],tmp[MAXN],tmpc[MAXN];
// bool vis[MAXN];
// int main(){
//     freopen("sort.in","r",stdin);
//     freopen("sort.out","w",stdout);
//     scanf("%d%d",&n,&q);
//     for(int i=1;i<=n;i++){
//         scanf("%d",&a[i]);
//         tmp[i]=a[i];
//     }
//     while(q--){
//         int k,x,v;
//         scanf("%d%d",&k,&x);
//         if(k==1){
//             memset(vis,0,sizeof(vis));
//             for(int i=1;i<=n;i++) tmp[i]=a[i];
//             scanf("%d",&v);
//             a[x]=v;
//             tmp[x]=v;
//         }else{
//             sort(tmp+1,tmp+1+n);
//             int ans=lower_bound(tmp+1,tmp+1+n,a[x])-tmp;
//             if(vis[ans]==1){
//                 for(int i=1;i<=n;i++) tmpc[i]=tmp[i];
//                 while(vis[ans]==1){
//                     tmpc[ans]-=1;
//                     int tmp1=ans;
//                     ans=upper_bound(tmpc+1,tmpc+1+n,tmpc)-tmpc+1;
//                     swap(tmpc[tmp1],tmpc[ans]);
//                     ans=lower_bound(tmpc+1,tmpc+1+n,a[x])-tmpc;
//                 }
//                 printf("%d\n",ans);
//                 vis[ans]=1;
//             }
//             else{
//                 printf("%d\n",ans);
//                 vis[ans]=1;
//             }
//         }
//     }
//     return 0;
// }

花 里 胡 哨

vector<int> _myList;

void ParseIn () {
  int curInt = 0;

  ifstream inFile("fruit.in");

  while (inFile >> curInt) {
    _myList.push_back(curInt);
  }

  inFile.close();
}

void CoreOut () {
  ofstream outFile("fruit.out");
  for (int i = 1; i < _myList.size(); i++) {
    if (i = 1) {
      outFile << 1 << " ";

      continue;
    }
    if (_myList[i-1] != _myList[i]) {
      outFile << i << endl;

      _myList[i] = 0;
    }
  }
  outFile.close();
}

int main () {
  ParseIn();
  CoreOut();

  return 0;
}

脱 裤 子 放 屁



#include <iostream>
#include <fstream>

using namespace std;

void ParseIn () {

}

void Core () {

}

void WriteOut () {
    ofstream outFile ("network.out");

    outFile << "ERR" << endl;

    outFile.close(0);
}

int main () {

    ParseIn ();
    Core ();
    WriteOut ();
    return 0;

}

相 信 出 题 人 良 心 到 放 样 例 人

freopen("network.in","r",stdin);
freopen("network.out"."w",stdout);
printf("OK\nFAIL\n1\nFAIL\nERR")

谜 语 人

   if(n<=5)
   {
       for(int i=1;i<=n;i++) scanf("%d",&a[i]);
        if(a[1]==a[2]&&a[2]==a[3]&&a[3]==a[4]&&a[4]==a[5]) printf("1\n2\n3\n4\n5\n");
    }
    else printf("???????");

巨 大 数 组 人(在主函数开的)

int n,q,lei[10000001],pai2[10000001],ti1[10000001],bei1[10000001],a[10000001];

p i n y i n r e n

int ser[1050][5];    //First num means the num of the IP, second num means a,b,c,d,e      //fuwu
int cli[1050][5];    //kehu

巨 大 长 变 量 名 和 注 释

struct ads{
    int a;
    int b;
    int c;
    int d;
    int e;
    bool ERR;
    ads(){
        ERR = 0;
    }
    void get(){
        a = getint();//cout << "A" << funcchar << a;
        if(funcchar!='.'||funcERR){ERR = 1;/*cout << "ERROR"*/;funcERR=0;}
        b = getint();//cout << "A" << funcchar << b;
        if(funcchar!='.'||funcERR){ERR = 1;/*cout << "ERROR"*/;funcERR=0;}
        c = getint();//cout << "A" << funcchar << c;
        if(funcchar!='.'||funcERR){ERR = 1;/*cout << "ERROR"*/;funcERR=0;}
        d = getint();//cout << "A" << funcchar << d;
        if(funcchar!=':'||funcERR){ERR = 1;/*cout << "ERROR"*/;funcERR=0;}
        e = getint();//cout << "A" << funcchar << e;
        funcERR=0;
    }
    void check(){
        if(a>255||b>255||c>255||d>255||e>65535||a<0||b<0||c<0||d<0||e<0){
            ERR = 1;
            //cout << "ERRORBYCHECK\n";
            return;
        }
        //cout << "A" << endl;
    }
};
int main(){
    freopen("network.in","r",stdin);
    freopen("network.out","w",stdout);
    int n;
    ads avalads[1005];int alen = 1;
    int aidx[1005];
    ads in;
    cin >> n;
    bool continuecontinue = 0;
    for(int i = 1;i <= n;i ++){
        char c[10];
        cin >> c;
        in.get();in.check();
        if(in.ERR == 1) {cout << "ERR\n";continue;}
        if((i==1&&c[0]=='S') || nexttimeTYPE == 'S'){
            //cout << "S: ";
            nexttimeTYPE = funcchar;
            for(int i = 1;i <= alen;i ++){
                if(avalads[i].a == in.a &&avalads[i].b == in.b &&avalads[i].c == in.c &&avalads[i].d == in.d &&avalads[i].e == in.e){
                    cout << "FAIL\n";continuecontinue = 1;break;
                }
            }
            if(continuecontinue) {continuecontinue = 0;continue;}
            cout << "OK\n";
            aidx[alen] = i;
            avalads[alen++] = in;

            continue;
        }else{
            //cout << "C: ";
            nexttimeTYPE = funcchar;
            for(int i = 1;i <= alen;i ++){
                if(avalads[i].a == in.a &&avalads[i].b == in.b &&avalads[i].c == in.c &&avalads[i].d == in.d &&avalads[i].e == in.e){
                    cout /*<< "AID"*/ << aidx[i] << "\n";continuecontinue = 1;break;
                }
            }
            if(continuecontinue) {continuecontinue = 0;continue;}
            cout << "FAIL\n";continue;
        }
    }
    return 0;
}

打 表 人

    if(s == "0 0 0 0 0" || s == "1 1 1 1 1"){
        cout << "1" << endl << "2" << endl << "3" << endl << 4 << endl << 5;
    }else if(s == "0 0 0 0 1" || s == "1 1 1 1 0"){
        cout << 1 << 5 << endl << 2 << endl << 3 << endl << 4;
    }else if(s == "0 0 0 1 0" || s == "1 1 1 0 1"){
        cout << 1 << 4 << 5 << endl << 2 << endl << 3;
    }else if(s == "0 0 0 1 1" || s == "1 1 1 0 0"){
        cout << 1 << 4 << endl << 2 << 5 << endl << 3;
    }else if(s == "0 0 1 0 0" || s == "1 1 0 1 1"){
        cout << 1 << 3 << 4 << endl << 2 << endl << 5;
    }else if(s == "0 0 1 0 1" || s == "1 1 0 1 0"){
        cout << 1 << 3 << 4 << 5 << endl << 2;
    }else if(s == "0 0 1 1 0" || s == "1 1 0 0 1"){
        cout << 1 << 3 << 5 << endl << 2 << 4;
    }else if(s == "0 0 1 1 1" || s == "1 1 0 0 0"){
        cout << 1 << 3 << endl << 2 << 4 << endl << 5;
    }else if(s == "0 1 0 0 0" || s == "1 0 1 1 1"){
        cout << 1 << 2 << 3 << endl << 4 << endl << 5;
    }else if(s == "0 1 0 0 1" || s == "1 0 1 1 0"){
        cout << 1 << 2 << 3 << 5 << endl << 4;
    }else if(s == "0 1 0 1 0" || s == "1 0 1 0 1"){
        cout << 1 << 2 << 3 << 4 << 5;
    }else if(s == "0 1 0 1 1" || s == "1 0 1 0 0"){
        cout << 1 << 2 << 3 << 4 << endl << 5;
    }else if(s == "0 1 1 0 0" || s == "1 0 0 1 1"){
        cout << 1 << 2 << 4 << endl << 3 << 5;
    }else if(s == "0 1 1 0 1" || s == "1 0 0 1 0"){
        cout << 1 << 2 << 4 << 5 << endl << 3;
    }else if(s == "0 1 1 1 0" || s == "1 0 0 0 1"){
        cout << 1 << 2 << 5 << endl << 3 << endl << 4;
    }else if(s == "0 1 1 1 1" || s == "1 0 0 0 0"){
        cout << 1 << 2 << endl << 3 << endl << 4 << endl << 5;
    }else if(s == "0 0 0 0" || s == "1 1 1 1"){
        cout << 1 << endl << 2 << endl << 3 <<endl << 4;
    }else if(s == "0 0 0 1" || s == "1 1 1 0"){
        cout << 1 << 4 << endl << 2 <<endl << 3;
    }else if(s == "0 0 1 0" || s == "1 1 0 1"){
        cout << 1 << 3 << 4 <<endl << 2;
    }else if(s == "0 0 1 1" || s == "1 1 0 0"){
        cout << 1 << 3 << endl << 2 << 4;
    }else if(s == "0 1 0 0" || s == "1 0 1 1"){
        cout << 1 << 2 << 3 <<endl << 4;
    }else if(s == "0 1 0 1" || s == "1 0 1 0"){
        cout << 1 << 2 << 3 << 4;
    }else if(s == "0 1 1 0" || s == "1 0 0 1"){
        cout << 1 << 2 << 4 <<endl << 3;
    }else if(s == "0 1 1 1" || s == "1 0 0 0"){
        cout << 1 << 2 << endl << 3 <<endl << 4;
    }else if(s == "0 0 0" || s == "1 1 1"){
        cout << 1 << endl << 2 << endl << 3;
    }else if(s == "0 0 1" || s == "1 1 0"){
        cout << "1" << 3 << endl << 2;
    }else if(s == "0 1 0" || s == "1 0 1"){
        cout << 4 << 2 << 3;
    }else if(s == "0 1 1" || s == "1 0 0"){
        cout << 1 << 2 << endl << 3;
    }else if(s == "0 0" || s == "1 1"){
        cout << 1 << endl << 2;
    }else if(s == "0 1" || s == "1 0"){
        cout << 1 << 2;
    }else if(s == "0" || s == "1"){
        cout << 1;
    }

O K 人

for(int i=1;i<=a;i++){
    cout<<"OK"<<endl;
}

我 在 看 C++ 系 统 库 吗

void Core(){
  int curInt;
  for(int i = 0; i < _commandList.size(); i++){
    if(_commandList[i].type == 2){
      _resList.push_back(_sortList[theHash[_commandList[i].place-1]]);
      continue;
    }
    _sortList[theHash[_commandList[i].place - 1]] = _commandList[i].num;
    for(int m = 0; m < _size-1; m++){
      if(_sortList[m] > _sortList[m+1]){
    curInt = theHash[hashT[m]];
    theHash[hashT[m]] = theHash[hashT[m+1]];
    theHash[hashT[m+1]] = curInt;
        curInt = _sortList[m];
    _sortList[m] = _sortList[m+1];
    _sortList[m+1] = curInt;
      }
      for(int k = 0; k < 5; k++){
    cout << _sortList[k] << endl;
      }
      cout << endl;
    }
  }
}

祈 祷 nia

AC

英 语 学 的 真 好

bool a[200001],b[200001],orangeorapple;

先 辈(棒读)

#define INF 1145141919810

把 n e t w o r k 写 成 j u l i a n

network.cpp
5.8KB

来 享 受 键 盘 按 摩

BJ-00***
|- 无文件