답안 #224589

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
224589 2020-04-18T13:14:16 Z DanerZein 쌀 창고 (IOI11_ricehub) C++14
컴파일 오류
0 ms 0 KB
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;
long long ma;
int besthub(int R, int L, int X[], long long B){

    vector<long long> S;
    for(long long i=0;i<R;i++){

        for(long long j=i;j<R;j++){
            long long b=B;
            vector<long long>ps;
            for(long long k=i;k<=j;k++){
                ps.push_back(X[k]);
            }
            long long mi=i+j;
            mi/=2;
            mi=X[mi];
            /*long long mi=ps[0]+ps[ps.size()-1];
            mi/=2;*/
           /* printf("i:%d j:%d mi:%d\n",i,j,mi);
            for(int k=0;k<ps.size();k++){
                cout<<ps[k]<<" ";
            }
            cout<<endl;*/
            bool sw=0;
            for(long long k=0;k<ps.size();k++){
                long long c=abs(mi-ps[k]);
                b-=c;
                if(b<0){
                    sw=1;
                    break;
                }
                /*if(b-c<0){
                    sw=1;
                    break;
                }
                else{

                    b-=c;
                }*/
            }
            /*if(ps.size()==245){
                for(int k=0;k<ps.size();k++){
                    cout<<ps[k]<<" ";
                }
                cout<<endl;
                cout<<b<<endl;
                if(b>=0){
                    cout<<"YES"<<endl;
                }
            }*/
            if(sw==0 or b>=0){
              /*  for(int k=0;k<ps.size();k++){
                    cout<<ps[k]<<" ";
                }*/
                //cout<<ps.size()<<endl;
                //cout<<i<<" "<<j<<endl;
                S.push_back(ps.size());
            }
        }
    }
    ma=-1;
    for(long long i=0;i<S.size();i++){
        ma=max(ma,S[i]);
    }
    //cout<<ma<<endl;
return ma;
}

Compilation message

ricehub.cpp:1:10: fatal error: grader.h: No such file or directory
 #include "grader.h"
          ^~~~~~~~~~
compilation terminated.