답안 #1063654

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1063654 2024-08-17T22:19:33 Z vjudge1 Baloni (COCI15_baloni) C++17
0 / 100
225 ms 3928 KB
#include <bits/stdc++.h>
using namespace std;

void solve(){
    int n; cin>>n;
    int xd[n];
    map <int,int> lol;
    for (int i=0;i<n;i++){
        cin>>xd[i];
        lol[xd[i]]++;
    }
    int ans=0;
    for (int i=0;i<n;i++){
        if(lol[xd[i]-1]==0) ans++;
        lol[xd[i]]--;
    }
    cout<<ans;
}


int main() {
    int t; t=1;
    while(t--){
        solve();
    }
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Incorrect 1 ms 348 KB Output isn't correct
3 Incorrect 1 ms 348 KB Output isn't correct
4 Incorrect 2 ms 348 KB Output isn't correct
5 Incorrect 225 ms 3636 KB Output isn't correct
6 Incorrect 217 ms 3928 KB Output isn't correct
7 Incorrect 199 ms 3160 KB Output isn't correct
8 Incorrect 165 ms 3296 KB Output isn't correct
9 Incorrect 196 ms 3416 KB Output isn't correct
10 Incorrect 193 ms 3416 KB Output isn't correct