結果
問題 | No.2208 Linear Function |
ユーザー |
![]() |
提出日時 | 2023-05-06 23:20:37 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 270 bytes |
コンパイル時間 | 2,108 ms |
コンパイル使用メモリ | 157,476 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-24 03:45:38 |
合計ジャッジ時間 | 1,982 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 3 |
ソースコード
#include <bits/stdc++.h>using namespace std;int f(int a, int b, int x) {return a*x + b;}int main() {int t;cin >> t;for (int i = 0; i < t; i++) {int l, r, a, b;cin >> l >> r >> a >> b;cout << max(f(a, b, l), f(a, b, r)) << endl;}return 0;}