RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
문제 COCI00731

Wow

설명

While Mr. Malnar was traveling by bus to Graz, he noticed that other passengers
were looking at his phone and reading the messages he was sending to Patrik.
Mr. Malnar decided to put an end to this. Therefore, together with Patrik, he
developed a new way of encrypting their messages, which they call the VolksWagen
cipher.
The received message can be imagined as a table of characters with 2 rows and \(n\)
columns. Each letter spans all 2 rows and several columns, and they are separated
by spaces. The appearance of letters in the message can be seen in the sample test cases.
The letter ’v’ is represented as follows:
../
.\/.
The letter ’w’ is represented as follows:
../../
.\/..\/.
From now on, Patrik and Mr. Malnar will communicate exclusively using the letters ’v’ and ’w’ (without
quotes). However, Mr. Malnar is having trouble reading these messages. He has asked you to help him
decipher the message he received. Of course, he has not revealed to you how to decrypt their cipher.

제약
입력 형식

The first line contains a positive integer \(N\) (\(1 \le N \le 1000\)), the number of columns in the message.
In the next 2 rows, there are \(N\) characters each, representing one row of the message. It is guaranteed that
empty columns will be exactly between two different letters, and there will be exactly one empty column
between two letters. (\(An\) empty column is considered to be one that contains only the character ’.’.)

출력 형식

In a single line, print the letters that appear in the message in order.

서브태스크
서브태스크점수설명

1

21점

The message consists of a single letter.

2

13점

All letters in the message will be the same.

3

16점

No additional constraints.

예제 1
입력
32
\../.\../\../.\../.\../.\../\../
.\/...\/..\/...\/...\/...\/..\/.
출력
vwvvw
예제 2
입력
27
\../\../.\../\../.\../.\../
.\/..\/...\/..\/...\/...\/.
출력
wwvv
문제 정보

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

출처 COCI 2024/2025 Contest 5

평가 및 의견

Wow

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

Log in to rate problems.

개별 의견

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

풀이 제출

Wow

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