Submission #742987

# Submission time Handle Problem Language Result Execution time Memory
742987 2023-05-17T07:14:39 Z vjudge1 Lightning Rod (NOI18_lightningrod) C++17
0 / 100
1645 ms 262144 KB
#include<bits/stdc++.h>

using namespace std;

int n,mx = -1,mn = 1e9+7,cnt;
vector<pair<int, int>> vc;
map<int, int> mp;

int main()
{
    ios_base::sync_with_stdio(0),cin.tie(0);
    cin>>n;
    for(int i = 0; i<n; ++i){
        int x,y;cin>>x>>y;
        vc.push_back({x,y});
        mp[x]++;
        mx = max(mx,x);
        mn = min(mn,x);
    }
    for(int i = mn; i<=mx; ++i){
        if(mp[i]==0) continue;
        ++cnt;
    }
    cout<<cnt;
}
# Verdict Execution time Memory Grader output
1 Runtime error 1638 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1332 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1332 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1332 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1332 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1645 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1638 ms 262144 KB Execution killed with signal 9
2 Halted 0 ms 0 KB -