Logo
(追記) (追記ここまで)

34660번 - Misdeed -la bonté de Dieu et l'origine du mal- 다국어투 스텝

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 1024 MB66281952.778%

문제

This is a two-step problem.

Tairitsu and Chunipenguin join forces to overcome the Trial of Karma. The Trial of Karma is structured as follows.

  1. Tairitsu receives a binary sequence $S$ of length 196ドル$. Subsequently, Tairitsu constructs a 13ドル\times 13$ matrix $A$ where each element is between 0ドル$ and 15ドル$.
  2. The Trial of Karma involves selecting positive integers 1ドル \le r_1 < r_2 < \ldots < r_7 \le 13$ and 1ドル \le c_1 < c_2 < \ldots < c_7 \le 13$. Then create a 7ドル\times 7$ matrix $B$ such that the $i$th row and $j$th column of $B$ is $A_{r_i,c_j}$. Chunipenguin is given this matrix $B$ and the values $r_1, r_2, \ldots, r_7, c_1, c_2, \ldots, c_7$.
  3. Chunipenguin must determine $S$ by examining $B$.

Let's help Tairitsu and Chunipenguin overcome the trials of karma!

입력

The first line contains an integer $t$ that is either 0ドル$ or 1ドル$. If $t=0,ドル it means you must execute Tairitsu's strategy; if $t=1,ドル it means you must execute Chunipenguin's strategy.

If $t=0,ドル the next line contains 196ドル$ integers, either 0ドル$ or 1ドル,ドル given without spaces. This represents the binary sequence $S$ received by Tairitsu.

If $t=1,ドル a total of 7ドル$ positive integers are given over two lines. The $i$th integer on the first line is $r_i,ドル and the $i$th integer on the second line is $c_i$.

Subsequently, over the next 7ドル$ lines, 7ドル$ integers are given per line, separated by spaces. The $j$th element on the $i$th line represents $B_{ij}$.

출력

If $t=0,ドル the program must output a total of 13ドル$ lines, each containing 13ドル$ numbers separated by spaces, where the $j$th element on the $i$th line represents $A_{ij}$.

If $t=1,ドル the program must output a total of 196ドル$ integers, either 0ドル$ or 1ドル,ドル on a single line without spaces. This must be the binary sequence $S$ that Tairitsu initially received.

제한

예제 입력 1

0
000...000

예제 출력 1

0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0

예제 입력 2

1
1 2 3 4 5 6 7
1 2 3 4 5 6 7
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0

예제 출력 2

000...000

노트

출처

University > KAIST > KAIST ICPC Mock Competition > 2025 KAIST 15th ICPC Mock Competition M번

University > MIT > The MIT Programming Contest > 2025-26 > MIT Team Contest 2 M번

채점 및 기타 정보

  • 예제는 채점하지 않는다.
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /