結果
| 問題 | No.208 王将 |
| コンテスト | |
| ユーザー |
Bantako
|
| 提出日時 | 2017-07-09 11:18:39 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 1,000 ms |
| コード長 | 207 bytes |
| 記録 | |
| コンパイル時間 | 265 ms |
| コンパイル使用メモリ | 33,612 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-07 04:18:50 |
| 合計ジャッジ時間 | 986 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 23 |
コンパイルメッセージ
main.cpp:3:1: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
3 | main(){
| ^~~~
main.cpp: In function ‘int main()’:
main.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%d%d%d%d",&x,&y,&x2,&y2);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h>
#include<algorithm>
main(){
int x,y;
int x2,y2;
scanf("%d%d%d%d",&x,&y,&x2,&y2);
int step = std::max(x,y);
if(x==y && x2==y2 && x>x2){step++;}
printf("%d\n",step);
}
Bantako