結果
| 問題 |
No.3288 Sloppy Land Grading
|
| コンテスト | |
| ユーザー |
ゼリトキ
|
| 提出日時 | 2025-10-03 22:37:19 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 62 ms / 2,000 ms |
| コード長 | 542 bytes |
| コンパイル時間 | 2,897 ms |
| コンパイル使用メモリ | 275,692 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-03 22:37:24 |
| 合計ジャッジ時間 | 5,278 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const long long mod=998244353;
const long long mod100=1000000007;
int main(){
cin.tie(0)->sync_with_stdio(0);
cout.tie(0);
int T;
cin>>T;
for(int q=1;q<=T;q++){
ll A,B,C,x,y,z;
cin>>A>>B>>C>>x>>y>>z;
ll ans=2e18;
ans=min(ans,abs(A-B)*y+abs(A-C)*z);
ans=min(ans,abs(B-A)*x+abs(B-C)*z);
ans=min(ans,abs(C-A)*x+abs(C-B)*y);
cout<<ans<<"\n";
}
}
ゼリトキ