結果

問題 No.3108 Luke or Bishop
コンテスト
ユーザー vjudge1
提出日時 2026-02-10 01:47:45
言語 C++23
(gcc 15.2.0 + boost 1.89.0)
結果
WA  
実行時間 -
コード長 1,605 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,265 ms
コンパイル使用メモリ 336,520 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2026-02-10 01:47:50
合計ジャッジ時間 4,660 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

//Bismillah
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define f(i, a, n) for (int i = a; i < n; i++)
#define fn(i,a,n) for (int i = n - 1; i >= a; i--)
#define pr(vec) {for(auto &value: vec) cout<<value<<" ";} nl;
#define iv(vec) for(auto &value: vec) cin>>value;
#define pb push_back
#define p(a) cout << a << "\n";
#define file_read(filepath) freopen(filepath, "r", stdin);
#define file_write(filepath) freopen(filepath, "w", stdout);
#define fr first
#define se second
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define uset unordered_set
#define mset unordered_multiset
#define vb vector<bool>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vc vector<char>
#define vs vector<string>
#define vpii vector<pair<int,int>>
#define MOD1 1000000007
#define mii map<int,int>
#define sz(a) a.size()
#define ld long double
#define ins insert
int rev(int a, int b) { return a > b; }
#define nl cout<<"\n";
#define ned ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);int t = 1;
int test  = 1;
const int N = 1e7 + 5;
vector<bool> is_prime(N, true);
void sieve() {is_prime[0] = is_prime[1] = false;for (int i = 2; i * i < N; i++) {if (is_prime[i]) {for (int j = i * i; j < N; j += i) {is_prime[j] = false;}}}}

int func(int v){
    return (v * v * v) - (v * v) + v + 1;

}
void solve(){

    int a, b; cin>>a>>b;
    if( (abs(a) == abs(b)) || (a == 0) || (b == 0) ){
        p(1);
    } else{
        p(2);
    }
}

signed main(){
    ned;
    // cin>>t;
    // sieve();
    while(t--)
    {
        solve();
    }
    return 0;
}

// 4,5
// 
0