結果
問題 |
No.700 LOVE
|
ユーザー |
![]() |
提出日時 | 2019-08-21 15:13:39 |
言語 | C (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 2,000 ms |
コード長 | 585 bytes |
コンパイル時間 | 333 ms |
コンパイル使用メモリ | 30,208 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-22 23:40:14 |
合計ジャッジ時間 | 1,001 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 16 |
ソースコード
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <math.h> int main(void) { char str[100]=""; bool lov=false; int num,len; scanf("%d %d",&num,&len); for(int i=0;i<num;i++) { scanf("%s",str); for(int j=0;j<len;j++) { if(strncmp(str+j,"LOVE",4)==0) { printf("YES"); lov=true; break; } } if(lov==true) { break; } } if(lov==false) { printf("NO"); } }