結果
| 問題 |
No.2208 Linear Function
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-02-10 22:50:50 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 353 bytes |
| コンパイル時間 | 1,381 ms |
| コンパイル使用メモリ | 167,156 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-07 16:55:00 |
| 合計ジャッジ時間 | 1,702 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
#define REP(i,n) for(int i=0;i<int(n);i++)
int main(void){
cin.tie(nullptr); ios_base::sync_with_stdio(false);
int i,j,k;
int T;
cin >> T;
REP(tc,T){
int L,R,A,B;
cin >> L >> R >> A >> B;
cout << max(A*L+B,A*R+B) << endl;
}
return 0;
}