Language: C++

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

typedef long long ll;
typedef unsigned long long ull;
const long double PI = (acos(-1));
const long long MOD = 1000000007;
struct Edge
{
    long long to;
    long long cost;
};
using Graph = vector<vector<Edge>>;
using P = pair<ll, ll>;
const long long INF = 1LL << 60;
#define ALL(a) (a).begin(), (a).end()

long long modpow(long long a, long long n, long long m)
{
    long long ans = 1;
    while (n)
    {
        if (n & 1)
        {
            ans = (ans * a) % m;
        }
        a = (a * a) % m;
        n >>= 1;
    }
    return ans;
}
long long combi(long long n, long long a)
{
    long long ans = 1, ans1 = 1;
    for (long long i = n - a + 1; i <= n; i++)
    {
        ans *= i % MOD;
        ans %= MOD;
    }

    for (long long i = 2; i <= a; i++)
        ans1 = (ans1 * i) % MOD;
    ans1 = modpow(ans1, MOD - 2, MOD);
    return ((ans % MOD) * ans1) % MOD;
}

template <typename T>
bool next_combination(const T first, const T last, int k)
{
    const T subset = first + k;
    // empty container | k = 0 | k == n
    if (first == last || first == subset || last == subset)
    {
        return false;
    }
    T src = subset;
    while (first != src)
    {
        src--;
        if (*src < *(last - 1))
        {
            T dest = subset;
            while (*src >= *dest)
            {
                dest++;
            }
            iter_swap(src, dest);
            rotate(src + 1, dest + 1, last);
            rotate(subset, subset + (last - dest) - 1, last);
            return true;
        }
    }
    // restore
    rotate(first, subset, last);
    return false;
}

void dfs(vector<ll> s, ll mx, ll N, vector<vector<ll>> &arr)
{
    if (s.size() == (size_t)N)
    {
        //cout << s.c_str() << endl;
        arr.push_back(s);
    }
    else
    {
        for (ll c = s.size() > 0 ? 0 : 0; c <= mx; c++)
        {
            s.push_back(c);
            dfs(s, mx, N, arr);
            s.pop_back();
        }
    }

    return;
}

int bfs(int sx, int sy, int gx, int gy, int h, int w, vector<vector<char>> map)
{
    queue<pair<int, int>> s;

    vector<vector<ll>> ans;

    for (int i = 0; i < h; i++)
    {
        vector<ll> aa(w);
        ans.push_back(aa);
    }

    s.push(make_pair(sx, sy));
    while (s.size() > 0)
    {

        pair<int, int> tmp = s.front();
        s.pop();
        map[tmp.first][tmp.second] = '#';
        for (int i = -1; i <= 1; i++)
        {
            for (int j = -1; j <= 1; j++)
            {
                if (tmp.first + i < 0 || tmp.first + i >= h)
                {
                    continue;
                }
                if (tmp.second + j < 0 || tmp.second + j >= w)
                {
                    continue;
                }
                if (i != 0 && j != 0)
                {
                    continue;
                }
                if (i == 0 && j == 0)
                {
                    continue;
                }
                if (map[tmp.first + i][tmp.second + j] == '#')
                {
                    continue;
                }
                map[tmp.first + i][tmp.second + j] = '#';
                if (ans[tmp.first + i][tmp.second + j] == 0)
                {
                    ans[tmp.first + i][tmp.second + j] = ans[tmp.first][tmp.second] + 1;
                }
                else
                {
                    ans[tmp.first + i][tmp.second + j] = min(ans[tmp.first + i][tmp.second + j], ans[tmp.first][tmp.second] + 1);
                }
                s.push(make_pair(tmp.first + i, tmp.second + j));
            }
        }
    }

    return ans[gy][gx];
}

ll modfactorial(ll a)
{
    if (a == 1)
        return 1;

    return (a % MOD) * (modfactorial(a - 1) % MOD);
}

ll gcd(ll a, ll b)
{
    if (a % b == 0)
    {
        return (b);
    }
    else
    {
        return (gcd(b, a % b));
    }
}

ll lcm(ll a, ll b)
{
    return (a / gcd(a, b)) * b;
}

