結果

問題 No.3103 Range Chmax and Maximize Abs Sum
ユーザー aguroshouaguroshou
提出日時 2023-03-31 23:20:50
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 1,431 ms
コンパイル使用メモリ 166,220 KB
実行使用メモリ 5,268 KB
最終ジャッジ日時 2023-10-24 09:52:08
合計ジャッジ時間 3,888 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 4 ms
5,268 KB
testcase_02 AC 3 ms
5,268 KB
testcase_03 WA -
testcase_04 AC 3 ms
5,268 KB
testcase_05 WA -
testcase_06 AC 3 ms
5,268 KB
testcase_07 AC 3 ms
5,268 KB
testcase_08 AC 3 ms
5,268 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 3 ms
5,268 KB
testcase_12 WA -
testcase_13 AC 3 ms
5,268 KB
testcase_14 AC 3 ms
5,268 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 85 ms
5,268 KB
testcase_19 AC 85 ms
5,268 KB
testcase_20 AC 85 ms
5,268 KB
testcase_21 AC 86 ms
5,268 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 86 ms
5,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long ll;

int main() {
	ll n, a[200005] = {};

	cin >> n;
	ll m = 0;
	for (ll i = 0; i < n; i++)
	{
		cin >> a[i];

		m = max(m, abs(a[i]));
	}

	cout << n * m << endl;
	return 0;
}
0