結果
問題 |
No.208 王将
|
ユーザー |
![]() |
提出日時 | 2017-07-09 11:16:12 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 199 bytes |
コンパイル時間 | 248 ms |
コンパイル使用メモリ | 33,484 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-07 04:18:44 |
合計ジャッジ時間 | 1,075 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 WA * 2 |
コンパイルメッセージ
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){step++;} printf("%d\n",step); }