map<ll, ll> prime_factor(ll n)
{
    map<ll, ll> ret;
    for (ll i = 2; i * i <= n; i++)
    {
        while (n % i == 0)
        {
            ret[i]++;
            n /= i;
        }
    }
    if (n != 1)
        ret[n] = 1;
    return ret;
}

/* dijkstra(G,s,dis)
    入力：グラフ G, 開始点 s, 距離を格納する dis
    計算量：O(|E|log|V|)
    副作用：dis が書き換えられる
*/
void dijkstra(const Graph &G, int s, vector<ll> &dis, vector<ll> &prev)
{
    int N = G.size();
    dis.resize(N, INF);
    prev.resize(N, -1); // 初期化
    priority_queue<P, vector<P>, greater<P>> pq;
    dis[s] = 0;
    pq.emplace(dis[s], s);
    while (!pq.empty())
    {
        P p = pq.top();
        pq.pop();
        int v = p.second;
        if (dis[v] < p.first)
        {
            continue;
        }
        for (auto &e : G[v])
        {
            if (dis[e.to] > dis[v] + e.cost)
            {
                dis[e.to] = dis[v] + e.cost;
                prev[e.to] = v; // 頂点 v を通って e.to にたどり着いた
                pq.emplace(dis[e.to], e.to);
            }
        }
    }
}

vector<ll> get_path(const vector<ll> &prev, ll t)
{
    vector<ll> path;
    for (ll cur = t; cur != -1; cur = prev[cur])
    {
        path.push_back(cur);
    }
    reverse(path.begin(), path.end()); // 逆順なのでひっくり返す
    return path;
}

vector<string> split( string &s, char delim)
{
    vector<string> elems;
    stringstream ss(s);
    string item;
    while (getline(ss, item, delim))
    {
        if (!item.empty())
        {
            elems.push_back(item);
        }
    }
    return elems;
}

vector<ll> divisor(ll n)
{
    vector<ll> ret;
    for (ll i = 1; i * i <= n; i++)
    {
        if (n % i == 0)
        {
            ret.push_back(i);
            if (i * i != n)
                ret.push_back(n / i);
        }
    }
    sort(begin(ret), end(ret));
    return (ret);
}

ll binary(ll bina)
{
    ll ans = 0;
    ll cnt = 0;
    for (ll i = 0; bina > 0; i++)
    {
        if(bina%2){
            cnt++;
        }
        bina = bina / 2;
    }
    return cnt;
}

int main()
{
    ll n,k;
    cin >> n >> k;

    vector<ull> a(n);
    vector<ull> m(n);
    ull prev = 1;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        m[i] = prev * a[i];
        prev = m[i];
    }

    prev = m[k - 1];
    for (int i = k; i < n; i++)
    {
        ull tmp = m[i] / m[i - k];
        if(tmp > prev){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }

        prev = tmp;
    }

    return 0;
}
//cout << std::fixed << std::setprecision(15)#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
const long double PI = (acos(-1));
const long long MOD = 1000000007;
struct Edge
{
    long long to;
    long long cost;
};
using Graph = vector<vector<Edge>>;
using P = pair<ll, ll>;
const long long INF = 1LL << 60;
#define ALL(a) (a).begin(), (a).end()

long long modpow(long long a, long long n, long long m)
{
    long long ans = 1;
    while (n)
    {
        if (n & 1)
        {
            ans = (ans * a) % m;
        }
        a = (a * a) % m;
        n >>= 1;
    }
    return ans;
}
long long combi(long long n, long long a)
{
    long long ans = 1, ans1 = 1;
    for (long long i = n - a + 1; i <= n; i++)
    {
        ans *= i % MOD;
        ans %= MOD;
    }

    for (long long i = 2; i <= a; i++)
        ans1 = (ans1 * i) % MOD;
    ans1 = modpow(ans1, MOD - 2, MOD);
    return ((ans % MOD) * ans1) % MOD;
}

