Submission #641025

# Submission time Handle Problem Language Result Execution time Memory
641025 2022-09-15T17:45:55 Z kkkkkkkk Exhibition (JOI19_ho_t2) C++14
0 / 100
1 ms 300 KB
#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n,m;
    cin >> n >> m;
    vector<pair<int,int> > slika(n);
    vector<int> ramka(m);
    for (int i=0;i<n;i++)
        cin >> slika[i].second >> slika[i].first;
    for (int i=0;i<m;i++)
        cin >> ramka[i];
    sort(slika.begin(),slika.end());
    sort(ramka.begin(),ramka.end());
    int index=0,vk=0;
    for (int i=0;i<n;)
    {
        if (index==m) break;
        if (ramka[index]<slika[i].second) index++;
        else index++,i++,vk++;
    }
    cout << vk << endl;

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Incorrect 0 ms 212 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Incorrect 0 ms 212 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 ms 300 KB Output is correct
4 Incorrect 0 ms 212 KB Output isn't correct
5 Halted 0 ms 0 KB -