結果
| 問題 |
No.1635 Let’s Sort Integers!!
|
| コンテスト | |
| ユーザー |
とりゐ
|
| 提出日時 | 2021-07-02 14:55:12 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 265 bytes |
| コンパイル時間 | 940 ms |
| コンパイル使用メモリ | 82,072 KB |
| 実行使用メモリ | 82,840 KB |
| 最終ジャッジ日時 | 2024-09-15 21:21:24 |
| 合計ジャッジ時間 | 7,094 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | TLE * 1 -- * 76 |
ソースコード
#全探索
#ジャッジコードチェック
import itertools
n,k=map(int,input().split())
all=itertools.permutations([i+1 for i in range(n)],n)
for x in all:
cnt=0
for i in range(n-1):
cnt+=abs(x[i]-x[i+1])
if cnt==k:
print(*x)
exit()
print(-1)
とりゐ