-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCodare date.cpp
More file actions
51 lines (44 loc) · 998 Bytes
/
Copy pathCodare date.cpp
File metadata and controls
51 lines (44 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include<iostream>
#include<vector>
#include<string.h>
#include<algorithm>
using namespace std;
int main(){
uint64_t n;
uint64_t nr;
uint64_t aux;
vector<int>vec;
vector<int>sum;
int suma=0;
cin>>n;
for(int i=0;i<n;i++){
for(int j=0;j<7;j++){
cin>>nr;
vec.push_back(nr);
}
for(int j=0;j<vec.size()-1;j++){
aux=vec[j];
vec[j]=vec[j+1];
vec[j+1]=aux;
j++;
}
for(int j=1;j<vec.size();j++){
vec[j]%=2;
//cout<<vec[j]<<' ';
}
for(int j=0;j<vec.size();j++){
suma+=vec[j];
}
sum.push_back(suma);
suma=0;
vec.clear();
}
int max=0;
for(int i=0;i<sum.size();i++){
//cout<<sum[i]<<' ';
if(sum[i]>max){
max=sum[i];
}
}
cout<<max;
}