結果
| 問題 | No.133 カードゲーム |
| コンテスト | |
| ユーザー |
nohtaray
|
| 提出日時 | 2019-07-05 19:57:57 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 830 bytes |
| 記録 | |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 20,700 KB |
| 実行使用メモリ | 21,596 KB |
| 最終ジャッジ日時 | 2026-04-10 10:18:38 |
| 合計ジャッジ時間 | 6,926 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 4 |
| other | RE * 19 |
ソースコード
import bisect
import heapq
import itertools
import math
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter
import numpy as np
if os.getenv("LOCAL"):
sys.stdin = open("_in.txt", "r")
sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))
B = list(map(int, sys.stdin.readline().split()))
A = np.array(A)
B = np.array(B)
cnt = 0
s = 0
for a, b in itertools.product(itertools.permutations(range(N)), repeat=2):
a = A[np.array(a)]
b = B[np.array(b)]
cnt += (a > b).sum() > N / 2
s += 1
print(cnt / s)
nohtaray