// 実験:int 型でやってバグるパターンはあるのか? #include using namespace std; /////////////////// メイン /////////////////// int main () { //////////////////// 入力 //////////////////// int n; cin >> n; vector a(n); for (int i=0; i> a.at(i); } //////////////// 出力変数定義 //////////////// int result = 2e9; //////////////////// 処理 //////////////////// sort(a.begin(),a.end()); if (a.front()==a.back()) { result = 0; } else { for (int i=0; i