Notice
Recent Posts
Recent Comments
Link
«   2025/09   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Archives
Today
Total
관리 메뉴

히히

5431. 민석이의 과제 체크 본문

study/SWEP

5431. 민석이의 과제 체크

noun. 2018. 11. 18. 02:59

https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWVl3rWKDBYDFAXm


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <iostream>
using namespace std;
 
int main() {
    int test_case;
    int T;
    cin >> T;
 
    for (test_case = 1; test_case <= T; ++test_case) {
        int people, hw;
        cin >> people >> hw;
 
        int hwvec[100= { 0, };
        for (int i = 0; i < hw; i++) {
            int inputhw;
            cin >> inputhw;
            hwvec[inputhw] = 1;
        }
 
        cout << "#" << test_case << " ";
 
        for (int i = 1; i <= people; i++) {
            if (hwvec[i] == 0) {
                cout << i << " ";
            }
        }
        cout << endl;
    }
    return 0;
}



'study > SWEP' 카테고리의 다른 글

4406. 모음이 보이지 않는 사람  (0) 2018.11.20
5789. 현주의 상자 바꾸기  (0) 2018.11.19
5549. 홀수일까 짝수일까  (0) 2018.11.19
4299. 태혁이의 사랑은 타이밍  (0) 2018.11.19
1206. View  (0) 2018.11.18
Comments