結果
問題 | No.3065 Speedrun (Normal) |
ユーザー |
|
提出日時 | 2025-03-21 22:43:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 422 bytes |
コンパイル時間 | 1,866 ms |
コンパイル使用メモリ | 192,860 KB |
実行使用メモリ | 7,328 KB |
最終ジャッジ日時 | 2025-03-21 22:43:57 |
合計ジャッジ時間 | 2,854 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 WA * 7 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll=long long; #include<atcoder/modint> using namespace atcoder; using mint=modint998244353; int main(){ cin.tie(nullptr); ios::sync_with_stdio(false); ll A[4],P[4]; for(int i=0;i<4;i++)cin>>A[i]; for(int i=0;i<4;i++)cin>>P[i]; ll T; cin>>T; ll S=0; ll an=0; for(int i=0;i<4;i++){ ll D=min(A[i],(T-S)/P[i]); an+=D; S+=P[i]*D; } cout<<an<<endl; }