問題一覧 > 通常問題

No.3192 Diameter Puzzle

レベル : / AI推定難易度 : 140 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 104
作問者 : noya2
お気に入りにしたユーザー ProblemId : 12420 / 自分の提出
問題文最終更新日: 2025-06-27 21:18:15
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. Back to the original
yukicoder contest 472 (順位表) の他の問題:

Note

This problem is an output-only problem (Output Only).

Problem Statement

Output one simple connected undirected graph that satisfies all of the following conditions.

  • The number of vertices is $100$, and the vertices are numbered $1,2,\dots ,100$.
  • The graph is simple.
    • It has no multiple edges and no self-loops.
  • The graph is connected.
  • For each $v=1,2,\dots ,100$, the maximum distance from vertex $v$ to any vertex is at least $50$.
    • The distance between vertex $x$ and vertex $y$ is the minimum number of edges contained in a path that starts at vertex $x$ and ends at vertex $y$.

Input


    

No input is given.

Output

Let $M$ be the number of edges of the graph, and for $i=1,2,\dots ,M$, let the $i$-th edge connect vertices $u_i,v_i$. Output in the following format.

$M$
$u_1$ $v_1$
$u_2$ $v_2$
$\vdots$
$u_M$ $v_M$

Sample

Sample 1
Input

            
Output
5
1 2
5 1
3 4
99 100
6 28

This sample shows an example of the output format and is not necessarily a correct answer.

The edges may be output in any order. Since $1\le u_i,v_i\le 100$ is satisfied, this output defines a graph. Furthermore, that graph is simple, but it is not connected.

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