結果
| 問題 | No.790 ちきんの括弧並べ |
| ユーザー |
|
| 提出日時 | 2022-05-06 19:17:11 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 288 bytes |
| 記録 | |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 85,720 KB |
| 実行使用メモリ | 88,552 KB |
| 最終ジャッジ日時 | 2026-03-27 05:45:58 |
| 合計ジャッジ時間 | 4,479 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 8 TLE * 1 -- * 1 |
ソースコード
n = int(input())
a = 0
for i in range(1 << 2 * n):
if bin(i).count("1") != n:
continue
s = 0
for j in range(2 * n):
if i >> j & 1:
s += 1
else:
s -= 1
if s < 0:
break
if s == 0:
a += 1
print(a)