結果
問題 | No.2089 置換の符号 |
ユーザー |
![]() |
提出日時 | 2022-09-30 21:35:39 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 804 ms / 2,000 ms |
コード長 | 187 bytes |
コンパイル時間 | 298 ms |
コンパイル使用メモリ | 81,908 KB |
実行使用メモリ | 64,756 KB |
最終ジャッジ日時 | 2024-12-22 22:38:07 |
合計ジャッジ時間 | 6,434 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 33 |
ソースコード
N = int(input())A = list(map(int, input().split()))cnt = 0for i in range(N):for j in range(N):if i < j and A[i] > A[j]: cnt += 1if cnt%2 == 0: print(1)else: print(-1)