diff --git a/hard/day_12/solution.cpp b/hard/day_12/solution.cpp index 8d3ad8d..328bf13 100644 --- a/hard/day_12/solution.cpp +++ b/hard/day_12/solution.cpp @@ -1 +1,32 @@ -//write your code here \ No newline at end of file +#include +using namespace std; + +int main() +{ + int t; + cin >> t; + while(t--) + { + int n; + cin >> n; + int arr[n]; + for(int i=0; i> arr[i]; + if(i % 2 == 0) + { + arr[i] = (arr[i] % 2 == 0) ? arr[i] : arr[i] + 1; + } + else + { + arr[i] = (arr[i] % 2 != 0) ? arr[i] : arr[i] + 1; + } + } + + for(int i=0; i