Submission #328411

# Submission time Handle Problem Language Result Execution time Memory
328411 2020-11-16T12:46:22 Z egas Lightning Rod (NOI18_lightningrod) C++14
11 / 100
1768 ms 132124 KB
#include <bits/stdc++.h>

using namespace std;

int32_t main() {

    ios_base::sync_with_stdio(false);

    cin.tie(0);

    int n;

    cin >> n;

    vector<pair<int,int> > v;

    bool isSub1=true;

    for(int i = 0 ; i < n ; i++) {

        int x;

        cin >> x;

        int y;

        cin >> y;

        if(y!=1)isSub1=false;

        v.push_back({x,y});

    }

    if(isSub1) {

        cout << n << '\n';

    } else {

        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 {

        }

    }

    return 0;

}

# Verdict Execution time Memory Grader output
1 Correct 1768 ms 132088 KB Output is correct
2 Correct 1766 ms 131824 KB Output is correct
3 Correct 1747 ms 132072 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 0 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 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 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 0 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 0 ms 364 KB Output is correct
8 Incorrect 0 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 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 0 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 0 ms 364 KB Output is correct
8 Incorrect 0 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 1 ms 364 KB Output is correct
3 Correct 1 ms 364 KB Output is correct
4 Correct 0 ms 364 KB Output is correct
5 Correct 0 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 0 ms 364 KB Output is correct
8 Incorrect 0 ms 364 KB Output isn't correct
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1763 ms 132124 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1768 ms 132088 KB Output is correct
2 Correct 1766 ms 131824 KB Output is correct
3 Correct 1747 ms 132072 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 364 KB Output is correct
6 Correct 1 ms 364 KB Output is correct
7 Correct 0 ms 364 KB Output is correct
8 Correct 0 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 0 ms 364 KB Output is correct
11 Incorrect 0 ms 364 KB Output isn't correct
12 Halted 0 ms 0 KB -