β€1
int gen_ans(int N, int M, int K, vector<vector<int>> A) {
vector<vector<int>> col(N+1, vector<int>(M));
for(int j=0; j<M; j++)
for(int i=0; i<N; i++)
col[i+1][j] = col[i][j] + (A[i][j] == K);
long long Tot = 0, Freq = 0;
int MaxB = 0;
vector<int> r(M), v(M);
for(int i=0; i<N; i++) for(int k=i+1; k<N; k++){
int h = k - i + 1;
for(int j=0; j<M; j++){
r[j] = (A[i][j] == K && A[k][j] == K);
v[j] = (col[k+1][j] - col[i][j] == h);
}
for(int j=0; j<M; ){
if(!r[j]) { j++; continue; }
int s = j;
while(j<M && r[j]) j++;
int e = j-1, cnt = 0, f = -1, l = -1;
for(int t=s; t<=e; t++) if(v[t]){
if(f<0) f = t;
l = t;
cnt++;
}
if(cnt >= 2){
Tot += 1LL*cnt*(cnt-1)/2;
int w = l - f + 1;
int b = 2*(h + w) - 4;
if(b > MaxB){ MaxB = b; Freq = 1; }
else if(b == MaxB) Freq++;
}
}
}
if(!Tot) return 0;
return Tot ^ MaxB ^ Freq;
}
All passed β
vector<vector<int>> col(N+1, vector<int>(M));
for(int j=0; j<M; j++)
for(int i=0; i<N; i++)
col[i+1][j] = col[i][j] + (A[i][j] == K);
long long Tot = 0, Freq = 0;
int MaxB = 0;
vector<int> r(M), v(M);
for(int i=0; i<N; i++) for(int k=i+1; k<N; k++){
int h = k - i + 1;
for(int j=0; j<M; j++){
r[j] = (A[i][j] == K && A[k][j] == K);
v[j] = (col[k+1][j] - col[i][j] == h);
}
for(int j=0; j<M; ){
if(!r[j]) { j++; continue; }
int s = j;
while(j<M && r[j]) j++;
int e = j-1, cnt = 0, f = -1, l = -1;
for(int t=s; t<=e; t++) if(v[t]){
if(f<0) f = t;
l = t;
cnt++;
}
if(cnt >= 2){
Tot += 1LL*cnt*(cnt-1)/2;
int w = l - f + 1;
int b = 2*(h + w) - 4;
if(b > MaxB){ MaxB = b; Freq = 1; }
else if(b == MaxB) Freq++;
}
}
}
if(!Tot) return 0;
return Tot ^ MaxB ^ Freq;
}
All passed β
Those who need Job in It Companies can check this channel
Join now @Offcampus_000
π₯π₯
Latest Jobs and Internships Updates for 2021,2022, 2023 and 2024, 25 Batch
https://t.me/Offcampus_000
https://t.me/Offcampus_000
Join now @Offcampus_000
π₯π₯
Latest Jobs and Internships Updates for 2021,2022, 2023 and 2024, 25 Batch
https://t.me/Offcampus_000
https://t.me/Offcampus_000
Telegram
Off Campus Updates | AMAZON | IBM | TCS | WIPRO | WILEY EDGE | VIRTUSA | MINDTREE | COGNIZANT
IT Walkins, Off Campus Drives, Walkins, Off Campus Drive & Internship Updates
BE, BTech, ME, MTech, BCA, BSc, MCA, BBA, BBM, MSc, MBA IT Freshers Jobs
Join our group for queries, doubts and discussions
https://t.me/offcampus_000
BE, BTech, ME, MTech, BCA, BSc, MCA, BBA, BBM, MSc, MBA IT Freshers Jobs
Join our group for queries, doubts and discussions
https://t.me/offcampus_000
Placements Help Available ππ
If you also want to crack your current placements
Contact: @ILOVEU_143
Book your slots ASAP
Scroll above and check the work
π― Clearence @Coding_000
Note: It's paidπΆπ€
β Shareβ Shareβ Share β shareβ
If you also want to crack your current placements
Contact: @ILOVEU_143
Book your slots ASAP
Scroll above and check the work
π― Clearence @Coding_000
Note: It's paidπΆπ€
β Shareβ Shareβ Share β shareβ
β€1
Those who want to clear
Book Your Slots Fast.
Contact @ILOVEU_143
100% Clearance Guarantee.
Deltax Exam
Juspay Exam
Amazon Exam
Deshaw Exam
EPAM Exam
Virtuasa Exam
Wipro Exam
Any Oncampus/ Offcampus Exam & Interview Help Available
Book Your Slots Fast.
Contact @ILOVEU_143
100% Clearance Guarantee.
β€2
Done with
IBM EXAM Coding β
or any exam help available π₯π―
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
IBM EXAM Coding β
or any exam help available π₯π―
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
π₯1
100% exam success β Amazon, IBM, any company. We take laptop access and handle everything.
Text anytime
βClear any exam guaranteed!
Amazon, IBM, any platform β we do it for you. 24/7 helpπ―
Need to pass exams? We guarantee 100% successβ π¨βπ»
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
Laptop access support β Amazon, IBM & more ππ
Text anytime
βClear any exam guaranteed!
Amazon, IBM, any platform β we do it for you. 24/7 helpπ―
Need to pass exams? We guarantee 100% successβ π¨βπ»
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
Laptop access support β Amazon, IBM & more ππ
β€1
https://ibmglobal.avature.net/en_US/careers/JobDetail/Data-Engineer-Data-Integration/14906
Need help Dm - @iloveu_143 β
100% clearance guarantee π₯π₯
Need help Dm - @iloveu_143 β
100% clearance guarantee π₯π₯
β€1
TECH Mahindra Exam
Round 1 & 2
Help available.π¨βπ»
100% Clearance GUARANTEE.β
Check our past Results. ππ
https://t.me/Coding_000/5567?single
https://t.me/Coding_000/5563?single
Contact @ILOVEU_143 β
Round 1 & 2
Help available.π¨βπ»
100% Clearance GUARANTEE.β
Check our past Results. ππ
https://t.me/Coding_000/5567?single
https://t.me/Coding_000/5563?single
Contact @ILOVEU_143 β
Done with
WIPRO EXAM MCQ & Coding β
or any exam help available π₯π―
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
WIPRO EXAM MCQ & Coding β
or any exam help available π₯π―
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
β€2π₯1π₯°1
Done with
IBM EXAM BOTH Coding β
or any exam help available π₯π―
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
IBM EXAM BOTH Coding β
or any exam help available π₯π―
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
β€1π₯°1
For Beginners with No Experience: Want to add something impactful to your resume? Try contributing to open-source projects!
π Check this out: [https://forgoodfirstissue.github.com/](https://forgoodfirstissue.github.com/)
You can fix beginner-friendly issues in languages like Python, C, etc. Once your contributions get approved, you can add them to your resume under "Open-Source Contributions" or "Projects"!
Great way to gain real-world experience and showcase your skills. π
π Check this out: [https://forgoodfirstissue.github.com/](https://forgoodfirstissue.github.com/)
You can fix beginner-friendly issues in languages like Python, C, etc. Once your contributions get approved, you can add them to your resume under "Open-Source Contributions" or "Projects"!
Great way to gain real-world experience and showcase your skills. π
π1
100% exam success β Amazon, IBM, any company. We take laptop access and handle everything.
Text anytime
βClear any exam guaranteed!
Amazon, IBM, any platform β we do it for you. 24/7 helpπ―
Need to pass exams? We guarantee 100% successβ π¨βπ»
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
Laptop access support β Amazon, IBM & more ππ
Text anytime
βClear any exam guaranteed!
Amazon, IBM, any platform β we do it for you. 24/7 helpπ―
Need to pass exams? We guarantee 100% successβ π¨βπ»
Book your slot
Contact here @ILOVEU_143β€οΈ
100% clearance guarantee π₯π₯
Laptop access support β Amazon, IBM & more ππ
Dm @ILOVEU_143β
For Coding Help or Any Exam Help π
π― Clearance β
Check the previous proofs ππ
Contact @ILOVEU_143 π¨βπ»
Note: it's paid help
π― Clearance and genuine helpπβοΈ
Scroll up and check all proofs we helpedππ¨βπ»
Share @Coding_000β€οΈ
For Coding Help or Any Exam Help π
π― Clearance β
Check the previous proofs ππ
Contact @ILOVEU_143 π¨βπ»
Note: it's paid help
π― Clearance and genuine helpπβοΈ
Scroll up and check all proofs we helpedππ¨βπ»
Share @Coding_000β€οΈ
β€2