結果
| 問題 | No.3851 Dreams |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-12-04 23:00:01 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 701 ms / 2,000 ms |
| + 764µs | |
| コード長 | 702 bytes |
| 記録 | |
| コンパイル時間 | 4,871 ms |
| コンパイル使用メモリ | 385,872 KB |
| 実行使用メモリ | 9,904 KB |
| 最終ジャッジ日時 | 2026-12-04 23:00:19 |
| 合計ジャッジ時間 | 17,246 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#if __has_include("all.hpp")
#include "all.hpp"
#else
#include <atcoder/all>
#endif
using namespace atcoder;
using mint=modint998244353;
int main(void){
int n,m;
cin>>n>>m;
vector<array<long long,4>>v(n);
for(int i=0;i<n;i++)cin>>v[i][1]>>v[i][2]>>v[i][3]>>v[i][0];
sort(v.rbegin(),v.rend());
mint ans=0;
while(m--){
long long t;
cin>>t;
mint p=1;
for(auto [s, x, y,p2] : v){
long long tmp=t/x-max(0LL,t-y)/x;
mint tp=p*(1-((mint)(100-p2)/100).pow(tmp));
ans+=s*tp;
p-=tp;
}
ans+=p;
}
cout<<ans.val()<<endl;
return 0;
}