template <typename T>
bool next_combination(const T first, const T last, int k)
{
    const T subset = first + k;
    // empty container | k = 0 | k == n
    if (first == last || first == subset || last == subset)
    {
        return false;
    }
    T src = subset;
    while (first != src)
    {
        src--;
        if (*src < *(last - 1))
        {
            T dest = subset;
            while (*src >= *dest)
            {
                dest++;
            }
            iter_swap(src, dest);
            rotate(src + 1, dest + 1, last);
            rotate(subset, subset + (last - dest) - 1, last);
            return true;
        }
    }
    // restore
    rotate(first, subset, last);
    return false;
}

void dfs(vector<ll> s, ll mx, ll N, vector<vector<ll>> &arr)
{
    if (s.size() == (size_t)N)
    {
        //cout << s.c_str() << endl;
        arr.push_back(s);
    }
    else
    {
        for (ll c = s.size() > 0 ? 0 : 0; c <= mx; c++)
        {
            s.push_back(c);
            dfs(s, mx, N, arr);
            s.pop_back();
        }
    }

    return;
}

int bfs(int sx, int sy, int gx, int gy, int h, int w, vector<vector<char>> map)
{
    queue<pair<int, int>> s;

    vector<vector<ll>> ans;

    for (int i = 0; i < h; i++)
    {
        vector<ll> aa(w);
        ans.push_back(aa);
    }

    s.push(make_pair(sx, sy));
    while (s.size() > 0)
    {

        pair<int, int> tmp = s.front();
        s.pop();
        map[tmp.first][tmp.second] = '#';
        for (int i = -1; i <= 1; i++)
        {
            for (int j = -1; j <= 1; j++)
            {
                if (tmp.first + i < 0 || tmp.first + i >= h)
                {
                    continue;
                }
                if (tmp.second + j < 0 || tmp.second + j >= w)
                {
                    continue;
                }
                if (i != 0 && j != 0)
                {
                    continue;
                }
                if (i == 0 && j == 0)
                {
                    continue;
                }
                if (map[tmp.first + i][tmp.second + j] == '#')
                {
                    continue;
                }
                map[tmp.first + i][tmp.second + j] = '#';
                if (ans[tmp.first + i][tmp.second + j] == 0)
                {
                    ans[tmp.first + i][tmp.second + j] = ans[tmp.first][tmp.second] + 1;
                }
                else
                {
                    ans[tmp.first + i][tmp.second + j] = min(ans[tmp.first + i][tmp.second + j], ans[tmp.first][tmp.second] + 1);
                }
                s.push(make_pair(tmp.first + i, tmp.second + j));
            }
        }
    }

    return ans[gy][gx];
}

ll modfactorial(ll a)
{
    if (a == 1)
        return 1;

    return (a % MOD) * (modfactorial(a - 1) % MOD);
}

ll gcd(ll a, ll b)
{
    if (a % b == 0)
    {
        return (b);
    }
    else
    {
        return (gcd(b, a % b));
    }
}

ll lcm(ll a, ll b)
{
    return (a / gcd(a, b)) * b;
}

map<ll, ll> prime_factor(ll n)
{
    map<ll, ll> ret;
    for (ll i = 2; i * i <= n; i++)
    {
        while (n % i == 0)
        {
            ret[i]++;
            n /= i;
        }
    }
    if (n != 1)
        ret[n] = 1;
    return ret;
}

/* dijkstra(G,s,dis)
    入力：グラフ G, 開始点 s, 距離を格納する dis
    計算量：O(|E|log|V|)
    副作用：dis が書き換えられる
*/
void dijkstra(const Graph &G, int s, vector<ll> &dis, vector<ll> &prev)
{
    int N = G.size();
    dis.resize(N, INF);
    prev.resize(N, -1); // 初期化
    priority_queue<P, vector<P>, greater<P>> pq;
    dis[s] = 0;
    pq.emplace(dis[s], s);
    while (!pq.empty())
    {
        P p = pq.top();
        pq.pop();
        int v = p.second;
        if (dis[v] < p.first)
        {
            continue;
        }
        for (auto &e : G[v])
        {
            if (dis[e.to] > dis[v] + e.cost)
            {
                dis[e.to] = dis[v] + e.cost;
                prev[e.to] = v; // 頂点 v を通って e.to にたどり着いた
                pq.emplace(dis[e.to], e.to);
            }
        }
    }
}

