| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 5 초 | 1024 MB | 66 | 28 | 19 | 52.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.
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.
0 000...000
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
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
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번