답안 #541839

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
541839 2022-03-24T14:15:02 Z Olympia Baloni (COCI15_baloni) C++17
0 / 100
53 ms 7252 KB
#include <vector>
#include <algorithm>
#include <iostream>
#include <set>
#include <cmath>
#include <map>
#include <random>
#include <cassert>
#include <ctime>
#include <cstdlib>
#include <limits.h>

using namespace std;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int N;
    cin >> N;
    vector<int64_t> v(N); for (int i = 0; i < N; i++) cin >> v[i];
    int cntr = 0;
    for (int i = 1; i < N; i++) {
        if (v[i] == v[i - 1] - 1) {
            cntr++;
        }
    }
    cout << cntr + 1;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Incorrect 0 ms 340 KB Output isn't correct
3 Incorrect 1 ms 340 KB Output isn't correct
4 Incorrect 1 ms 340 KB Output isn't correct
5 Incorrect 53 ms 6484 KB Output isn't correct
6 Incorrect 53 ms 7252 KB Output isn't correct
7 Incorrect 43 ms 5972 KB Output isn't correct
8 Incorrect 42 ms 5972 KB Output isn't correct
9 Incorrect 48 ms 6228 KB Output isn't correct
10 Incorrect 49 ms 6484 KB Output isn't correct