結果
| 問題 |
No.3066 Collecting Coins Speedrun 1
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-03-21 21:55:51 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 387 bytes |
| コンパイル時間 | 2,019 ms |
| コンパイル使用メモリ | 198,916 KB |
| 実行使用メモリ | 7,328 KB |
| 最終ジャッジ日時 | 2025-03-21 21:55:55 |
| 合計ジャッジ時間 | 3,881 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 28 WA * 4 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
long long int n;
cin >> n;
vector<int> q;
for(long long int i = 0; i<n; i++){
long long int a;
cin >>a;
q.push_back(a);
}
sort(q.begin(), q.end());
long long int mini = min(q[0],0);
mini = abs(mini);
cout << 2*(mini + q[n-1]) << endl;
// your code goes here
}