結果
問題 | No.208 王将 |
ユーザー | hirokazu1020 |
提出日時 | 2015-05-15 22:37:49 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 621 bytes |
コンパイル時間 | 649 ms |
コンパイル使用メモリ | 80,616 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-09 16:18:14 |
合計ジャッジ時間 | 1,397 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include<sstream> #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<string> #include<vector> #include<set> #include<map> #include<queue> #include<numeric> #include<functional> #include<algorithm> using namespace std; #define INF (1<<29) #define rep(i,n) for(int i=0;i<(int)(n);i++) #define all(v) v.begin(),v.end() #define uniq(v) v.erase(unique(all(v)),v.end()) #define indexOf(v,x) (find(all(v),x)-v.begin()) int main(){ int x,y,x2,y2; cin>>x>>y>>x2>>y2; int ans=max(x,y); if(x==y&&x2<x&&y2<y&&(long long)x*y2==(long long)x2*y)ans++; cout<<ans<<endl; return 0; }