結果
| 問題 |
No.694 square1001 and Permutation 3
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-09 00:11:44 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 398 bytes |
| コンパイル時間 | 675 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 17,952 KB |
| 最終ジャッジ日時 | 2024-06-30 11:35:25 |
| 合計ジャッジ時間 | 19,043 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 1 |
| other | AC * 3 TLE * 5 -- * 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()