結果
| 問題 |
No.790 ちきんの括弧並べ
|
| ユーザー |
|
| 提出日時 | 2019-06-30 13:44:14 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 347 bytes |
| コンパイル時間 | 82 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 17,700 KB |
| 最終ジャッジ日時 | 2024-07-05 23:09:45 |
| 合計ジャッジ時間 | 7,081 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 3 |
| other | AC * 7 TLE * 2 -- * 1 |
ソースコード
N = int(input())
ans = 0
for i in range(2 ** (2*N)):
left = 0
right = 0
bit = bin(i)
flg = 0
for j in range(N * 2):
if (i >> j) & 1:
left += 1
else:
right += 1
if left < right:
flg = 1
break
if flg == 0 and left == right:
ans += 1
print(ans)