# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1077304 | Trumling | Teams (IOI15_teams) | C++14 | 4066 ms | 27184 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "teams.h"
#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define pb push_back
#define INF 99999999999999
#define all(x) x.begin(),x.end()
typedef long long ll;
ll n;
vector<ll>a;
vector<ll>b;
void init(int N, int A[], int B[])
{
n=N;
for(int i=0;i<n;i++)
{
a.pb(A[i]);
b.pb(B[i]);
}
}
int can(int M, int K[]) {
vector<bool>vis(n,0);
sort(K,K+M);
bool tf=1;
for(int j=0;j<M;j++)
{
priority_queue<pair<ll,ll> >pq;
for(int i=0;i<n;i++)
if(!vis[i])
if(K[j]>=a[i] && K[j]<=b[i])
pq.push({-b[i],i});
if(pq.size()<K[j])
{
tf=0;
break;
}
for(int i=0;i<K[j];i++)
{
vis[pq.top().S]=1;
pq.pop();
}
}
return tf;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |