답안 #460747

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
460747 2021-08-09T09:06:14 Z Khizri 쌀 창고 (IOI11_ricehub) C++17
0 / 100
5 ms 332 KB
#include "ricehub.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back		 
#define F first																 
#define S second 															 
#define INF 1e18
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define pii pair<int,int>
#define pll pair<ll,ll>
#define OK cout<<"Ok"<<endl;
#define MOD (ll)(1e9+7)
#define endl "\n"
int besthub(int n, int l, int arr[], long long k)
{
	int ans=0;
	queue<ll>q;
	for(int i=0;i<n;i++){
		while(q.size()&&arr[i]-q.front()>k){
			q.pop();
		}
		q.push(arr[i]);
		ans=max(ans,(int)q.size());
	}
	return ans;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Incorrect 0 ms 204 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Incorrect 0 ms 204 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -