結果

問題 No.3262 水色コーダーさん、その問題d問題ですよ?(1<=d<=N)
ユーザー tkykwtnb
提出日時 2025-09-06 14:36:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 323 bytes
コンパイル時間 238 ms
コンパイル使用メモリ 82,816 KB
実行使用メモリ 59,944 KB
最終ジャッジ日時 2025-09-06 14:36:35
合計ジャッジ時間 2,406 ms
ジャッジサーバーID
(参考情報)
judge / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other WA * 24
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N=int(input())
LR=[]
D=[]
for _ in range(N):
    L,R=map(int,input().split())
    LR.append((L,R))
    D.append(L)
    D.append(R)
D.sort()
C=[0 for _ in range(len(D)-1)]
for L,R in LR:
    for i in range(D.index(L),D.index(R)):
        C[i]+=1
ans=0
for c in C:
    if c>=2:ans+=math.factorial(c)
print(ans+1)
0