vector<ll> get_path(const vector<ll> &prev, ll t)
{
    vector<ll> path;
    for (ll cur = t; cur != -1; cur = prev[cur])
    {
        path.push_back(cur);
    }
    reverse(path.begin(), path.end()); // 逆順なのでひっくり返す
    return path;
}

vector<string> split( string &s, char delim)
{
    vector<string> elems;
    stringstream ss(s);
    string item;
    while (getline(ss, item, delim))
    {
        if (!item.empty())
        {
            elems.push_back(item);
        }
    }
    return elems;
}

vector<ll> divisor(ll n)
{
    vector<ll> ret;
    for (ll i = 1; i * i <= n; i++)
    {
        if (n % i == 0)
        {
            ret.push_back(i);
            if (i * i != n)
                ret.push_back(n / i);
        }
    }
    sort(begin(ret), end(ret));
    return (ret);
}

ll binary(ll bina)
{
    ll ans = 0;
    ll cnt = 0;
    for (ll i = 0; bina > 0; i++)
    {
        if(bina%2){
            cnt++;
        }
        bina = bina / 2;
    }
    return cnt;
}

int main()
{
    ll n,k;
    cin >> n >> k;

    vector<ull> a(n);
    vector<ull> m(n);
    ull prev = 1;
    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        m[i] = prev * a[i];
        prev = m[i];
    }

    prev = m[k - 1];
    for (int i = k; i < n; i++)
    {
        ull tmp = m[i] / m[i - k];
        if(tmp > prev){
            cout << "Yes" << endl;
        }
        else{
            cout << "No" << endl;
        }

        prev = tmp;
    }

    return 0;
}
//cout << std::fixed << std::setprecision(15)

Compiler output:
a.cc:325:19: error: redefinition of 'const long double PI'
  325 | const long double PI = (acos(-1));
      |                   ^~
a.cc:6:19: note: 'const long double PI' previously defined here
    6 | const long double PI = (acos(-1));
      |                   ^~
a.cc:326:17: error: redefinition of 'const long long int MOD'
  326 | const long long MOD = 1000000007;
      |                 ^~~
a.cc:7:17: note: 'const long long int MOD' previously defined here
    7 | const long long MOD = 1000000007;
      |                 ^~~
a.cc:327:8: error: redefinition of 'struct Edge'
  327 | struct Edge
      |        ^~~~
a.cc:8:8: note: previous definition of 'struct Edge'
    8 | struct Edge
      |        ^~~~
a.cc:334:17: error: redefinition of 'const long long int INF'
  334 | const long long INF = 1LL << 60;
      |                 ^~~
a.cc:15:17: note: 'const long long int INF' previously defined here
   15 | const long long INF = 1LL << 60;
      |                 ^~~
a.cc:337:11: error: redefinition of 'long long int modpow(long long int, long long int, long long int)'
  337 | long long modpow(long long a, long long n, long long m)
      |           ^~~~~~
a.cc:18:11: note: 'long long int modpow(long long int, long long int, long long int)' previously defined here
   18 | long long modpow(long long a, long long n, long long m)
      |           ^~~~~~
a.cc:351:11: error: redefinition of 'long long int combi(long long int, long long int)'
  351 | long long combi(long long n, long long a)
      |           ^~~~~
a.cc:32:11: note: 'long long int combi(long long int, long long int)' previously defined here
   32 | long long combi(long long n, long long a)
      |           ^~~~~
a.cc:367:6: error: redefinition of 'template<class T> bool next_combination(T, T, int)'
  367 | bool next_combination(const T first, const T last, int k)
      |      ^~~~~~~~~~~~~~~~
a.cc:48:6: note: 'template<class T> bool next_combination(T, T, int)' previously declared here
   48 | bool next_combination(const T first, const T last, int k)
      |      ^~~~~~~~~~~~~~~~
a.cc:397:6: error: redefinition of 'void dfs(std::vector<long long int>, ll, ll, std::vector<std::vector<long long int> >&)'
  397 | void dfs(vector<ll> s, ll mx, ll N, vector<vector<ll>> &arr)
      |      ^~~
a.cc:78:6: note: 'void dfs(std::vector<long long int>, ll, ll, std::vector<std::vector<long long int> >&)' previously defined here
   78 | void dfs(vector<ll> s, ll mx, ll N, vector<vector<ll>> &arr)
      |      ^~~
