We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dd58e7b commit bd3085dCopy full SHA for bd3085d
1154A.cpp
@@ -0,0 +1,13 @@
1
+#include<iostream>
2
+#include<algorithm>
3
+using namespace std;
4
+
5
+int main(){
6
+ int v1[100];
7
+ for(int i=0;i<4;i++){
8
+ cin>>v1[i];
9
+ }
10
+ sort(v1,v1+4);
11
+ cout << v1[3]-v1[0] << " " << v1[3]-v1[1] << " " << v1[3]-v1[2] << endl;
12
13
+}
96A.cpp
@@ -0,0 +1,26 @@
+//#include<conio.h>
+ string s1;
+ cin>>s1;
+ int i;
+ int ones;
+ int zeros;
+ bool flag;
14
+ for(i =0;i<s1.length();i++){
15
+ ones = count(s1.begin()+i,s1.begin()+i+7,'1');
16
+ zeros = count(s1.begin()+i,s1.begin()+i+7,'0');
17
+ if(ones >= 7 || zeros >= 7){
18
+ flag =true;
19
20
21
+ if(flag){
22
+ cout<<"YES"<<endl;
23
+ }else{
24
+ cout<<"NO"<<endl;
25
26
0 commit comments