COGNIZANT EXAM HELP GROUP
3.55K subscribers
5.3K photos
21 videos
10 files
3.22K links
๐Ÿš€ Placement Preparation Hub

๐ŸŽ“ From Preparation to Placement

โšก OA Support โ€ข Coding โ€ข Aptitude โ€ข Technical โ€ข HR

๐ŸŒŸ Trusted by Hundreds of Students

๐Ÿ† 372+ Placement Successes โœ…

๐Ÿ“ฉ DM: @Mrtrueliving_ix

๐Ÿ’™ Turning Aspirations into Offer Letters.
Download Telegram
#include <bits/stdc++.h>
using namespace std;

int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);

int n, m;
cin >> n >> m;

vector<string> g(n);
for (int i = 0; i < n; i++) {
g[i].resize(m);
for (int j = 0; j < m; j++) cin >> g[i][j];
}

vector<int> hr, vr;
for (int i = 0; i < n; i++) {
if (all_of(g[i].begin(), g[i].end(), [](char c){ return c != '.'; }))
hr.push_back(i);
}
for (int j = 0; j < m; j++) {
bool ok = true;
for (int i = 0; i < n; i++) if (g[i][j] == '.') ok = false;
if (ok) vr.push_back(j);
}

vector<vector<bool>> cross(n, vector<bool>(m));
for (int c : vr)
for (int i = 0; i < n; i++) {
int l = c - 1, r = c + 1;
if (l >= 0 && r < m && g[i][l] == 'C' && g[i][r] == 'C')
cross[i][c] = true;
}
for (int r : hr)
for (int j = 0; j < m; j++) {
int u = r - 1, d = r + 1;
if (u >= 0 && d < n && g[u][j] == 'C' && g[d][j] == 'C')
cross[r][j] = true;
}

vector<vector<bool>> cab(n, vector<bool>(m));
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++)
if (g[i][j] == 'C' || cross[i][j]) cab[i][j] = true;

vector<vector<int>> adj(n * m);
int dx[4] = {-1, 0, 1, 0}, dy[4] = {0, 1, 0, -1};
for (int i = 0; i < n; i++)
for (int j = 0; j < m; j++) {
if (!cab[i][j]) continue;
int id = i * m + j;
for (int d = 0; d < 4; d++) {
int ni = i + dx[d], nj = j + dy[d];
if (ni >= 0 && ni < n && nj >= 0 && nj < m && cab[ni][nj])
adj[id].push_back(ni * m + nj);
}
}

int st = -1;
for (int i = 0; i < n && st == -1; i++)
for (int j = 0; j < m; j++)
if (cab[i][j] && adj[i * m + j].size() == 1) {
st = i * m + j;
break;
}

vector<bool> vis(n * m);
vector<int> sh(n), sv(m);
int cur = st, pre = -1;
vis[cur] = true;

while (true) {
int r = cur / m, c = cur % m, nxt = -1;
for (int nb : adj[cur])
if (nb != pre && !vis[nb]) { nxt = nb; break; }

if (cross[r][c] && pre != -1) {
int pr = pre / m, pc = pre % m, sgn = (g[r][c] == 'C') ? 1 : -1;
if (pr == r) sv[c] += ((pc < c) ? 1 : -1) * sgn;
else sh[r] += ((pr < r) ? 1 : -1) * sgn;
}

if (nxt == -1) break;
pre = cur;
cur = nxt;
vis[cur] = true;
}

long long ans = 0;
for (int r : hr) ans += abs(sh[r]) / 2;
for (int c : vr) ans += abs(sv[c]) / 2;
cout << ans;
return 0;
}

Cable wrap โœ“ @Mrtrueliving_ix
โค2
#include <bits/stdc++.h>
using namespace std;

int minimize_difference(int n, vector<int>& a, int k, vector<int>& b) {
vector<vector<int>> vals(n);
for (int i = 0; i < n; i++) {
set<int> st;
for (int m = 0; m < (1 << k); m++) {
int v = a[i];
for (int j = 0; j < k; j++) if (m & (1 << j)) v ^= b[j];
st.insert(v);
}
vals[i] = vector<int>(st.begin(), st.end());
sort(vals[i].begin(), vals[i].end());
}
vector<pair<int,int>> all;
for (int i = 0; i < n; i++) for (int v : vals[i]) all.emplace_back(v, i);
sort(all.begin(), all.end());
map<int,int> cnt;
int l = 0, d = 0, res = INT_MAX;
for (int r = 0; r < all.size(); r++) {
int val = all[r].first, idx = all[r].second;
if (cnt[idx] == 0) d++;
cnt[idx]++;
while (d == n) {
res = min(res, val - all[l].first);
int li = all[l].second;
cnt[li]--;
if (cnt[li] == 0) d--;
l++;
}
}
return res;
}

