Submission #328395

# Submission time Handle Problem Language Result Execution time Memory
328395 2020-11-16T11:55:56 Z egas Lightning Rod (NOI18_lightningrod) C++14
7 / 100
1584 ms 262148 KB
#include <bits/stdc++.h>












using namespace std;

int32_t main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);


    long long n;
    cin >> n;
    vector<pair<long long,long long> > v;
    set<long long> ss;
    for(long long i = 0 ; i < n ; i++) {
        long long x;
        cin >> x;
        long long y;
        cin >> y;
        v.push_back({x,y});
        ss.insert(y);
    }
    if(n==2) {
        if(abs(v[1].second-v[0].second)>=abs(v[1].first-v[0].first)) {
            cout << 1 << '\n';
        } else {
            cout << 2 << '\n';
        }
    } else {
        if((*ss.begin())==1 and ss.size()==1)
            cout << n << '\n';
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Runtime error 1580 ms 262148 KB Execution killed with signal 9 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 0 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 0 ms 364 KB Output is correct
7 Correct 0 ms 364 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 0 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 0 ms 364 KB Output is correct
7 Correct 0 ms 364 KB Output is correct
8 Incorrect 1 ms 364 KB Output isn't correct
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 0 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 0 ms 364 KB Output is correct
7 Correct 0 ms 364 KB Output is correct
8 Incorrect 1 ms 364 KB Output isn't correct
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 0 ms 364 KB Output is correct
3 Correct 0 ms 364 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 0 ms 364 KB Output is correct
7 Correct 0 ms 364 KB Output is correct
8 Incorrect 1 ms 364 KB Output isn't correct
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1584 ms 262144 KB Execution killed with signal 9 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1580 ms 262148 KB Execution killed with signal 9 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -