We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8df6838 commit a832ebdCopy full SHA for a832ebd
1360B - Honest Coach.cpp
@@ -0,0 +1,34 @@
1
+// ॐ नमः शिवाय
2
+#include<bits/stdc++.h>
3
+using namespace std;
4
+
5
+// Code Written By: Vikash Patel
6
+// Codeforces Profile: https://codeforces.com/profile/vikashpatel
7
8
+int main()
9
+{
10
+ int t;
11
+ cin>>t;
12
+ while(t--)
13
+ {
14
+ int n;
15
+ cin>>n;
16
+ int s[n];
17
+ for(int i=0;i<n;i++)
18
19
+ cin>>s[i];
20
+ }
21
+ int mini = INT_MAX;
22
23
24
+ for(int j=0;j<n;j++)
25
26
+ if(i!=j)
27
28
+ mini = min(mini,abs(s[i]-s[j]));
29
30
31
32
+ cout<<mini<<endl;
33
34
+}
0 commit comments