結果
問題 |
No.85 TVザッピング(1)
|
ユーザー |
![]() |
提出日時 | 2018-04-25 18:20:57 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 239 ms |
コンパイル使用メモリ | 22,656 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 21:04:29 |
合計ジャッジ時間 | 1,016 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
main.c: In function ‘run’: main.c:13:3: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 13 | scanf("%d%d%d",&n,&m,&c); | ^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<stdio.h> #include<stdlib.h> #include<math.h> typedef long long int int64; #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) #define ABS(a) ((a)>(0)?(a):-(a)) void run(void){ int n,m,c; scanf("%d%d%d",&n,&m,&c); if(n==1 || m==1){ int x=MAX(n,m); printf("%s\n",x==2?"YES":"NO"); return; } printf("%s\n",n%2==0 || m%2==0?"YES":"NO"); return; } int main(void){ run(); return 0; }