| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 755291 | Charizard2021 | Exhibition (JOI19_ho_t2) | C++17 | 1 ms | 212 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
vector<pair<int, int> > pictures(n);
//value = first, size = second
for(int i = 0; i < n; i++){
cin >> pictures[i].second >> pictures[i].first;
}
vector<int> frames(m);
for(int i = 0; i < m; i++){
cin >> frames[i];
}
sort(pictures.begin(), pictures.end());
sort(frames.begin(), frames.end());
int current_idx = -1;
int ans = 0;
for(int i = 0; i < n; i++){
int low = current_idx;
int high = m - 1;
int ans2 = -1;
while(low <= high){
int mid = (low + high)/2;
if(pictures[i].second <= frames[mid]){
high = mid - 1;
ans2 = mid;
}
else{
low = mid + 1;
}
}
// cout << i << " " << low << "\n";
if(low != current_idx){
current_idx = low;
ans++;
}
}
cout << ans << "\n";
}
컴파일 시 표준 에러 (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... | ||||
