結果
| 問題 | No.694 square1001 and Permutation 3 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-09 00:16:07 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 398 bytes |
| 記録 | |
| コンパイル時間 | 430 ms |
| コンパイル使用メモリ | 85,540 KB |
| 実行使用メモリ | 388,620 KB |
| 最終ジャッジ日時 | 2026-03-20 10:48:46 |
| 合計ジャッジ時間 | 26,786 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | MLE * 1 |
| other | AC * 2 TLE * 6 MLE * 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()