Submission #908184


Source Code Expand

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

int main() {
    int n, a, b;
    scanf("%d%d%d", &n, &a, &b);
    int ans = n;
    while(n--) {
        int x;
        scanf("%d", &x);
        if(x >= a && x < b) ans--;
    }
    printf("%d\n", ans);
    return 0;
}

Submission Info

Submission Time
Task A - A Barricade
User horihori
Language C++14 (GCC 5.4.1)
Score 66
Code Size 281 Byte
Status AC
Exec Time 2 ms
Memory 256 KiB

Compile Error

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

Judge Result

Set Name All
Score / Max Score 66 / 66
Status
AC × 9
Set Name Test Cases
All 00_sample.txt, 01_sample.txt, 02_sampe.txt, 03_sample.txt, corner_case_03.txt, corner_case_04.txt, random_case_00.txt, random_case_01.txt, random_case_02.txt
Case Name Status Exec Time Memory
00_sample.txt AC 2 ms 256 KiB
01_sample.txt AC 2 ms 256 KiB
02_sampe.txt AC 2 ms 256 KiB
03_sample.txt AC 2 ms 256 KiB
corner_case_03.txt AC 2 ms 256 KiB
corner_case_04.txt AC 2 ms 256 KiB
random_case_00.txt AC 2 ms 256 KiB
random_case_01.txt AC 2 ms 256 KiB
random_case_02.txt AC 2 ms 256 KiB