結果
問題 |
No.1399 すごろくで世界旅行 (構築)
|
ユーザー |
![]() |
提出日時 | 2025-06-12 18:34:55 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 396 bytes |
コンパイル時間 | 167 ms |
コンパイル使用メモリ | 82,100 KB |
実行使用メモリ | 83,860 KB |
最終ジャッジ日時 | 2025-06-12 18:35:55 |
合計ジャッジ時間 | 24,098 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 9 WA * 9 RE * 4 |
ソースコード
V, D = map(int, input().split()) # Initialize adjacency matrix with all zeros E = [[0] * V for _ in range(V)] # Create a ring structure for i in range(V): j = (i + 1) % V E[i][j] = 1 E[j][i] = 1 # If V is even, add an additional edge to break bipartiteness if V % 2 == 0: E[0][2] = 1 E[2][0] = 1 # Print the adjacency matrix for row in E: print(''.join(map(str, row)))