結果
| 問題 |
No.1883 SLASH
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-25 21:21:01 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 2,049 bytes |
| コンパイル時間 | 946 ms |
| コンパイル使用メモリ | 108,040 KB |
| 最終ジャッジ日時 | 2025-01-28 11:24:43 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
//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;
}