結果

問題 No.208 王将
ユーザー kosakkun
提出日時 2016-11-08 17:29:43
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 1,000 ms
コード長 917 bytes
コンパイル時間 767 ms
コンパイル使用メモリ 93,084 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-25 04:53:22
合計ジャッジ時間 1,335 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <iomanip>
#include <deque>
#include <list>
#include <stdio.h>
using namespace std;

#define REP(i,n) for(long long (i)=0;(i)<(long long)(n);(i)++)
#define RREP(i,n) for(long long (i)=(long long)(n)-1;i>=0;i--)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())

typedef long long ll;

int main(){
    
    ll x,y,x2,y2;
    cin>>x>>y>>x2>>y2;
    
    if((x2<0||x2>x)&&(y2<0||y2>y)){
        cout << max(x,y) << endl;
    }else{
        if(x==y&&x2==y2){
            cout << max(x,y)+1 << endl;
        }else{
            cout << max(x,y) << endl;
        }
    }
    
    return 0;
}


0