結果
| 問題 |
No.694 square1001 and Permutation 3
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-09 00:16:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 398 bytes |
| コンパイル時間 | 418 ms |
| コンパイル使用メモリ | 82,152 KB |
| 実行使用メモリ | 181,988 KB |
| 最終ジャッジ日時 | 2024-06-30 11:41:14 |
| 合計ジャッジ時間 | 8,049 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 1 |
| other | AC * 7 TLE * 1 -- * 5 |
ソースコード
from collections import deque
from sys import stdin
def main():
N = int(input())
A = stdin.read().splitlines()
A = list(map(int, A))
a = deque(A)
for _ in range(N):
print(program(list(a), N))
a.rotate(-1)
def program(a, n):
cnt = 0
for i in range(1, n):
for j in a[:i]:
if j > a[i]:
cnt += 1
return cnt
main()