結果
| 問題 |
No.1486 ロボット
|
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-04-20 08:28:12 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 23 ms / 2,000 ms |
| コード長 | 354 bytes |
| コンパイル時間 | 2,178 ms |
| コンパイル使用メモリ | 193,668 KB |
| 最終ジャッジ日時 | 2025-01-09 21:52:32 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
ソースコード
#include<bits/stdc++.h>
#define ALL(v) std::begin(v),std::end(v)
using lint=long long;
int main(){
lint a,b,c,d,e;std::cin>>a>>b>>c>>d>>e;
lint n=(a+b)*(c+d);
std::vector<lint>f(n);
for(lint i=0;i<n;i++)f.at(i)=(i%(a+b)<a)&&(i%(c+d)<c);
std::cout<<e/n*std::accumulate(ALL(f),0ll)+std::accumulate(f.begin(),f.begin()+e%n,0ll)<<'\n';
}
ngtkana