From 8f3070f32aaf2a5ab2e8b06ec3c036ffc620569e Mon Sep 17 00:00:00 2001 From: venkyvt7 Date: Fri, 2 Oct 2020 21:27:08 +0530 Subject: [PATCH] added 1367B. --- Codeforces/1367B.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Codeforces/1367B.cpp diff --git a/Codeforces/1367B.cpp b/Codeforces/1367B.cpp new file mode 100644 index 0000000..e907084 --- /dev/null +++ b/Codeforces/1367B.cpp @@ -0,0 +1,41 @@ +#include + +using namespace std; + +int main() +{ + int t; + cin>>t; + while(t--) + { + int n,i,j,k; + int a[10000]; + + cin>>n; + + int even=0,odd=0; + for(i=0;i>a[i]; + + if(a[i]%2!=i%2) + { + if(a[i]%2==0) + even++; + + else + odd++; + + + } + } + + if(even==odd) + cout<