Submission #67911715


Source Code Expand

#include <iostream>

using namespace std;

int main()
{
    int n,l,r;
    bool ans = true;
    scanf("%d %d %d", &n, &l, &r);
    char kata[n + 100];
    scanf("%s", kata);
    for(int i = l - 1 ; i < r ; i++)
    {
        if(kata[i] == 'x')
        {
            ans = false;
            break;
        }
    }

    if(ans)
        printf("Yes\n");
    else
        printf("No\n");
    return 0;
}

Submission Info

Submission Time
Task A - Vacation Validation
User MichaelH
Language C++ 17 (gcc 12.2)
Score 100
Code Size 427 Byte
Status AC
Exec Time 1 ms
Memory 3872 KiB

Compile Error

Main.cpp: In function ‘int main()’:
Main.cpp:9:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    9 |     scanf("%d %d %d", &n, &l, &r);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
Main.cpp:11:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |     scanf("%s", kata);
      |     ~~~~~^~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 2
AC × 16
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
random_01.txt AC 1 ms 3576 KiB
random_02.txt AC 1 ms 3504 KiB
random_03.txt AC 1 ms 3868 KiB
random_04.txt AC 1 ms 3564 KiB
random_05.txt AC 1 ms 3684 KiB
random_06.txt AC 1 ms 3652 KiB
random_07.txt AC 1 ms 3572 KiB
random_08.txt AC 1 ms 3668 KiB
random_09.txt AC 1 ms 3688 KiB
random_10.txt AC 1 ms 3752 KiB
random_11.txt AC 1 ms 3684 KiB
random_12.txt AC 1 ms 3868 KiB
random_13.txt AC 1 ms 3872 KiB
random_14.txt AC 1 ms 3624 KiB
sample_01.txt AC 1 ms 3684 KiB
sample_02.txt AC 1 ms 3636 KiB