int main() {
int n, k;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; i++) cin >> a[i];
cin >> k;
vector<int> b(k);
for (int i = 0; i < k; i++) cin >> b[i];
cout << minimize_difference(n, a, k, b);
return 0;
}

Xor array โœ“
import sys
def solve():
def cbit(c): return '1' if c != ' ' else '0'
def binstr(l1,l2,l3,s): return ''.join(cbit(l1[s+i]) for i in range(3))+''.join(cbit(l2[s+i]) for i in range(3))+''.join(cbit(l3[s+i]) for i in range(3))
def aop(op,b,a=None):
if op=='!': return ''.join('1' if x=='0' else '0' for x in b)
l=max(len(a),len(b)); a=a.zfill(l); b=b.zfill(l)
if op=='||': return ''.join('1' if a[i]=='1' or b[i]=='1' else '0' for i in range(l))
if op=='&&': return ''.join('1' if a[i]=='1' and b[i]=='1' else '0' for i in range(l))
def prec(o1,o2):
p={'&&':1,'||':2,'!':3}
if o2 in '()': return False
return p[o2]>=p[o1]
try:
l1=sys.stdin.readline().rstrip('\n');l2=sys.stdin.readline().rstrip('\n');l3=sys.stdin.readline().rstrip('\n')
l4=sys.stdin.readline().rstrip('\n');l5=sys.stdin.readline().rstrip('\n');l6=sys.stdin.readline().rstrip('\n')
l7=sys.stdin.readline().rstrip('\n');l8=sys.stdin.readline().rstrip('\n');l9=sys.stdin.readline().rstrip('\n')
except: return
dmap={binstr(l1,l2,l3,i*3):str(i) for i in range(10)}
smap={binstr(l4,l5,l6,i*3):s for i,s in enumerate(["||","&&","!","(",")"])}
t=[]; cur=""; i=0
while i*3<len(l7):
s=i*3; b=binstr(l7,l8,l9,s)
if b in dmap: cur+=b
elif b in smap:
if cur: t.append(cur); cur=""
t.append(smap[b])
i+=1
if cur: t.append(cur)
v=[]; o=[]
def op():
x=o.pop()
if x=='!': v.append(aop(x,v.pop()))
else:
b=v.pop(); a=v.pop()
v.append(aop(x,a,b))
for tk in t:
if tk not in ['&&','||','!','(',')']:
v.append(tk)
elif tk=='(':
o.append(tk)
elif tk==')':
while o and o[-1]!='(': op()
if o: o.pop()
else:
while o and prec(tk,o[-1]): op()
o.append(tk)
while o: op()
r=v[0]; ans=""; i=0
while i<len(r):
ch=r[i:i+9]
if ch in dmap: ans+=dmap[ch]
i+=9
print(ans,end="")
solve()

Slove the expression โœ“

@Mrtrueliving_ix @Mrtrueliving_ix
โค5
๐Ÿšจ ONLY 2 HOURS LEFT! ๐Ÿšจ

๐Ÿ’ฏ All Codes Are Accepted & Verified
โšก No Presentation Errors
๐Ÿงฉ Copyโ€“Paste Option Will Be Enabled ONLY After Sharing!

๐Ÿ“ข Share This Message With Maximum People โ€” Help Everyone Clear Their Test!
๐Ÿ”ฅ The More You Share, The Faster Youโ€™ll Get Copyโ€“Paste Access!

๐Ÿ‘‰ Join Now: https://t.me/Code_alphix

