結果

問題 No.2208 Linear Function
ユーザー ripityripity
提出日時 2023-02-10 21:22:27
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 369 bytes
コンパイル時間 2,999 ms
コンパイル使用メモリ 211,900 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-21 22:22:14
合計ジャッジ時間 3,624 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 3 ms
4,376 KB
testcase_02 AC 3 ms
4,380 KB
testcase_03 AC 3 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
void solve() {
    int L, R, A, B;
    cin >> L >> R >> A >> B;
    cout << max(A*L+B, A*R+B) << endl;
}
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int t;
    cin >> t;
    while(t--) {
        solve();
    }
}
0