HL CSP-S 迷惑行为大赏

· · 休闲·娱乐

(因为作者的电脑配置,很多中文只能靠手动翻译,可能有微小差异,但大体是对的。)

黑大考场

暂无数据

黑科大考场

暂无数据

齐大考场

暂无数据

佳大考场

HL-S00002

club

男人。

struct man {
    int a=0,b=0,c=0,od=0;
};

HL-S00004

club

比我强还知道开long long。

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

HL-S00009

replace

没打完代码的同志,连freopen都没打。

#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ULL;

ULL hs(string x){
    ULL ans=0,k=13331;
    for(int i=0;i<x.size();i++){
        ans+=x[i]-'a'+1;
        ans*=k;
    }
    return ans;
}

map<ULL,ULL> mp;
int main(){
    int n,q;
    cin>>n>>q;
    for(int i=1;i<=n;i++){
        string a,b;
        cin>>a>>b;
        int a1=hs(a),b1=hs(b);
        mp[a1]=b1;mp[b1]=a1;
    }
    while(q--){
        string a,b;
        cin>>a>>b;
        if(a.size()!=b.size()){
            cout<<'0'<<endl;
            continue;
        }
        ULL a1[200005],b1[200005];
        memset(a1,0,sizeof a1);
        memset(b1,0,sizeof b1);
        int ha1=hs(a),hb1=hs(b);
        for(int i=0;i<n;i++){
            string p="",q="";
            for(int j=0;j<=i;j++){
                p+=a[j];
                q+=b[j];
            }
            a1[i]=hs(p);
            b1[i]=hs(q);
        }
        int ans=0;
        for(int i=0;i<n;i++){
            for(int j=i+1;j<n;j++){
                int ha=a1[j]-a1[i],hb=b1[j]-b1[i];
                if(ha!=hb&&mp[ha]==hb){

                }
            }
        }
    }
    return 0;
}

HL-S00024

club

hhh。

bool b(int h,int g)
{
    return a[h][1]>a[g][1];
}
bool bb(int hh,int gg)
{
    return a[hh][2]>a[gg][2];
}
bool bbb(int hhh,int ggg)
{
    return a[hhh][3]>a[ggg][3];
}

employ

.in .out 人。

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

replace

和 employ 代码一样。

HL-S00040

club

AC求求了,但是可能MLE。

//X
//AC,qiuqiule
#include <bits/stdc++.h>
using namespace std;
long long a[101000][3];
long long A[100000];
long long B[100000];
long long C[100000];
long long D[100000];
long long Aq[100000];
long long Bq[100000];
long long Cq[100000];
long long Dq[100000];
long long Ah[100000];
long long Ahi[100000];
long long Bh[100000];
long long Bhi[100000];
long long Ch[100000];
long long Chi[100000];

HL-S00044

目录建错了。

HL-S00062

employ

谁告诉你这么取模了。

if(m==n){
    long long sum=1;
    for(int i=1;i<=n;i++){
        sum*=i;
    }
    cout<<sum%998%244%353;
    return 0;
}

HL-S00067

建错目录+没freopen。人类。

employ

什么意思。

#include<bits/stdc++.h>
using namespace std;
int main(){
    int n[1001];
    int s0,s1;
    for(int i=1;i<=n;i++){
        if(n=s0+s1){
            cout<<"使用";
        }
        else{
            cout<<"配置"
        }
    }

    return 0;
}

HL-S00070

每个代码都有。

//8min18s forward

HL-S00085

都没return 0,例如:

employ

试猜测main函数的返回值。


#include<bits/stdc++.h>
using namespace std;
int t,q;
main(){
        freopen("employ.in","r",stdin);
    freopen("employ.out","w",stdout);
    cout << 515058943 << endl;
}

HL-S00110

club

剩余内容过多不予展示。

d[0] = a[0] + b[2] + b [3] +a[1];
d[1] = a[0] + a[1] + b [2] + c[3];
d[2] = a[0] + a[1] + c [2] + b[3];
d[3] = a[0] + a[1] + c [2] + c[3];
d[4] = a[0] + b[1] + c [2] + a[3];
d[5] = a[0] + b[1] + c [2] + b[3];
d[6] = a[0] + b[1] + c [2] + c[3];
d[7] = a[0] + b[1] + b[2] + a[3];
d[8] = a[0] + b[1] + b[2] + c[3];

HL-S00115

club

freopen的位置绝了。