#TCSCodeVita #CodeAlphix #FinalHours #VerifiedCodes #CodingChallenge
def f(R, C, ins):
s = [[[r * C + c + 1] for c in range(C)] for r in range(R)]
for t in ins:
if not t:
continue
k, i = t[0], int(t[1:])
if k == 'v':
l = i
rws, cls = len(s), len(s[0])
rgt = cls - l
nc = max(l, rgt)
ns = [[[] for _ in range(nc)] for _ in range(rws)]
for r in range(rws):
for c in range(l):
ncx = nc - (l - c)
if 0 <= ncx < nc:
ns[r][ncx] = list(s[r][c])
for r in range(rws):
for c in range(rgt):
ncx = nc - 1 - c
if 0 <= ncx < nc and l + c < cls:
ns[r][ncx].extend(reversed(s[r][l + c]))
s = ns
elif k == 'h':
tpx = i
rws, cls = len(s), len(s[0])
btm = rws - tpx
nr = max(tpx, btm)
ns = [[[] for _ in range(cls)] for _ in range(nr)]
for r in range(tpx):
nrx = nr - (tpx - r)
if 0 <= nrx < nr:
for c in range(cls):
ns[nrx][c] = list(s[r][c])
for r in range(btm):
nrx = nr - 1 - r
if 0 <= nrx < nr and tpx + r < rws:
for c in range(cls):
ns[nrx][c].extend(reversed(s[tpx + r][c]))
s = ns
tp = bt = None
for r in range(len(s)):
for c in range(len(s[0])):
if s[r][c]:
tp = s[r][c][-1]
bt = s[r][c][0]
return tp, bt

R, C = map(int, input().split())
ins = input().split()
tp, bt = f(R, C, ins)
print(tp, bt, end="")


Folded sheet โœ“ @Mrtrueliving_ix
COGNIZANT EXAM HELP GROUP pinned ยซdef f(R, C, ins): s = [[[r * C + c + 1] for c in range(C)] for r in range(R)] for t in ins: if not t: continue k, i = t[0], int(t[1:]) if k == 'v': l = i rws, cls = len(s), len(s[0]) โ€ฆยป
TCS codevita Help done โœ…

DM for any placement Help โœ“

@Mrtrueliving_ix @Mrtrueliving_ix

5/ 6 Qs solved ๐Ÿค— || ๐Ÿ’ฏ plagfree coding

Order it - A

Code wrap- B

Gravity glide - C

Zoobin - D

Solve the expression
- F

Only accepted codes ๐Ÿ˜Žโค๏ธ๐ŸคŸ

No presentation errors โŒโŒโŒ

#TCS #codevita #Offcampus
๐Ÿš€ Get Ready to Crack Your Dream IT Job! ๐Ÿ’ผ๐Ÿ’ป


Follow ๐Ÿ‡ฎ๐Ÿ‡ณ </>Code_icons๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ’ฏโ„ข on WhatsApp ๐Ÿ‘‡
๐Ÿ”—


https://whatsapp.com/channel/0029VahiS3p2v1IyoS891Y1g


๐Ÿ’ฅ WhatsApp Groups:
๐Ÿ‘จโ€๐ŸŽ“ Only 2026 Batch:

๐Ÿ‘‰
https://chat.whatsapp.com/ITQk5mtVLdw4uXRyWYKNsT?mode=wwt

๐ŸŽ“ Upto 2025 Batch:

๐Ÿ‘‰
https://chat.whatsapp.com/K5I2JqrGT500M3Nt0rM6As?mode=wwt


๐Ÿ”ฅ Join for:
๐Ÿ’ฅ Super-fast job updates
๐Ÿ“ข Company test patterns & interview tips
๐Ÿ’ฌ Doubt clarification & discussion
๐Ÿ“ˆ Placement guidance and resources

๐ŸŽฏ Stay ahead โ€” Learn, Practice, and Get Placed!
#CodeIcons #JobUpdates #AccentureTest #PlacementPrep
Need codes
Anonymous Poll
29%
Zoobin
71%
Box game
#include <bits/stdc++.h>
using namespace std;

