結果

問題 No.1201 お菓子配り-4
ユーザー rlangevinrlangevin
提出日時 2023-10-26 23:32:51
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2,882 ms / 4,000 ms
コード長 528 bytes
コンパイル時間 5,338 ms
コンパイル使用メモリ 308,504 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-26 23:33:14
合計ジャッジ時間 22,446 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
4,348 KB
testcase_01 AC 615 ms
4,348 KB
testcase_02 AC 872 ms
4,348 KB
testcase_03 AC 410 ms
4,348 KB
testcase_04 AC 201 ms
4,348 KB
testcase_05 AC 509 ms
4,348 KB
testcase_06 AC 77 ms
4,348 KB
testcase_07 AC 223 ms
4,348 KB
testcase_08 AC 628 ms
4,348 KB
testcase_09 AC 496 ms
4,348 KB
testcase_10 AC 6 ms
4,348 KB
testcase_11 AC 121 ms
4,348 KB
testcase_12 AC 1,001 ms
4,348 KB
testcase_13 AC 28 ms
4,348 KB
testcase_14 AC 15 ms
4,348 KB
testcase_15 AC 755 ms
4,348 KB
testcase_16 AC 254 ms
4,348 KB
testcase_17 AC 306 ms
4,348 KB
testcase_18 AC 51 ms
4,348 KB
testcase_19 AC 48 ms
4,348 KB
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 1 ms
4,348 KB
testcase_22 AC 1 ms
4,348 KB
testcase_23 AC 2 ms
4,348 KB
testcase_24 AC 2 ms
4,348 KB
testcase_25 AC 2 ms
4,348 KB
testcase_26 AC 2 ms
4,348 KB
testcase_27 AC 2 ms
4,348 KB
testcase_28 AC 2 ms
4,348 KB
testcase_29 AC 2 ms
4,348 KB
testcase_30 AC 1,241 ms
4,348 KB
testcase_31 AC 1,256 ms
4,348 KB
testcase_32 AC 1,240 ms
4,348 KB
testcase_33 AC 1,239 ms
4,348 KB
testcase_34 AC 1,236 ms
4,348 KB
testcase_35 AC 2,882 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using P = pair<int, int>;
using mint = modint1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main()
{
    int N, M;
    cin >> N >> M;
    vector<int> A(N), B(M);
    rep(i, N) cin >> A[i];
    rep(i, M) cin >> B[i];
    mint ans = 0;
    rep(i, N)
    {
        rep(j, M)
        {
            ans += floor_sum(B[j] + 1, B[j], A[i], 0) * 2;
        }
    }
    cout << ans.val() << endl;
}
0