結果
| 問題 | No.3649 Top View of Jenga |
| コンテスト | |
| ユーザー |
まぬお
|
| 提出日時 | 2026-08-28 21:26:00 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 86 ms / 2,000 ms |
| + 602µs | |
| コード長 | 722 bytes |
| 記録 | |
| コンパイル時間 | 294 ms |
| コンパイル使用メモリ | 96,492 KB |
| 実行使用メモリ | 79,616 KB |
| 最終ジャッジ日時 | 2026-08-28 21:27:22 |
| 合計ジャッジ時間 | 3,658 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 20 |
ソースコード
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right, insort
from itertools import permutations, combinations, groupby
from heapq import heappop, heappush
import math, sys
input = lambda: sys.stdin.readline().rstrip("\r\n")
def printl(li, sep=" "): print(sep.join(map(str, li)))
def yn(flag): print(Yes if flag else No)
_int = lambda x: int(x)-1
MOD = 998244353 #10**9+7
INF = 1<<60
Yes, No = "Yes", "No"
N = int(input())
d, r = N//3, N%3
ans = [[d]*3 for _ in range(3)]
if d&1:
for i in range(r):
for j in range(3):
ans[i][j] += 1
else:
for i in range(r):
for j in range(3):
ans[j][i] += 1
for i in range(3):
printl(ans[i])
まぬお