int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int a;
cin >> a;
vector<pair<int,int>> b(a), c(a);
set<int> d;
for (int i = 0; i < a; i++) {
cin >> b[i].first >> b[i].second;
d.insert(b[i].first);
d.insert(b[i].second);
}
for (int i = 0; i < a; i++) cin >> c[i].first >> c[i].second;
vector<int> e(d.begin(), d.end());
auto f = [](vector<pair<int,int>> g) {
for (auto& [h, i] : g) if (h > i) swap(h, i);
sort(g.begin(), g.end());
return g;
};
auto j = [](const vector<pair<int,int>>& k) {
string l;
for (auto [m, n] : k) l += to_string(m) + "-" + to_string(n) + ",";
return l;
};
vector<pair<int,int>> o = f(c);
string p = j(o);
vector<pair<int,int>> q = f(b);
string r = j(q);
if (r == p) {
cout << 0;
return 0;
}
map<string,int> s;
queue<pair<vector<pair<int,int>>,int>> t;
t.push({q,0});
s[r] = 0;
while (!t.empty()) {
auto [u,v] = t.front();
t.pop();
map<int,vector<int>> w;
for (auto [x,y] : u) {
w[x].push_back(y);
w[y].push_back(x);
}
set<vector<int>> z;
for (int aa : e) {
function<void(int,int,vector<int>&,set<int>&)> ab = [&](int ac,int ad,vector<int>& ae,set<int>& af) {
ae.push_back(ac);
af.insert(ac);
for (int ag : w[ac]) {
if (ag == ad) continue;
if (af.count(ag)) {
auto ah = find(ae.begin(), ae.end(), ag);
if (ah != ae.end()) {
vector<int> ai(ah, ae.end());
if (ai.size() >= 3) {
int aj = min_element(ai.begin(), ai.end()) - ai.begin();
rotate(ai.begin(), ai.begin() + aj, ai.end());
z.insert(ai);
}
}
} else if (ae.size() < e.size()) ab(ag, ac, ae, af);
}
ae.pop_back();
af.erase(ac);
};
vector<int> ak;
set<int> al;
ab(aa, -1, ak, al);
}
for (const auto& am : z) {
map<int,int> an;
for (int ao : e) an[ao] = ao;
int ap = am.size();
for (int aq = 0; aq < ap; aq++) an[am[aq]] = am[(aq + 1) % ap];
vector<pair<int,int>> ar;
for (auto [as, at] : u) ar.push_back({an[as], an[at]});
ar = f(ar);
string au = j(ar);
if (au == p) {
cout << v + 1;
return 0;
}
if (!s.count(au)) {
s[au] = v + 1;
t.push({ar, v + 1});
}
}
}
cout << -1;
return 0;
}

Zoobin โœ“ @Mrtrueliving_ix
๐Ÿšจ Infosys SE - ONCAMPUS Slots Open! ๐Ÿšจ


๐Ÿ’ป Access from Computer Lab
๐ŸŽฏ For those aiming for 100% Test Clearance

โœ… Book your slots now!
@Mrtrueliving_ix @Mrtrueliving_ix

๐Ÿ’ฐ Note:
If access to the Computer Lab is not provided, then 75% of the amount will be refunded.
Placement exams Help available....


=> Accenture - ONCAMPUS { ๐Ÿ’ฏ Success}

=> Infosys - ONCAMPUS

=> Infosys edgeverve

=> Epam

=> IBM - offline - coding

=> Wayfair

=> Adobe

=> Eurofins

=> Hcl Offcampus - R2


Those who need ๐Ÿ’ฏ test Clearance

DM
@Mrtrueliving_ix @Mrtrueliving_ix

Test Clearance Guarantee ๐Ÿ˜Ž


๐Ÿ“Œ Check the pinned message ๐Ÿ“„ to see success stories & proofs of our past placement assistance ๐Ÿ’ฏ๐Ÿš€
๐ŸŽ‰2
๐Ÿ“˜ Infosys ONCAMPUS Test Pattern ๐Ÿ“˜


Here are the key concepts to focus on....
Be well prepared according to this and aim for ๐Ÿ’ฏ test clearance!
Company: IBM

Role : Associate System Engineer

{ CIC HIRING}

Batch : 2025

Apply link ๐Ÿ–‡๏ธ
https://ibmglobal.avature.net/en_US/careers/JobDetail/Associate-System-Engineer/66789
All Placement Exam's Help Available

@Mrtrueliving_ix @Mrtrueliving_ix
Infosys edgeverve Help Available ๐ŸŽฏ

@Mrtrueliving_ix @Mrtrueliving_ix

Only plagfree codingโœ“

Previous helping proofs

https://t.me/Code_alphix/6752?single

https://t.me/Code_alphix/6753

https://t.me/Code_alphix/6777
Edgeverve codes are available

suffixQueriesโœ“


Playing with arrays โœ“


@Mrtrueliving_ix @Mrtrueliving_ix
Done โœ