답안 #899484

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
899484 2024-01-06T09:38:42 Z joccccca Baloni (COCI15_baloni) C++14
0 / 100
129 ms 15700 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;

int b[1000001];
int cnt[1000001];

signed main()
{
    int n;
    cin >> n;
    int a[n];
    for(int i=0; i < n; i++)cin>>a[i];

    for(int i=n-1; i >= 0;i--){
            cnt[a[i]]++;
                    b[i]=cnt[a[i]-1];
    }

    int rez=0;

    for(int i=0; i < n; i++){
        if(b[i]==0)rez++;
    }
    cout<<rez<<"\n";
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 2392 KB Output isn't correct
2 Incorrect 1 ms 2396 KB Output isn't correct
3 Incorrect 1 ms 2396 KB Output isn't correct
4 Incorrect 1 ms 2396 KB Output isn't correct
5 Incorrect 127 ms 14792 KB Output isn't correct
6 Incorrect 129 ms 15700 KB Output isn't correct
7 Incorrect 106 ms 14324 KB Output isn't correct
8 Incorrect 117 ms 14160 KB Output isn't correct
9 Incorrect 116 ms 14568 KB Output isn't correct
10 Incorrect 115 ms 14672 KB Output isn't correct