aboutsummaryrefslogtreecommitdiff
path: root/codechef/copsAndTheifDevu/main.cpp
blob: 914c01259438fddbc8c7ba946898a82b27bdcbd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<bits/stdc++.h>

using namespace std;

int main () {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int tt;
	cin >> tt;
	while(tt--){
    int m, x, y;
    cin >> m >> x >> y;
    vector<int> v(m);
    for(int &x : v) cin >> x;
    set<int> st;
    for(int i = 0; i < v.size(); i++) {
      for(int j = max(v[i] - (x * y) - 1, 0); j < min(v[i] + (x * y), 100); j++) {
        st.insert(j);
      }
    }
    cout << 100 - st.size() << endl;

	}
}