Problem:
Score : 100 points

Problem Statement

You will turn on the air conditioner if, and only if, the temperature of the room is 30 degrees Celsius or above.

The current temperature of the room is X degrees Celsius. Will you turn on the air conditioner?

Constraints

-40 \leq X \leq 40

X is an integer.

Input

Input is given from Standard Input in the following format:

X

Output

Print Yes if you will turn on the air conditioner; print No otherwise.

Sample Input 1

25

Sample Output 1

No

Sample Input 2

30

Sample Output 2

Yes

Solution in C++ (GCC 9.2.1) (judge verdict: Wrong Answer)

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

#define PI acos(-1)
#define pb push_back
#define mp make_pair
#define pi pair<int, int>
#define pii pair<int, pi>
#define fir first
#define sec second
#define MAXN 500001
#define MAXL 20
#define INF 200001
#define mod 1000000007

int n, q, block;
int m[MAXN];
int v[MAXN];
int ans[MAXN];
vector<pii> queries;

bool cmp(pii x, pii y)
{
  if (x.fir / block != y.fir / block)
    return x.fir / block < y.fir / block;
  return x.sec.fir < y.sec.fir;
}
void sqrt_decomposition()
{
  block = (int)sqrt(n);
  sort(queries.begin(), queries.end(), cmp);
  int curr_left = 0, curr_right = 0, curr_sum = 0;
  for (int i = 0; i < queries.size(); i++)
  {
    int l = queries[i].fir, r = queries[i].sec.fir;
    while (curr_left < l)
    {
      m[v[curr_left]]--;
      if (m[v[curr_left]] == 0)
        curr_sum--;
      curr_left++;
    }
    while (curr_left > l)
    {
      m[v[curr_left - 1]]++;
      if (m[v[curr_left - 1]] == 1)
        curr_sum++;
      curr_left--;
    }
    while (curr_right <= r)
    {
      m[v[curr_right]]++;
      if (m[v[curr_right]] == 1)
        curr_sum++;
      curr_right++;
    }
    while (curr_right > r + 1)
    {
      m[v[curr_right - 1]]--;
      if (m[v[curr_right - 1]] == 0)
        curr_sum--;
      curr_right--;
    }
    ans[queries[i].sec.sec] = curr_sum;
  }
}
signed main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> q;
  for (int i = 0; i < n; i++)
    cin >> v[i];
  for (int i = 0; i < q; i++)
  {
    int l, r;
    cin >> l >> r;
    l--, r--;
    queries.pb(mp(l, mp(r, i)));
  }
  sqrt_decomposition();
  for (int i = 0; i < q; i++)
    cout << ans[i] << endl;
  return 0;
}