結果

問題 No.700 LOVE
ユーザー funakoshifunakoshi
提出日時 2019-08-21 15:12:42
言語 C
(gcc 12.3.0)
結果
WA  
実行時間 -
コード長 585 bytes
コンパイル時間 318 ms
コンパイル使用メモリ 30,976 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-17 09:28:53
合計ジャッジ時間 1,068 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 1 ms
6,944 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 AC 1 ms
6,940 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 1 ms
6,940 KB
testcase_07 AC 1 ms
6,940 KB
testcase_08 AC 1 ms
6,940 KB
testcase_09 AC 1 ms
6,940 KB
testcase_10 AC 1 ms
6,940 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 1 ms
6,940 KB
testcase_15 AC 1 ms
6,940 KB
testcase_16 AC 1 ms
6,944 KB
testcase_17 WA -
testcase_18 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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+i,"LOVE",4)==0)
            {
                printf("YES");
                lov=true;
                break;
            }
        }
        if(lov==true)
        {
            break;
        }
    }
    if(lov==false)
    {
        printf("NO");
    }
}
0