提出 #34920666


ソースコード 拡げる

#include <bits/stdc++.h>
#define M_PI 3.14159265358979323846
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
const ll LINF = 1e18;
using namespace std;

class RangeMax {
public:
    int size_ = 1;
    vector<long long> dat;

    void init(int sz) {
        while (size_ <= sz) size_ *= 2;
        dat.resize(size_ * 2, -(1LL << 60));
    }
    void update(int pos, long long x) {
        pos += size_;
        dat[pos] = x;
        while (pos >= 2) {
            pos >>= 1;
            dat[pos] = max(dat[pos * 2], dat[pos * 2 + 1]);
        }
    }
    long long query_(int l, int r, int a, int b, int u) {
        if (l <= a && b <= r) return dat[u];
        if (r <= a || b <= l) return -(1LL << 60);
        long long v1 = query_(l, r, a, (a + b) >> 1, u * 2);
        long long v2 = query_(l, r, (a + b) >> 1, b, u * 2 + 1);
        return max(v1, v2);
    }
    long long query(int l, int r) {
        return query_(l, r, 0, size_, 1);
    }
};



int main() {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    cout << (a + b) * (c - d) << endl;
    cout << "Takahashi" << endl;
    return 0;
}

提出情報

提出日時
問題 A - Anyway Takahashi
ユーザ amaoto
言語 C++ (GCC 9.2.1)
得点 100
コード長 1168 Byte
結果 AC
実行時間 6 ms
メモリ 3576 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 100 / 100
結果
AC × 3
AC × 10
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_00.txt, 01_random_01.txt, 01_random_02.txt, 01_random_03.txt, 01_random_04.txt, 02_zero_00.txt, 02_zero_01.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 6 ms 3496 KiB
00_sample_01.txt AC 3 ms 3348 KiB
00_sample_02.txt AC 2 ms 3464 KiB
01_random_00.txt AC 2 ms 3408 KiB
01_random_01.txt AC 3 ms 3516 KiB
01_random_02.txt AC 2 ms 3576 KiB
01_random_03.txt AC 2 ms 3400 KiB
01_random_04.txt AC 2 ms 3508 KiB
02_zero_00.txt AC 2 ms 3512 KiB
02_zero_01.txt AC 3 ms 3416 KiB