cin>>t;
while(t--){
    freopen("club.in","r",stdin);
    freopen("club.out","w",stdout);
    cin>>n;
    for(int i = 1;i<=n;i++)
        cin>>a[i]>>c>>d;
    sort(a+1,a+n+1);
    for(int i = n/2;i<=n;i++)
        ans+=a[i];
    cout<<ans<<"\n";
    return 0;
}

employ

和club代码一样。

甚至freopen("club.in","r",stdin);。

road

和club代码一样。

甚至freopen("club.in","r",stdin);。

replace

和club代码一样。

甚至freopen("club.in","r",stdin);。

HL-S00116

club

光打了一个club还把return 0吃了。

更人类的是freopen还是road。

#include<bits/stdc++.h>
using namespace std;
int b1[10005];
int b2[10050];
int b3[10005];


int main()
{
    freopen("road.in","r",stdin);
    freopen("road.out","w",stdout);
    int a1,a2,a3,m;
    int n,k,p,o=0,y=0;
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cin>>k;
        m=k/2;
        for(int j=1;j<=k;j++)
        {
            cin>>a1>>a2>>a3;

            b1[j]=a1;
            b2[j]=a2;
            b3[j]=a3;

        }
        if(b1[2]>=b2[2]&&b1[2]>=b3[2])
         o=b1[2];
         else if(b2[2]>=b1[2]&&b2[2]>=b3[2])
         o=b2[2];
         else
         o=b3[2];
         if(b1[1]>=b2[1]&&b1[1]>=b3[1])
         p=b1[1];
         else if(b2[1]>=b1[1]&&b2[1]>=b3[1])
         p=b2[1];
         else
         p=b3[1];
         cout<<o+p;




    }
}

HL-S00132

employ

检索不到#include。

