My set included:
Election
Binary equivalent
Jogging ground
Largest Gold Ingot
Zoo design
Subnetting
Out of which i was able to do:
Elections
Largest Gold Ingot
Zoo design
My set included:
Election
Binary equivalent
Jogging ground
Largest Gold Ingot
Zoo design
Subnetting
Out of which i was able to do:
Elections
Largest Gold Ingot
Zoo design
If anyone did “Odd Even” or “Fill the Cube” question and got accepted/presentation error in private test case, kindly share your solution…
yes
i tried this
import java.util.*;
class Program {
static void rotatematrix(int m, int n, int mat[][], int [] rotations) {
int mainRow = 0; int mainCol = 0;
for(int rotation=0;rotation<rotations.length;rotation++){
int dir = rotations[rotation];
if((rotation+1)%2 !=0) dir = -dir;
for(int i=1;i<=Math.abs(dir);i++){
int k=dir>0?i:-i;
int row = mainRow; int col = mainCol;
if(k>0)rotateClockWise(row, col, mat, m, n);
if(k<0)rotateAntiClockWise(row, col, mat, m, n);
}
mainRow++; mainCol++;
m--; n--;
}
}
static void rotateAntiClockWise(int row, int col, int [][] mat, int m, int n){
int prev = mat[row][col+1];
int curr = 0;
for (int i = row; i < m; i++) {
curr = mat[i][col];
mat[i][col] = prev;
prev = curr;
}
col++;
for (int i = col; i < n; i++) {
curr = mat[m-1][i];
mat[m-1][i] = prev;
prev = curr;
}
m--;
if (col < n) {
for (int i = m-1; i >= row; i--) {
curr = mat[i][n-1];
mat[i][n-1] = prev;
prev = curr;
}
}
n--;
if (row < m) {
for (int i = n-1; i >= col; i--) {
curr = mat[row][i];
mat[row][i] = prev;
prev = curr;
}
}
row++;
}
static void rotateClockWise(int row, int col, int [][] mat, int m, int n){
int prev = mat[row + 1][col];
int curr = 0;
for (int i = col; i < n; i++) {
curr = mat[row][i];
mat[row][i] = prev;
prev = curr;
}
row++;
for (int i = row; i < m; i++) {
curr = mat[i][n-1];
mat[i][n-1] = prev;
prev = curr;
}
n--;
if (row < m) {
for (int i = n-1; i >= col; i--) {
curr = mat[m-1][i];
mat[m-1][i] = prev;
prev = curr;
}
}
m--;
if (col < n) {
for (int i = m-1; i >= row; i--) {
curr = mat[i][col];
mat[i][col] = prev;
prev = curr;
}
}
col++;
}
public static void main(String[] args) {
int a[][] = {
{1, 2, 3, 4},
{2, 3, 4, 5},
{2, 4, 5, 6},
{2, 3, 4, 5}
};
int m = a.length;
int n = a[0].length;
rotatematrix(m, n, a, new int []{2,2});
for (int i = 0; i < a.length; i++) {
for (int j = 0; j < a[0].length; j++)
System.out.print( a[i][j] + " ");
System.out.print("\n");
}
}
}
Any idea when will they reveal zone-2 results? They revealed results of zone-1 quickly.
It’s not a competitive programming contest. It’s a contest to test how much BS one can absorb without a mental breakdown. 
do ask if are not able to understand something mainly i used the app that i found out the days we can leave and found the min value by this method
dp[i] =a[i]
if(i>k)
dp[i] = a[i]+min(dp[i-1]----dp[i-k])
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define N 100005
#define MOD 1000000007
#define dd double
#define vi vector<int>
#define vll vector<ll>
#define forr(i, n) for(int i = 0; i < n; i++)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep1(i,b) for(int i=1;i<=b;i++)
#define pb push_back
#define mp make_pair
#define clr(x) x.clear()
#define sz(x) ((int)(x).size())
#define ms(s, n) memset(s, n, sizeof(s))
#define F first
#define S second
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(),v.rend()
#define int ll
ll po(ll a, ll x, ll m) { if (x == 0) {return 1;} ll ans = 1; ll k = 1; while (k <= x) {if (x & k) {ans = ((ans * a) % m);} k <<= 1; a *= a; a %= m; } return ans; }
int query(int *tree, int index, int s, int e, int qs, int qe) {
if (qs > e || qe < s) {
return 1e18;
}
if (qs <= s && qe >= e) {
return tree[index];
}
int mid = (s + e) / 2;
int leftAns = query(tree, 2 * index, s, mid, qs, qe);
int rightAns = query(tree, 2 * index + 1, mid + 1, e, qs, qe);
return min(leftAns, rightAns);
}
void updateNode(int *tree, int index, int s, int e, int i, int inc) {
if (i < s || i > e) {
return;
}
if (s == e) {
tree[index] += inc;
return;
}
int mid = (s + e) / 2;
updateNode(tree, 2 * index, s, mid, i, inc);
updateNode(tree, 2 * index + 1, mid + 1, e, i, inc);
tree[index] = min(tree[2 * index], tree[2 * index + 1]);
return;
}
void buildTree(int *tree, int *a, int index, int s, int e) {
if (s == e) {
tree[index] = a[s];
return;
}
if (s > e) {
return;
}
int mid = (s + e) / 2;
buildTree(tree, a, 2 * index, s, mid);
buildTree(tree, a, 2 * index + 1, mid + 1, e);
tree[index] = min(tree[2 * index], tree[2 * index + 1]);
}
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, w, d;
cin >> n >> w >> d;
if (n == 0) {
cout << "Both are right";
return 0;
}
int a[n];
forr(i, n) {
cin >> a[i];
}
int dp2[n];
int tot = 0;
forr(i, n) {
dp2[i] = a[i];
tot += a[i];
}
int t[4 * n + 1];
//ms(t, 0);
buildTree(t, a, 1, 0, n - 1);
//cout << query(t, 1, 0, n - 1, 4, n - 2) << "\n";
int k = w + 1;
for (int i = k; i < n; i++) {
int qs = query(t, 1, 0, n - 1, i - k, i - 1);
updateNode(t, 1, 0, n - 1, i, qs);
}
int ans1;
if (k <= n)
ans1 = query(t, 1, 0, n - 1, n - k, n - 1);
else
ans1 = 0;
k = w + d + 1;
int t2[4 * n + 1];
buildTree(t2, a, 1, 0, n - 1);
for (int i = k; i < n; i++) {
//cout << i - k << " " << i - 1 << "\n";
int qs = query(t2, 1, 0, n - 1, i - k, i - 1);
//dp2[i] += qs;
updateNode(t2, 1, 0, n - 1, i, qs);
}
int ans2;
if (k <= n)
ans2 = query(t2, 1, 0, n - 1, n - k, n - 1);
else
ans2 = 0 ;
//cout << ans1 << " " << ans2 << "\n";
ans1 = tot - ans1;
ans2 = tot - ans2;
//cout << ans1 << " " << ans2 << "\n";
int ans = abs(ans1 - ans2);
if (ans1 > ans2) {
cout << "Wrong " << ans << "\n";
} else if (ans2 > ans1) {
cout << "Right " << ans << "\n";
} else {
cout << "Both are right\n";
}
return 0;
}
“May be I’m a bad coder or may be I’ve a hard luck”. I’m pretty sure that the former is true.
Questions were easy compared to codechef challenges.Statements and explanation were not clear.
I think for even odd, testcase were wrong.
Answer of even odd was a single formula.
(even+odd)^k + (even-odd)^k
It gives no of ways to choose even times of odd numbers and rest even numbers.
Coz sum of even times odd is always even and sum of two even no is always even.
Yes That was incorrect
I wasted so much time due to given sample cases in that question.
Same set empty graph.
Yes , I got that.
It was the only problem that I was able to solve out of 6 problems 
Don’t know whether qualify or not
Yes I also want to write about this in the feedback section but due to word limit, I couldn’t write much.
Atleast problems should be correct and provided sample test cases should be correct if they are conducting a national level contest.
In Path through graphs question, there is no need of creating a graph. You just need to find GCD of a and b. Basically, the two given numbers will merge at the GCD(a,b). After that, you can just take two for loops to determine the length of the path.
How does this work for (2, 6)?
hats-off to you for trans-coding that meme into emoji 
So, the test cases was wrong ?? I wasted 3 hrs thinking about the solution
what does solved partially mean . i think codevita will not consider public test cases
Don’t worry bro problem statements are actually messy and confusing (i feel like).Keep practicing u will get better and more options as than TCS. 