結果
| 問題 |
No.2208 Linear Function
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-10 21:21:41 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 733 bytes |
| コンパイル時間 | 1,092 ms |
| コンパイル使用メモリ | 123,884 KB |
| 最終ジャッジ日時 | 2025-02-10 12:03:57 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 |
ソースコード
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <unordered_map>
#include <unordered_set>
void solve() {
int t;
std::cin >> t;
while (t--) {
int l, r, a, b;
std::cin >> l >> r >> a >> b;
long long ans = 0;
ans = std::max(l * a + b, r * a + b);
std::cout << ans << '\n';
}
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
int t = 1;
// std::cin >> t;
while (t--) solve();
return 0;
}