結果
問題 |
No.8103 Range Chmax and Maximize Abs Sum
|
ユーザー |
![]() |
提出日時 | 2023-03-31 23:20:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 319 bytes |
コンパイル時間 | 1,742 ms |
コンパイル使用メモリ | 167,228 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-23 02:24:53 |
合計ジャッジ時間 | 3,562 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 |
other | AC * 14 WA * 10 |
ソースコード
#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; }