結果
| 問題 | No.3433 [Cherry 8th Tune A] ADD OIL! |
| コンテスト | |
| ユーザー |
UT0911
|
| 提出日時 | 2026-01-23 21:57:30 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,416 bytes |
| 記録 | |
| コンパイル時間 | 2,561 ms |
| コンパイル使用メモリ | 220,760 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2026-01-23 21:57:44 |
| 合計ジャッジ時間 | 2,718 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 |
コンパイルメッセージ
main.cpp:33:16: 警告: use of ‘auto’ in parameter declaration only available with ‘-std=c++20’ or ‘-fconcepts’ [-Wc++20-extensions]
33 | bool CheckTime(auto limit,auto eps){
| ^~~~
main.cpp:33:27: 警告: use of ‘auto’ in parameter declaration only available with ‘-std=c++20’ or ‘-fconcepts’ [-Wc++20-extensions]
33 | bool CheckTime(auto limit,auto eps){
| ^~~~
ソースコード
#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using vii = vector<vector<int>>;
using vll = vector<vector<ll>>;
#define ALL(x) (x).begin(), (x).end()
#define coutY cout << "Yes" << endl;
#define coutN cout << "No" << endl;
#define arrIn(arr, start, N) for (ll i = (start); i < (N); ++i) cin >> arr[i];
#define arrOut(arr, start, N) for (ll i = (start); i < (N); ++i) { cout << arr[i] <<" "; } cout << endl;
#define mod9 998244353
#define mod1 1000000007
void yn(bool tf) { cout << (tf ? "Yes\n" : "No\n"); }
void YN(bool tf) { cout << (tf ? "YES\n" : "NO\n"); }
string ABC="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
string abc="abcdefghijklmnopqrstuvwxyz";
//cout << fixed << setprecision(20) <<
bool kaibun(string S){
string T=S;
reverse(ALL(S));
return S==T;
}
auto start = high_resolution_clock::now();
bool CheckTime(auto limit,auto eps){
auto end = high_resolution_clock::now();
return duration_cast<milliseconds>(end - start).count()<limit-eps;
}
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
ll T;
cin >> T;
for(ll i=0;i<T;i++){
ll N,K;
cin >> N >> K;
vl A(N);
arrIn(A,0,N);
sort(ALL(A));
ll ans=A[0]-K;
for(ll j=1;j<N;j++){
ans*=A[j];
}
cout << ans << endl;
}
return 0;
}
UT0911