結果

問題 No.3066 Collecting Coins Speedrun 1
ユーザー nouka28
提出日時 2025-03-21 21:34:23
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 49 ms / 2,000 ms
コード長 385 bytes
コンパイル時間 5,849 ms
コンパイル使用メモリ 334,252 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2025-03-21 21:34:31
合計ジャッジ時間 7,536 ms
ジャッジサーバーID
(参考情報)
judge7 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;

#include<atcoder/all>
using namespace atcoder;
using mint=atcoder::modint998244353;

#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")

#define int long long

signed main(){
	int N;cin>>N;
	vector<int> C(N);for(auto&&e:C)cin>>e;
	C.push_back(0);
	sort(C.begin(),C.end());
	int mn=C[0],mx=C.back();

	cout<<(mx-mn)*2<<endl;
}
0