結果
問題 | No.2208 Linear Function |
ユーザー |
![]() |
提出日時 | 2023-02-15 03:35:29 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 2,044 ms |
コンパイル使用メモリ | 192,172 KB |
最終ジャッジ日時 | 2025-02-10 15:33:15 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 3 |
ソースコード
#include <bits/stdc++.h>int read() {int x = 0, f = 1;char c = getchar();while (c < '0' || c > '9') { if (c == '-') f = -1; c = getchar(); }while (c >= '0' && c <= '9') { x = x * 10 + c - '0'; c = getchar(); }return x * f;}int main() {for (int t = read(); t; t--) {int l = read(), r = read(), a = read(), b = read();std::cout << std::max(a * l + b, a * r + b) << "\n";}return 0;}