Submission #2553730


Source Code Expand

#include <stdio.h>
#include <algorithm>

using namespace std;

int n, a, b;
int t[1000];
int main() {
  
  scanf("%d %d %d", &n, &a, &b);
  
  for (int i = 0; i < n; i++)
    scanf("%d", t+i);
  sort(t, t+n);
  printf("%d", n - (int)(upper_bound(t, t+n, b-1) - lower_bound(t, t+n,a)));
  
  
  return 0;
  
}

Submission Info

Submission Time
Task A - A Barricade
User suakii
Language C++14 (GCC 5.4.1)
Score 0
Code Size 329 Byte
Status WA
Exec Time 1 ms
Memory 128 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:10: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:13:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d", t+i);
                     ^

Judge Result

Set Name All
Score / Max Score 0 / 66
Status
WA × 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 WA 1 ms 128 KB
01_sample.txt WA 1 ms 128 KB
02_sampe.txt WA 1 ms 128 KB
03_sample.txt WA 0 ms 128 KB
corner_case_03.txt WA 1 ms 128 KB
corner_case_04.txt WA 1 ms 128 KB
random_case_00.txt WA 1 ms 128 KB
random_case_01.txt WA 1 ms 128 KB
random_case_02.txt WA 1 ms 128 KB