Submission #7217397


Source Code Expand

#include <bits/stdc++.h>
using namespace std;



int main(void){
    
    int n;
    scanf("%d", &n);
    for(int i=0;i<n;i++){
        string po;
        cin >> po;
        int flag=0;
        for(int j=3;j<po.size();j++){
            if(po[j-3]=='o'&&po[j-2]=='k'&&po[j-1]=='y'&&po[j]=='o'){
                for(int k=j+3;k<po.size();k++){
                    if(po[k-2]=='e'&&po[k-1]=='c'&&po[k]=='h'){
                        flag=1;
                    }
                }
            }
        }
        if(flag)printf("Yes\n");
        else printf("No\n");
    }
    return 0;
}

Submission Info

Submission Time
Task B - okyoech
User xxkiritoxx
Language C++14 (GCC 5.4.1)
Score 100
Code Size 613 Byte
Status AC
Exec Time 1 ms
Memory 256 KiB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:9:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", &n);
                    ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 19
Set Name Test Cases
Sample 00_sample_01, 00_sample_02
All 00_sample_01, 00_sample_02, 01_corner_01, 10_random_01, 10_random_02, 10_random_03, 10_random_04, 10_random_05, 10_random_06, 10_random_07, 10_random_08, 20_max_01, 20_max_02, 20_max_03, 20_max_04, 20_max_05, 20_max_06, 20_max_07, 20_max_08
Case Name Status Exec Time Memory
00_sample_01 AC 1 ms 256 KiB
00_sample_02 AC 1 ms 256 KiB
01_corner_01 AC 1 ms 256 KiB
10_random_01 AC 1 ms 256 KiB
10_random_02 AC 1 ms 256 KiB
10_random_03 AC 1 ms 256 KiB
10_random_04 AC 1 ms 256 KiB
10_random_05 AC 1 ms 256 KiB
10_random_06 AC 1 ms 256 KiB
10_random_07 AC 1 ms 256 KiB
10_random_08 AC 1 ms 256 KiB
20_max_01 AC 1 ms 256 KiB
20_max_02 AC 1 ms 256 KiB
20_max_03 AC 1 ms 256 KiB
20_max_04 AC 1 ms 256 KiB
20_max_05 AC 1 ms 256 KiB
20_max_06 AC 1 ms 256 KiB
20_max_07 AC 1 ms 256 KiB
20_max_08 AC 1 ms 256 KiB