VioletaBabel

1453번 : 피시방 알바 본문

백준/백준-C++
1453번 : 피시방 알바
Beabletoet 2017. 9. 4. 17:07
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include<cstdio>
#include<algorithm>
int main()
{
    int n, a, ans = 0, c[100];
    std::fill_n(&c[0], 1001);
    for (scanf("%d"&n); n--;)
    {
        scanf("%d"&a);
        if (c[a - 1== 1)
            c[a - 1]--;
        else
            ++ans;
    }
    printf("%d", ans);
}
cs


'백준 > 백준-C++' 카테고리의 다른 글

2167번: 2차원 배열의 합  (0) 2017.09.04
2010번: 플러그  (0) 2017.09.04
1357번 : 뒤집힌 덧셈  (0) 2017.09.04
1292번: 쉽게 푸는 문제  (0) 2017.09.04
1159번: 농구 경기  (0) 2017.09.04
Comments