結果
問題 | No.1205 Eye Drops |
ユーザー |
![]() |
提出日時 | 2021-03-03 23:57:19 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 377 bytes |
コンパイル時間 | 1,113 ms |
コンパイル使用メモリ | 20,736 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-03 15:18:35 |
合計ジャッジ時間 | 2,832 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 36 WA * 1 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:10:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 10 | scanf("%d", &n); | ^~~~~~~~~~~~~~~ main.c:11:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 11 | scanf("%d", &m); | ^~~~~~~~~~~~~~~ main.c:14:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 14 | scanf("%d", &t[i]); | ^~~~~~~~~~~~~~~~~~ main.c:15:17: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 15 | scanf("%d", &p[i]); | ^~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> #include <stdlib.h> int main(void) { int n, m; int t[100000], p[10000]; int i; scanf("%d", &n); scanf("%d", &m); for(i = 1;i <= m;i++){ scanf("%d", &t[i]); scanf("%d", &p[i]); } t[0] = 0; p[0] = 0; for(i = 1;i <= m;i++){ if(t[i] - t[i - 1] < abs(p[i] - p[i - 1])){ printf("No\n"); return 0; } } printf("Yes\n"); return 0; }