Submission #935704

# Submission time Handle Problem Language Result Execution time Memory
935704 2024-02-29T12:00:20 Z abcvuitunggio Arcade (NOI20_arcade) C++17
0 / 100
1 ms 2396 KB
#include <bits/stdc++.h>
using namespace std;
int n,m,t[500001],a[500001];
vector <pair <int, int>> p;
set <int> s;
int main(){
    ios_base::sync_with_stdio(NULL);cin.tie(nullptr);
    cin >> n >> m;
    for (int i=1;i<=m;i++)
        cin >> t[i];
    for (int i=1;i<=m;i++){
        cin >> a[i];
        p.push_back({t[i]+a[i],t[i]-a[i]});
    }
    sort(p.begin(),p.end());
    for (auto [i,j]:p){
        auto it=s.lower_bound(j);
        if (it!=s.end())
            s.erase(it);
        s.insert(j);
    }
    cout << s.size();
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 2396 KB Output isn't correct
2 Halted 0 ms 0 KB -