問題一覧 > 通常問題

No.991 N×Mマス計算(構築)

レベル : / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 26
作問者 : %20 / テスター : kotatsugame
お気に入りにしたユーザー ProblemId : 3924 / 自分の提出
問題文最終更新日: 2020-03-08 16:57:46
N×M Grid Calculation (Construction)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Show the original
yukicoder contest 237 (順位表) の他の問題:

Problem Statement

The $3$ problems N×M Grid Calculation (Sum), N×M Grid Calculation (K or More), and N×M Grid Calculation (Multiples of K) have exactly the same input format and constraints.
Among the possible inputs to these $3$ problems, construct $1$ input such that the answer is $X$ no matter which of these $3$ problems it is given to as input.

Input

$X$

The input satisfies the following constraints.

  • $0 \le X \lt 10^9$
  • $X$ is an integer

Output

Output in the following format.

$N$ $M$ $K$
$op$ $B_1$ $B_2$ $\cdots$ $B_M$
$A_1$
$A_2$
$\vdots$
$A_N$

The output must satisfy the following constraints.

  • $1\le N\le10^5$
  • $1\le M\le10^5$
  • $1\le K\le10^9$
  • $1\le A_i\le10^9$
  • $1\le B_j\le10^9$
  • $N,M,K,A_i,B_j$ are integers
  • $op$ is either + or *

Note that output such as the following will be judged WA.

  • The delimiters are different
  • There are extra spaces, such as at the beginning or end of a line
  • There is no newline at the end
  • There is extra output after the required output
  • It contains leading zeros, decimal points, or plus signs
  • It uses exponential notation
  • It is not in decimal notation

Sample

Sample 1
Input
0
Output
3 2 129
+ 12 34
10
20
30

The grid is filled in as follows.

$\begin{array}{c|c|} + & 12 & 34 \\\hline 10 & 22 & 44 \\\hline 20 & 32 & 54 \\\hline 30 & 42 & 64 \\\hline \end{array}$

If this output is used as the input to solve the $3$ problems, the answer is $0$ for all of them.

Sample 2
Input
1
Output
3 2 70
* 6 7
8
9
10

The grid is filled in as follows.

$\begin{array}{c|c|} * & 6 & 7 \\\hline 8 & 48 & 56 \\\hline 9 & 54 & 63 \\\hline 10 & 60 & 70 \\\hline \end{array}$

If this output is used as the input to solve the $3$ problems, the answer is $1$ for all of them.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。