답안 #838850

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
838850 2023-08-27T23:19:17 Z DeathIsAwe Exhibition (JOI19_ho_t2) Python 3
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;
int bruh[100000];

bool comp(pair<int,int>a, pair<int,int>b) {
    return a.second<b.second;
}

int main() {
    int n,m; cin >> n >> m;
    vector<pair<int,int>> paintings(n);
    vector<int> frames(m);
    for (int i=0;i<n;i++) {
        cin >> paintings[i].first >> paintings[i].second;
    }
    for (int i=0;i<m;i++) {
        cin >> frames[i];
    }

    sort(frames.begin(),frames.end());
    sort(paintings.begin(),paintings.end(),comp);

    int sus;
    for (int i=0;i<n;i++) {
        sus=lower_bound(frames.begin(),frames.end(),paintings[i].first)-frames.begin();
        bruh[i]=sus;
    }
    
    int ans=0,counter=0;
    for (int i=n-1;i>-1;i--) {
        if (bruh[i]+counter<m) {
            ans++; counter++;
        }
    }
    cout << ans;
}

Compilation message

File "joi2019_ho_t2.py", line 2
    using namespace std;
          ^
SyntaxError: invalid syntax