結果
| 問題 | No.3579 区間積逆像 |
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2026-07-03 21:38:01 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 634 bytes |
| 記録 | |
| コンパイル時間 | 174 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 96,000 KB |
| 最終ジャッジ日時 | 2026-07-03 21:38:07 |
| 合計ジャッジ時間 | 3,528 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 8 WA * 14 RE * 8 |
ソースコード
N,mod,C=map(int,input().split())
A=list(map(int,input().split()))
result=0
if C>0:
T={}
T[1]=1
x=1
for i in range(N):
a=A[i]
if a>0:
x*=a
x%=mod
y=C*pow(x,-1,mod)
y%=mod
if y in T:
result+=T[y]
if not x in T:
T[x]=1
else:
T[x]+=1
else:
T={}
T[1]=1
x=1
print(result)
else:
p=[1]
print(p[1])
pos=-1
result=0
for i in range(N):
if A[i]==0:
pos=i
result+=pos+1
print(result)
ゼット