aboutsummaryrefslogtreecommitdiff
path: root/codechef
diff options
context:
space:
mode:
Diffstat (limited to 'codechef')
-rw-r--r--codechef/copsAndTheifDevu/inp0
-rwxr-xr-xcodechef/copsAndTheifDevu/mainbin0 -> 43304 bytes
-rw-r--r--codechef/copsAndTheifDevu/main.cpp24
-rw-r--r--codechef/copsAndTheifDevu/main_input0.txt7
-rw-r--r--codechef/copsAndTheifDevu/main_output0.txt3
5 files changed, 34 insertions, 0 deletions
diff --git a/codechef/copsAndTheifDevu/inp b/codechef/copsAndTheifDevu/inp
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/codechef/copsAndTheifDevu/inp
diff --git a/codechef/copsAndTheifDevu/main b/codechef/copsAndTheifDevu/main
new file mode 100755
index 0000000..c9cc83b
--- /dev/null
+++ b/codechef/copsAndTheifDevu/main
Binary files differ
diff --git a/codechef/copsAndTheifDevu/main.cpp b/codechef/copsAndTheifDevu/main.cpp
new file mode 100644
index 0000000..914c012
--- /dev/null
+++ b/codechef/copsAndTheifDevu/main.cpp
@@ -0,0 +1,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;
+
+ }
+}
diff --git a/codechef/copsAndTheifDevu/main_input0.txt b/codechef/copsAndTheifDevu/main_input0.txt
new file mode 100644
index 0000000..b47d21b
--- /dev/null
+++ b/codechef/copsAndTheifDevu/main_input0.txt
@@ -0,0 +1,7 @@
+3
+4 7 8
+12 52 56 8
+2 10 2
+21 75
+2 5 8
+10 51
diff --git a/codechef/copsAndTheifDevu/main_output0.txt b/codechef/copsAndTheifDevu/main_output0.txt
new file mode 100644
index 0000000..5e66023
--- /dev/null
+++ b/codechef/copsAndTheifDevu/main_output0.txt
@@ -0,0 +1,3 @@
+0
+18
+9