結果
| 問題 | No.3433 [Cherry 8th Tune A] ADD OIL! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-01-23 21:22:45 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 414 bytes |
| 記録 | |
| コンパイル時間 | 3,456 ms |
| コンパイル使用メモリ | 343,088 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-23 21:23:21 |
| 合計ジャッジ時間 | 4,079 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main(){
int t;
cin >> t;
while(t--){
int n,k;
cin >> n >> k;
vector<ll>a(n);
rep(i,n)cin >> a[i];
sort(a.begin(),a.end());
a[0]-=k;
ll ans=1;
rep(i,n)ans*=a[i];
cout << ans << endl;
}
return 0;
}