a.cc:417:5: error: redefinition of 'int bfs(int, int, int, int, int, int, std::vector<std::vector<char> >)'
  417 | int bfs(int sx, int sy, int gx, int gy, int h, int w, vector<vector<char>> map)
      |     ^~~
a.cc:98:5: note: 'int bfs(int, int, int, int, int, int, std::vector<std::vector<char> >)' previously defined here
   98 | int bfs(int sx, int sy, int gx, int gy, int h, int w, vector<vector<char>> map)
      |     ^~~
a.cc:477:4: error: redefinition of 'll modfactorial(ll)'
  477 | ll modfactorial(ll a)
      |    ^~~~~~~~~~~~
a.cc:158:4: note: 'll modfactorial(ll)' previously defined here
  158 | ll modfactorial(ll a)
      |    ^~~~~~~~~~~~
a.cc:485:4: error: redefinition of 'll gcd(ll, ll)'
  485 | ll gcd(ll a, ll b)
      |    ^~~
a.cc:166:4: note: 'll gcd(ll, ll)' previously defined here
  166 | ll gcd(ll a, ll b)
      |    ^~~
a.cc:497:4: error: redefinition of 'll lcm(ll, ll)'
  497 | ll lcm(ll a, ll b)
      |    ^~~
a.cc:178:4: note: 'll lcm(ll, ll)' previously defined here
  178 | ll lcm(ll a, ll b)
      |    ^~~
a.cc:502:13: error: redefinition of 'std::map<long long int, long long int> prime_factor(ll)'
  502 | map<ll, ll> prime_factor(ll n)
      |             ^~~~~~~~~~~~
a.cc:183:13: note: 'std::map<long long int, long long int> prime_factor(ll)' previously defined here
  183 | map<ll, ll> prime_factor(ll n)
      |             ^~~~~~~~~~~~
a.cc:523:6: error: redefinition of 'void dijkstra(const Graph&, int, std::vector<long long int>&, std::vector<long long int>&)'
  523 | void dijkstra(const Graph &G, int s, vector<ll> &dis, vector<ll> &prev)
      |      ^~~~~~~~
a.cc:204:6: note: 'void dijkstra(const Graph&, int, std::vector<long long int>&, std::vector<long long int>&)' previously defined here
  204 | void dijkstra(const Graph &G, int s, vector<ll> &dis, vector<ll> &prev)
      |      ^~~~~~~~
a.cc:552:12: error: redefinition of 'std::vector<long long int> get_path(const std::vector<long long int>&, ll)'
  552 | vector<ll> get_path(const vector<ll> &prev, ll t)
      |            ^~~~~~~~
a.cc:233:12: note: 'std::vector<long long int> get_path(const std::vector<long long int>&, ll)' previously defined here
  233 | vector<ll> get_path(const vector<ll> &prev, ll t)
      |            ^~~~~~~~
a.cc:563:16: error: redefinition of 'std::vector<std::__cxx11::basic_string<char> > split(std::string&, char)'
  563 | vector<string> split( string &s, char delim)
      |                ^~~~~
a.cc:244:16: note: 'std::vector<std::__cxx11::basic_string<char> > split(std::string&, char)' previously defined here
  244 | vector<string> split( string &s, char delim)
      |                ^~~~~
a.cc:578:12: error: redefinition of 'std::vector<long long int> divisor(ll)'
  578 | vector<ll> divisor(ll n)
      |            ^~~~~~~
a.cc:259:12: note: 'std::vector<long long int> divisor(ll)' previously defined here
  259 | vector<ll> divisor(ll n)
      |            ^~~~~~~
a.cc:594:4: error: redefinition of 'll binary(ll)'
  594 | ll binary(ll bina)
      |    ^~~~~~
a.cc:275:4: note: 'll binary(ll)' previously defined here
  275 | ll binary(ll bina)
      |    ^~~~~~
a.cc:608:5: error: redefinition of 'int main()'
  608 | int main()
      |     ^~~~
a.cc:289:5: note: 'int main()' previously defined here
  289 | int main()
      |     ^~~~