上海CSP-J 选手迷惑行为大赏

· · 个人记录

前言

今年的题目感觉不是很难,所以我猜测上海选手的素质也会有所提高hhh。

PS 以下列举的代码仅仅是完整代码的其中一部分。

考号写错人

SH00001

只写了apple并且...

    int n;
    freopen("apple2.in", "r", stdin);
    freopen("apple2.out", "w", stdout);
    cin >> n;

SH00003

bus代码:

int path[10005][10005],n,m,k;
int main(){
    freopen("bus.in","r",stdin);
    freopen("bus.out","w",stdout);
    cin>>n>>m>>k;
    return 0;
}

就是说连写个-1都不想写了是吗...

SH00004

apple代码:

    freopen("apple.in","r",stdin);
    freopen("apple.out","w",stdout);
    cin>>n;
    if(n>=8){
        cout<<"5 ";
        if(n==8){
            cout<<5;
            return 0;
        }else if(n==9){
            cout<<3;
            return 0;
        }else if(n==10){
            cout<<1;
            return 0;
        }
    }else if(n<=3){
        cout<<n<<" "<<n;
        return 0;
    }else if(n==4){
        cout<<"3 1";
        return 0;
    }else if(n==5){
        cout<<"4 4";
        return 0;
    }else if(n==6){
        cout<<"4 2";
        return 0;
    }else{
        cout<<"4 1";
        return 0;
    }
    if(n%3==1){
        cout<<1;
        return 0;
    }

《试图打表》

SH00005

apple代码:

#include<bits/stdc++.h>
using namespace std;
int n,a[100000005],ans1,ans,cnt;
int main(){
    freopen("apple.in","r",stdin);
    freopen("apple.out","w",stdout);
    cin.tie(0);

这数组.....

SH00009

《未命名3.cpp》

SH00010

1851KB ???

为什么T1要打表啊((

SH00013

调试忘关了是吧。。

SH00014

bus代码:

    freopen("bus.in","r",stdin);
    freopen("bus.out","w",stdout);
    int n;
    cin>>n;
    if(n==5) cout<<"6";
    else cout<<"1000782";
    fclose(stdin);
    fclose(stdout);

你这还不如输出个-1.....

SH00018

apple代码:

#include<bits/stdc++.h>
using namespace std;
int main() {
//  freopen("apple.in", "r", stdin);
//  freopen("apple.out", "w", stdout);
    int n, a[1000000007];
    cin >> n;
    int n2 = n;
    for(int i = 1; i <= n; i++) a[i] = i;

终于看到了一个把freopen注释掉的!!!!

欸?这人怎么数组也开这么大?

SH00020

bus代码:完整代码

    cin>>n>>m>>k;
    for(int i=1;i<=m;i++){
        int u,v,a;
        cin>>u>>v>>a;
        es[u].push_back(v);
        p[u].push_back(a);
    }
    if(k==1){
        dijkstra1();
        return 0;
    }
    if(n<=10&&m<=15){
        bfs();
        return 0;
    }
    if(n==9508){
        cout<<1000782<<endl;
        return 0;
    }
    cout<<-1<<endl;
    return 0;
}

你前面写的那么好,但是你又......

SH00022

bus:

    for(ll i=1;i<=m;i++){
        ll a,b,c;
        cin>>a>>b>>c;
    }
    if(n==5){
        cout<<6<<endl;
        return 0;
    }
    else if(n==9508){
        cout<<1000782<<endl;
        return 0;
    }
    else{
        cout<<-1<<endl;
        return 0;
    }

呃 怎么都打样例 难道打样例有分???

SH00024

apple完整代码:

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

bool a[1000000009];

int main(){

    //freopen("apple.in","r",stdin);
    //freopen("apple.out","w",stdout);
    int n;
    cin>>n;
    for(int i=0;i<=n;i++){

    }
    return 0;

}

好家伙放弃了是吧

SH00028

这位老哥的其它三题也有样例数据和cpp文件,结果这题cpp都没了。。

SH00030

和上面这个老哥同一个情况

SH00031

road:

#include<bits/stdc++.h>
#include<cmath> 
using namespace std;
const int N = 10005;
long long v[N],a[N],jin_point[N],jin_long[N];
int main(){
    //freopen("road.in","r",stdin);
    //freopen("road.out","w",stdout);

  .....

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

必不可少的系列。

SH00032

apple:

            }
            else
                if(a[i]==0)
                    Countapple++; 
            if(Countapple==3)
                Countapple=0;
        }
    }
    cout<<Countday<<" "<<CountN<<endl;
    return 0;
}
//n个苹果在第几天能被拿完的公式写出来了,但第N个苹果在第几天被拿走的不会 

太诚实了,说句实话,我也不会

SH00034

uqe:

int main()
{
    //freopen("uqe.in","r",stdin);
    //freopen("uqe.out","w",stdout);
    cin>>T>>M;
    for(int i=0;i<T;i++)

好。

SH00035

apple:

#include<bits/stdc++.h>
using namespace std;
const int maxn=100009;
int n,x[100009]={1,2,3,3,4,4,4,5,5,5,5,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,34,34,34,34,34,34,34,34,34,34,34,34,34,34,…………,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207,207};
int y[100009]={1,2,3,1,5,2,1,5,3,1,2};
int main(){
    freopen("apple.in","r",stdin);
    freopen("apple.out","w",stdout);

79KB的文件,每个人的打表方式都不一样哈哈哈哈

后记

此片还没写完,会继续更新,欢迎评论区投稿。