제출 #1331372

#제출 시각아이디문제언어결과실행 시간메모리
1331372alexaaa쌀 창고 (IOI11_ricehub)C++20
0 / 100
0 ms344 KiB
#include "ricehub.h"
using namespace std;
#include<bits/stdc++.h>

int besthub(int R, int L, int X[], long long B)
{
  int max_count = 0;
  for(int i = 0; i < R; i ++){
    long long total = 0;
    int count = 0;
    for(int j =i; j < R; j++){
      total += abs(X[i]-X[j]);
      if(total > B){
        max_count = max(max_count,count);
        break;
      }
      count ++;

    }
  }
  return max_count;
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...