結果
| 問題 |
No.3163 [Cherry 7th Tune N] Draft
|
| コンテスト | |
| ユーザー |
テナガザル
|
| 提出日時 | 2025-05-30 21:23:19 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 349 bytes |
| コンパイル時間 | 1,050 ms |
| コンパイル使用メモリ | 97,232 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-05-30 21:23:21 |
| 合計ジャッジ時間 | 1,457 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 |
ソースコード
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
void solve()
{
int a[5];
for (int i = 0; i < 5; ++i) cin >> a[i];
int ma = 0, mi = 1e9;
for (int i = 0; i < 5; ++i)
{
ma = max(ma, a[i]);
mi = min(mi, a[i]);
}
cout << ma - mi << endl;
}
int main()
{
int t;
cin >> t;
while (t--) solve();
}
テナガザル