답안 #361710

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
361710 2021-01-31T11:06:02 Z wildturtle Lightning Rod (NOI18_lightningrod) C++14
66 / 100
2000 ms 98912 KB
#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,i,e,f,g,n,m,k,l;
stack < pair <long long , long long > > st;
int main() {
    cin>>n;
    for(long long i=1;i<=n;i++) {
        cin>>a>>b;
        l=0;
        while(!st.empty()) {
            c=st.top().first;
            d=st.top().second;
            if(a+b<=c+d) { l=1; break; }
            if(a-b<=c-d) st.pop();
            else break;
        }
        if(l==0) st.push({a,b});
    }
    cout<<st.size();
}
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2082 ms 98912 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 2 ms 364 KB Output is correct
12 Correct 2 ms 384 KB Output is correct
13 Correct 2 ms 364 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 256 KB Output is correct
3 Correct 1 ms 256 KB Output is correct
4 Correct 1 ms 364 KB Output is correct
5 Correct 1 ms 384 KB Output is correct
6 Correct 1 ms 256 KB Output is correct
7 Correct 1 ms 364 KB Output is correct
8 Correct 1 ms 364 KB Output is correct
9 Correct 1 ms 364 KB Output is correct
10 Correct 1 ms 364 KB Output is correct
11 Correct 2 ms 364 KB Output is correct
12 Correct 2 ms 384 KB Output is correct
13 Correct 2 ms 364 KB Output is correct
14 Correct 180 ms 3968 KB Output is correct
15 Correct 152 ms 3820 KB Output is correct
16 Correct 130 ms 4460 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2071 ms 76332 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2082 ms 98912 KB Time limit exceeded
2 Halted 0 ms 0 KB -