結果

問題 No.3481 495
コンテスト
ユーザー suu8038
提出日時 2026-03-27 21:56:40
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 1 ms / 2,000 ms
コード長 1,285 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 4,196 ms
コンパイル使用メモリ 374,472 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2026-03-27 21:57:03
合計ジャッジ時間 7,440 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#ifndef ONLINE_JUDGE
#define _GLIBCXX_DEBUG
#endif
#include "bits/stdc++.h"
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;
const ll inf = 2e18;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
using pll = pair<ll,ll>;
using vpl = vector<pll>;
using vvpl = vector<vector<pll>>;

#define rep(i,n) for(ll i = 0; i < n; ++i)
#define reps(i,n) for(ll i = 1; i <= n; ++i)
#define nfor(i,s,n) for(ll i = s; i <= n; ++i)
#define dfor(i,s,n) for(ll i = s; i >= n; --i)
#define YES cout << "Yes" << "\n"
#define NO cout << "No" << "\n"
#define nl "\n"
#define chmax(x,y) x = max(x,y)
#define chmin(x,y) x = min(x,y)
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define alls(x,n) (x).begin()+1,(x).begin()+n+1
#define dcout cout<<fixed<<setprecision(15)
vl dx = { 1,0,-1,0 };//vl dx={1,1,0,-1,-1,-1,0,1};
vl dy = { 0,1,0,-1 };//vl dy={0,1,1,1,0,-1,-1,-1};
bool is_out(ll i, ll j, ll h, ll w) { //trueならcontinue
   return (!(1 <= i && i <= h && 1 <= j && j <= w));
}

void solve() {
    string n;
    cin>>n;
    if((n[0])-'0'+n[2]==n[1])YES;
    else NO;
}

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    
    solve();
    
    return 0;
}
0