답안 #201192

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
201192 2020-02-09T17:43:36 Z DavidDamian 쌀 창고 (IOI11_ricehub) C++11
0 / 100
1000 ms 504 KB
#include "ricehub.h"
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int besthub(int N, int L, int X[], ll B)
{
    int maximum=0;
    for(int i=1;i<=L;i++){
        ll money=B;
        int total=0;
        for(int j=0;j<N;j++){
            if(money>=abs(i-X[j])){
                money-=abs(i-X[j]);
                total++;
            }
        }
        maximum=max(maximum,total);
    }
    return maximum;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 256 KB Output is correct
2 Incorrect 5 ms 248 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 5 ms 376 KB Output is correct
2 Correct 5 ms 376 KB Output is correct
3 Correct 5 ms 256 KB Output is correct
4 Correct 5 ms 376 KB Output is correct
5 Correct 5 ms 256 KB Output is correct
6 Correct 6 ms 256 KB Output is correct
7 Correct 5 ms 256 KB Output is correct
8 Correct 5 ms 504 KB Output is correct
9 Correct 5 ms 256 KB Output is correct
10 Correct 5 ms 376 KB Output is correct
11 Correct 5 ms 256 KB Output is correct
12 Correct 5 ms 256 KB Output is correct
13 Correct 5 ms 424 KB Output is correct
14 Incorrect 5 ms 256 KB Output isn't correct
15 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 7 ms 376 KB Output is correct
2 Correct 7 ms 376 KB Output is correct
3 Execution timed out 1055 ms 376 KB Time limit exceeded
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1079 ms 504 KB Time limit exceeded
2 Halted 0 ms 0 KB -