結果
問題 | No.2208 Linear Function |
ユーザー |
![]() |
提出日時 | 2023-02-10 21:22:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 369 bytes |
コンパイル時間 | 2,535 ms |
コンパイル使用メモリ | 214,560 KB |
最終ジャッジ日時 | 2025-02-10 12:05:32 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 3 |
ソースコード
#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();}}