結果

問題 No.1883 SLASH
ユーザー CleyLCleyL
提出日時 2022-03-25 21:21:01
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 2,049 bytes
コンパイル時間 1,016 ms
コンパイル使用メモリ 108,708 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-22 05:53:36
合計ジャッジ時間 1,636 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//coder:luckYrat(twitter:@luckYrat_)
//おすすめの曲 無機質世界に彩を-MisomyL
//https://www.youtube.com/watch?v=8G590EiLQ3E

//標準入出力
#include <iostream>

#include <cmath>
#include <algorithm>

#include <iomanip>

//コンテナ系
#include <string>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>

#include <bitset>

//複素数
#include <complex>

#include <cctype>
#include <utility>
#include <climits>

#include <numeric>

//なまえくーかん!
using namespace std;
using ll = long long;
using P = pair<ll,ll>;

//てーすう!
const ll MOD = 1000000007;
const ll MOD9 = 998244353;
const int inf = (1<<30)-1;
const ll linf = (1LL<<62LL)-1;
const double EPS = (1e-10);

//でふぁいん!
#define anyfill(n,s) setw(n) << setfill(s)
#define loop(s) for(int (i) = 0; (s) > (i); (i)++)
#define rep(i,q) for(int (i) = 0; (q) > (i); (i)++)
#define repp(i,n,q) for(int (i) = (n); (q) > (i); (i)++)
#define dep(i,q) for(int (i) = (q); 0 < (i); (i)--)

//みじかく!
#define pb push_back
#define mkp make_pair
#define fir first
#define scn second

//きんぼーnほーこー!!
P ar4[4] = {mkp(0,1),mkp(0,-1),mkp(1,0),mkp(-1,0)};
P ar8[8] = {mkp(-1,-1),mkp(-1,0),mkp(-1,1),mkp(0,-1),mkp(0,1),mkp(1,-1),mkp(1,0),mkp(1,1)};


template <typename T> vector<T> make_vector(size_t a, T b) { return vector<T>(a, b); }
template <typename... Ts> auto make_vector(size_t a, Ts... ts) { return vector<decltype(make_vector(ts...))>(a, make_vector(ts...)); }
 
 /*
確認ポイント
cout << fixed << setprecision(n) << 小数計算//n桁の小数表記になる

計算量は変わらないが楽できるシリーズ
min(max)_element(iter,iter)で一番小さい(大きい)値のポインタが帰ってくる
count(iter,iter,int)でintがiterからiterの間にいくつあったかを取得できる
*/
__attribute__((constructor))
void initial() {
 cin.tie(0);
 ios::sync_with_stdio(false);
}

int main(){
  string s;cin>>s;
  cout << max({s[0],s[1],s[2]})-min({s[0],s[1],s[2]}) << endl;
}
0