답안 #28809

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
28809 2017-07-17T08:43:31 Z dereotu 쌀 창고 (IOI11_ricehub) C++14
17 / 100
1000 ms 5924 KB
#include "ricehub.h"
#include <bits/stdc++.h>
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define st first
#define nd second
#define forr(i,A,B) for(int i=A;i<B;++i)
#define space ' '
#define endl '\n'
#define LL long long
using namespace std;

int a[105],ans;

int besthub(int R, int L, int X[], long long B){
	
	forr(i,0,L){
		int b=0,h=0;
		memset(a,0,sizeof a);
		forr(j,0,R){
			a[j]=abs(X[j]-i);
		}
		sort(a,a+R);
		forr(j,0,R){
			if(b+a[j]<=B){
				b+=a[j];
				h++;
			}
			else break;
		}
		ans=max(ans,h);
	}
 	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 5924 KB Output is correct
2 Correct 0 ms 5924 KB Output is correct
3 Correct 0 ms 5924 KB Output is correct
4 Correct 0 ms 5924 KB Output is correct
5 Correct 0 ms 5924 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 5924 KB Output is correct
2 Correct 0 ms 5924 KB Output is correct
3 Correct 0 ms 5924 KB Output is correct
4 Correct 0 ms 5924 KB Output is correct
5 Correct 0 ms 5924 KB Output is correct
6 Correct 0 ms 5924 KB Output is correct
7 Correct 0 ms 5924 KB Output is correct
8 Correct 0 ms 5924 KB Output is correct
9 Correct 0 ms 5924 KB Output is correct
10 Correct 0 ms 5924 KB Output is correct
11 Correct 0 ms 5924 KB Output is correct
12 Correct 0 ms 5924 KB Output is correct
13 Correct 0 ms 5924 KB Output is correct
14 Correct 0 ms 5924 KB Output is correct
15 Correct 0 ms 5924 KB Output is correct
16 Correct 0 ms 5924 KB Output is correct
17 Correct 0 ms 5924 KB Output is correct
18 Correct 0 ms 5924 KB Output is correct
19 Correct 0 ms 5924 KB Output is correct
20 Correct 0 ms 5924 KB Output is correct
21 Incorrect 3 ms 5924 KB Output isn't correct
22 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 23 ms 5924 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1000 ms 5924 KB Execution timed out
2 Halted 0 ms 0 KB -