結果

問題 No.133 カードゲーム
ユーザー ゆるく
提出日時 2015-01-22 23:39:41
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 511 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 12,032 KB
最終ジャッジ日時 2024-10-07 02:35:32
合計ジャッジ時間 2,082 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 7 WA * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#sys.setrecursionlimit(n)
import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

aa = list(itertools.permutations(a))
bb = list(itertools.permutations(b))

win_count = 0
for ta in aa:
  for tb in bb:
    if ta[0] > tb[0] and ta[1] > tb[1]:
      win_count += 1
print(win_count / (len(aa) * 2))
0