結果

問題 No.133 カードゲーム
ユーザー ゆるくゆるく
提出日時 2015-01-22 23:39:41
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 511 bytes
コンパイル時間 123 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,904 KB
最終ジャッジ日時 2024-04-16 09:55:10
合計ジャッジ時間 2,026 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
11,776 KB
testcase_01 AC 38 ms
11,776 KB
testcase_02 AC 38 ms
11,776 KB
testcase_03 AC 37 ms
11,776 KB
testcase_04 AC 38 ms
11,648 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 38 ms
11,648 KB
testcase_09 AC 37 ms
11,648 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 37 ms
11,776 KB
testcase_14 AC 37 ms
11,776 KB
testcase_15 AC 37 ms
11,648 KB
testcase_16 WA -
testcase_17 AC 37 ms
11,776 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

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