結果

問題 No.1139 Slime Race
ユーザー GeckoちゃんGeckoちゃん
提出日時 2020-08-17 09:53:09
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 572 bytes
コンパイル時間 668 ms
コンパイル使用メモリ 71,160 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-04-19 18:41:37
合計ジャッジ時間 5,093 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
10,624 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 RE -
testcase_04 WA -
testcase_05 RE -
testcase_06 RE -
testcase_07 AC 2 ms
5,376 KB
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
#include <set>
#include <string>
using namespace std;
using ll = long long;

int main() {
        ll N,D;
        cin >> N; cin >> D;
        ll xs[N] = {};
        ll vs[N] = {};

        ll total_v = 0;
        for(ll i=1;i<=N;i++) 
          cin >> xs[i];
        for(ll i=1;i<=N;i++) { 
          cin >> vs[i]; 
          total_v += vs[i];
        }
  

        double a = double(D)/total_v;
        if(a == ll(a)) {
          cout << ll(a) << endl;
        } else {
          cout << ll(a)+1 << endl;
        }
        return 0;
}
0