포럼
문제 ICPC00283

K. Knot Knowledge

설명

Sonja the scout is taking a test to see if she knows all the knots a scout is supposed to know. The Scout's Big Book of Knots has descriptions of \(1\,000\) different knots, conveniently numbered from \(1\) to \(1\,000\). For the test, Sonja needs to learn a specific set of \(n\) of these knots. After some intense studying, she has learned all except one of them, but she has forgotten which knot she does not yet know.

Given the list of knots Sonja needs to learn, and the ones she has learned so far, find the remaining knot to learn.

제약
입력 형식

The first line of input consists of an integer \(n\) (\(2 \le n \le 50\)), the number of knots Sonja needs to learn. This is followed by a line containing \(n\) distinct integers \(x_1, \ldots, x_n\) (\(1 \le x_i \le 1\,000\)), the knots that Sonja needs to learn. Finally, the last line contains \(n-1\) distinct integers \(y_1, \ldots, y_{n-1}\) (\(1 \le y_i \le 1\,000\)), the knots that Sonja has learned so far. You may assume that each knot Sonja has learned is one of the \(n\) knots she was supposed to learn.

출력 형식

Output the number of the remaining knot that Sonja needs to learn.

예제 1
입력
4
1 2 4 3
4 2 3
출력
1
예제 2
입력
4
10 101 999 1
1 999 101
출력
10
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC NCPC 2021

평가 및 의견

K. Knot Knowledge

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

K. Knot Knowledge

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8