aboutsummaryrefslogtreecommitdiff
path: root/TakeDiscountOrNot/TakeDiscountOrNot.cpp
blob: 3b4510b389d6fcadccbc4a1499cac24ea4472b79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<bits/stdc++.h>
using namespace std;
int main() {
  int tt;
  cin >> tt;
  while(tt--) {
    int n, x, y;
    int s1 = x, s2 = 0;
    cin >> n >> x >> y;
    for(int i = 0; i < n; i++) {
      int h;
      cin >> h;
      s2+=h;
      s1+=max(0, h - y);
    }
    cout << (s1 < s2 ? "COUPON" : "NO COUPON") << '\n';
  }
}