結果
| 問題 |
No.1399 すごろくで世界旅行 (構築)
|
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 16:30:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 362 bytes |
| コンパイル時間 | 281 ms |
| コンパイル使用メモリ | 82,316 KB |
| 実行使用メモリ | 83,940 KB |
| 最終ジャッジ日時 | 2025-06-12 16:31:04 |
| 合計ジャッジ時間 | 22,930 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 9 WA * 13 |
ソースコード
V, D = map(int, input().split())
# Initialize the adjacency matrix with all zeros
E = [[0 for _ in range(V)] for _ in range(V)]
# For each vertex i, connect to i-1 and i+1 mod V
for i in range(V):
prev = (i - 1) % V
next_ = (i + 1) % V
E[i][prev] = 1
E[i][next_] = 1
# Print the adjacency matrix
for row in E:
print(''.join(map(str, row)))
gew1fw