using namespace std;
int main()
{
    freopen("employ.in","r",stdin);
    freopen("employ.out","w",stdout);





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

HL-S00147

club

又一个男人(见HL-S00002)。

struct man{
    int a1;
    int a2;
    int a3;
    int amax;
    int amid;
    int amin;
    int amaxi;
    int amidi;
    int amini;
}a[120000];

HL-S00181

club

你一看就和HL-S00110是好兄弟。

剩余内容过多不予展示。

if(a[0] + a[1] + b[2] + b[3] >= now_max) now_max = a[0] + a[1] + b[2] + b[3];
            if(a[0] + a[1] + b[2] + c[3] >= now_max) now_max = a[0] + a[1] + b[2] + c[3];
            if(a[0] + a[1] + c[2] + b[3] >= now_max) now_max = a[0] + a[1] + c[2] + b[3];
            if(a[0] + a[1] + c[2] + c[3] >= now_max) now_max = a[0] + a[1] + c[2] + c[3];
            if(a[0] + b[1] + a[2] + b[3] >= now_max) now_max = a[0] + b[1] + a[2] + b[3];
            if(a[0] + b[1] + a[2] + c[3] >= now_max) now_max = a[0] + b[1] + a[2] + c[3];

HL-S00183

clud

文件夹名称为clud,没毛病。

神秘代码。

#include<bits/stdC++.h>
using namespace std;
int t=1;
int n[100000];
int main()int n=0;
    if(n=2;n<=100000;n++);
{
    freopen("club.in","r",stdin);
    freopen("club.out","w",stdout);

    for(t=1;t<=5;t++){
        cin>>t;
    }
    int i=0;
    for(i=1;i<=n[100000];i++){

        cin>>i;
    }
    return 0;
}

HL-S00210

replace

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

HL-S00218

club3

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

HL-S00228

club

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

HL-S00233

club

高级。

#include <bits/stdc++.h>

int tj(int n,int**);
int main (){
    freopen("club.in","r",stdin);
    freopen("club.out","w",stdout);
    using namespace std;
    int t = 0;
    int ** s=new int*[100000];
    for(int p=0;p<100000;p++) *(s+p)=new int[3];
    cin >> t;
    while (t--) {
        int n = 0;
        cin >> n;
        for (int p=0;p<n;p++) cin >> *(*(s+p)) >> *(*(s+p)+1) >> *(*(s+p)+2);
        cout <<endl<< tj(n,s);
    }
    for(int p=0;p<100000;p++) delete *(s+p);
    delete s;
    return 0;
}

int tj(int n,int **m){
    int s[3]{};
    int w=0;
    for(int f=0;f<n;f++){
        for(int j=0;j<3;j++) {
           for(int l=0;l<3;l++) {
            if(*(*(m+n)+j)<*(*(m+n)+l)) break;
            if(s[j]<=n/2){
                s[j]++;
                w+=*(*(m+n)+j);
                goto cc;
                }else *(*(m+n)+j)=0;
            }
        }
    cc:;
    }
    return w;
}

HL-S00237

club

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

HL-S00242

club

@bcxlz_laptop,你好呀~

//太难了,写不下去了啊,我疯了
//看来目前我不适合打csp-s
//luogu:bcxlz_laptop

HL-S00253

作者本人,没有迷惑行为。

HL-S00255

club

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

HL-S00274

club

开的真多。

using namespace std;
int a[100005][5];
int b[5];
long long c[5];
int d[100005];
int d4[100005];
int d5[100005][3];
int d6[100005];
int e[100005];
int e4[100005];
int e5[100005][3];
int e6[100005];
int f[100005];
int f4[100005];
int f5[100005][3];
int f6[100005];

HL-S00289

返回值为rand()。

以及这个freopen("club.out","r",stdout);。

#include<bits/stdc++.h>
using namespace std;
int n,m,a[6][100010];
string s;
int main()
{
    freopen("club.in","r",stdin);
    freopen("club.out","r",stdout);
    cin>>n>>m;
    for(int i=1;i<=m;i++)
    {
        for(int j=1;j<=n;j++)
        {
            cin>>a[m][n];
        }
    }
    for(int i=1;i<=m;i++)
    {

            cout<<'0';

    }   
}

HL-S00308

club

你别不信他在文件夹里留了个club.out。咱也不知道club.cpp哪去了。

employ

返回值为随机数。

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

int main(){
    freopen("employ.out","w",stdout);
    cout<<0;
}

HL-S00323

传奇迷惑行为,例如:

club

freopen("club.in","club.out",stdin);
freopen("club.in","club.out",stdout);

HL-S00328

目录建错了。

HL-S00341

replace

feropen("replace.out","w",stdout);

HL-S00375

clud

文件夹名称为clud。和HL-S00183难兄难弟。

甚至文件都是clud.cpp。

甚至:

//  freopen("clud1.in","r",stdin);
//  freopen("clud2.in","r",stdin);
//  freopen("clud3.in","r",stdin);
//  freopen("clud4.in","r",stdin);
//  freopen("clud5.in","r",stdin);
//  freopen("clud.out","w",stdout); 

employ

    freopen("employ1.in","r",stdin);
//  freopen("employ2.in","r",stdin);
    freopen("employ.out","w",stdout);

replace

    freopen("replace1.in","r",stdin);
//  freopen("replace2.in","r",stdin);
    freopen("replace.out","w",stdout);

road

    freopen("road1.in","r",stdin);
//  freopen("road2.in","r",stdin);
    freopen("road.out","w",stdout);

HL-S00384

culb

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

HL-S00388

没写完的代码需要搭配奇葩的头文件(不管是road,replace,还是employ都一样),例如:

employ

#include<bits/std.c++>
using namespace std;
int main(){
    freopen("employ.in","r",stdin);
    freopen("employ.out","w",stdout);
    int n,m,;
    int b[5005];
    string a[5005];
    cin>>n>>m;
    for(int i=0;i<=n;i++){
        cin>>a[i];  }
    for(int i=0;i<=n;i++){
        {
            cin>>
        }


    }

}


HL-S00389

employ

我这种绿勾菜鸡看你不爽你知道吗。

后经查证是 @jms23012。

if(i!=jc) next_permutation(perm+1,perm+n+1);//100+48+25+28->100+48+25+8.Situation A isn't easy.There are bult_1519s in it.

HL-S00409

employ

你是奔着迷惑行为大赏来的。

#include<bits/stdc++.h>
using namespace std;
int rs[3];
int main(){
    freoprn(" employ.in","r",stdin);
    freoprn(" employ.out","w",stdout);
    cout<<7;
    }

HL-S00415

road

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

HL-S00425

club

//buhui

road

//buhui

replace

//buhui

employ

//buhui

HL-S00428

.cpp都被你吃了。

HL-S00433

freopen都被你吃了。

HL-S00461

club

男人,不过这个#define int long long有些别致。

还有「大叔」是啥。

#include<bits/stdc++.h>
#define int  long long
using namespace std;
const int MOD=5*1e5+5;
struct MAN{
    int s1,s2,s3;
    int c;
}ma[MOD];
int n,dashu,ans;