#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
int n;
cin >> n;
vector<int> A(n);
for (int i = 0; i < n; ++i) {
cin >> A[i];
}
vector<int> even, odd;
for (int i = 0; i < n; ++i) {
if (A[i] % 2 == 0) {
even.push_back(A[i]);
} else {
odd.push_back(A[i]);
}
}
sort(even.begin(), even.end());
sort(odd.begin(), odd.end());
long long validPairs = 0;
for (int i = 0; i < odd.size(); ++i) {
validPairs += even.end() - upper_bound(even.begin(), even.end(), odd[i]);
}
for (int i = 0; i < even.size(); ++i) {
validPairs += odd.end() - upper_bound(odd.begin(), odd.end(), even[i]);
}
cout << validPairs << endl;
}
return 0;
}
Pair Validity โ
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
int n;
cin >> n;
vector<int> A(n);
for (int i = 0; i < n; ++i) {
cin >> A[i];
}
vector<int> even, odd;
for (int i = 0; i < n; ++i) {
if (A[i] % 2 == 0) {
even.push_back(A[i]);
} else {
odd.push_back(A[i]);
}
}
sort(even.begin(), even.end());
sort(odd.begin(), odd.end());
long long validPairs = 0;
for (int i = 0; i < odd.size(); ++i) {
validPairs += even.end() - upper_bound(even.begin(), even.end(), odd[i]);
}
for (int i = 0; i < even.size(); ++i) {
validPairs += odd.end() - upper_bound(odd.begin(), odd.end(), even[i]);
}
cout << validPairs << endl;
}
return 0;
}
Pair Validity โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Tech Mahindra - Ahmedabad, Fresher Hiring - Manual Testing
https://docs.google.com/forms/d/e/1FAIpQLSdBZCPr-OzAxa1_mwOzuPU5v2PB8T5tg9J1_QqR6pzE94AHiA/viewform
https://docs.google.com/forms/d/e/1FAIpQLSdBZCPr-OzAxa1_mwOzuPU5v2PB8T5tg9J1_QqR6pzE94AHiA/viewform
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <unordered_set>
#include <string>
using namespace std;
bool isSplendid(string num) {
unordered_set<char> splendid_digits = {'0', '1', '6', '8', '9'};
unordered_map<char, char> rotation_map = {{'0', '0'}, {'1', '1'}, {'6', '9'}, {'8', '8'}, {'9', '6'}};
string rotated_num = "";
for (int i = num.size() - 1; i >= 0; i--) {
if (splendid_digits.find(num[i]) == splendid_digits.end()) {
return false;
}
rotated_num += rotation_map[num[i]];
}
return num == rotated_num;
}
int countSplendidNumbers(string low, string high) {
int count = 0;
for (int i = stoi(low); i <= stoi(high); i++) {
if (isSplendid(to_string(i))) {
count++;
}
}
return count;
}
int main() {
string low, high;
cin >> low >> high;
cout << countSplendidNumbers(low, high) << endl;
return 0;
}
Natasha's hobby โ
#include <unordered_set>
#include <string>
using namespace std;
bool isSplendid(string num) {
unordered_set<char> splendid_digits = {'0', '1', '6', '8', '9'};
unordered_map<char, char> rotation_map = {{'0', '0'}, {'1', '1'}, {'6', '9'}, {'8', '8'}, {'9', '6'}};
string rotated_num = "";
for (int i = num.size() - 1; i >= 0; i--) {
if (splendid_digits.find(num[i]) == splendid_digits.end()) {
return false;
}
rotated_num += rotation_map[num[i]];
}
return num == rotated_num;
}
int countSplendidNumbers(string low, string high) {
int count = 0;
for (int i = stoi(low); i <= stoi(high); i++) {
if (isSplendid(to_string(i))) {
count++;
}
}
return count;
}
int main() {
string low, high;
cin >> low >> high;
cout << countSplendidNumbers(low, high) << endl;
return 0;
}
Natasha's hobby โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐จLatest Job Opening Update - Internship, Jobs for Freshers and remote jobs are available
Company - EY
Role - Data-Science Intern
Exp - Fresher
Apply Now - https://www.thejob.dev/job/6666b7536d44e0b71d461f29
Company - Quantum Leap Learning Solutions Pvt Ltd
Role - Data Analytics Intern
Exp - Fresher
Apply Now - https://www.linkedin.com/jobs/view/3946886316
Company - NextGen Technologies
Role - Data Science Intern
Exp - Fresher
Apply Now - https://www.linkedin.com/jobs/view/3947460222
Company - Hypersonix Inc.
Role - Data Scientist
Exp - 0-2 Yrs
Apply Now - https://www.linkedin.com/jobs/view/3942751190/
Company - Caterpillar Inc.
Role - Data Scientist
Exp - 0-2 Years
Apply Now - https://www.linkedin.com/jobs/view/3947079671
Company - EY
Role - Data-Science Intern
Exp - Fresher
Apply Now - https://www.thejob.dev/job/6666b7536d44e0b71d461f29
Company - Quantum Leap Learning Solutions Pvt Ltd
Role - Data Analytics Intern
Exp - Fresher
Apply Now - https://www.linkedin.com/jobs/view/3946886316
Company - NextGen Technologies
Role - Data Science Intern
Exp - Fresher
Apply Now - https://www.linkedin.com/jobs/view/3947460222
Company - Hypersonix Inc.
Role - Data Scientist
Exp - 0-2 Yrs
Apply Now - https://www.linkedin.com/jobs/view/3942751190/
Company - Caterpillar Inc.
Role - Data Scientist
Exp - 0-2 Years
Apply Now - https://www.linkedin.com/jobs/view/3947079671
The Job
Strategy and Transactions (SaT)โ DnA Data-Science Intern at EY | Full-time | On-site | Bengaluru, India
Join EY's Data n' Analytics team as a Strategy and Transactions (SaT)โ DnA Data-Science Intern. Assist in developing solutions using machine learning and data science. Collaborate with cross-functional teams to deliver business solutions and reports summarizingโฆ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
We are hiring freshers!
Position - Fresher
Skills - Data Science & Python
Education - B.Tech /BE / B.Sc ( Mathematics or Statistics) / M.Tech / ME
Location - Kolkata (Work from office)
Interview Mode - Face to Face in Kolkata.
Looking for immediate joiners who can join us at the earliest.
Requirements:-
1. Looking for candidates who has completed their education in 2022 or 2023.
2. Educational details with Marks, Year of Passing, Board and it should be 10th onwards.
3. Should have min 60% throughout in education
4. The CV should contain the following details - Photograph, DOB, Address, Education details with percentage and pass out in which year,
5. Working Experience with from and to.
Interested candidate are requested to share their resumes at soumyadipta.maity@itcinfotech.com .
Please share the resume in the below mentioned format.
Name
Highest Education
Year of Pass out
Percentage achieved
Current location
Degree certificate received (Yes/No)
Available for Face-to-Face interview (Yes/No)
Can join immediately (Yes/No)
Position - Fresher
Skills - Data Science & Python
Education - B.Tech /BE / B.Sc ( Mathematics or Statistics) / M.Tech / ME
Location - Kolkata (Work from office)
Interview Mode - Face to Face in Kolkata.
Looking for immediate joiners who can join us at the earliest.
Requirements:-
1. Looking for candidates who has completed their education in 2022 or 2023.
2. Educational details with Marks, Year of Passing, Board and it should be 10th onwards.
3. Should have min 60% throughout in education
4. The CV should contain the following details - Photograph, DOB, Address, Education details with percentage and pass out in which year,
5. Working Experience with from and to.
Interested candidate are requested to share their resumes at soumyadipta.maity@itcinfotech.com .
Please share the resume in the below mentioned format.
Name
Highest Education
Year of Pass out
Percentage achieved
Current location
Degree certificate received (Yes/No)
Available for Face-to-Face interview (Yes/No)
Can join immediately (Yes/No)
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Looking for 2024 and 2023 batch engineering graduates for Software Trainee role. Job location: Chennai/Bangalore/Pune/Mumbai/Hyderabad.
If your profile matches kindly share your resumes to info@codingking.in
If your profile matches kindly share your resumes to info@codingking.in
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
At Huddle Ventures, we are in the hunt of an exceptional Investment Fellow (remote) to join us for 3-6 months.
If you are someone who is undergoing their undergraduate program and is driven by inquisitiveness and well crafted research, come work alongside the core team to help us identify and grow the next set of relentless founders and businesses.
Apply here: https://docs.google.com/forms/d/e/1FAIpQLSeEtsT_xzf-ZEKe8cbmvSD9HCJX97Fi3PIghJP4IiBBy-SOzQ/viewform?usp=send_form&_sm_nck=1
Application Deadline: 16th June, 2024
Pre-Requisite: Must be currently enrolled in an Undergraduate program.
If you are someone who is undergoing their undergraduate program and is driven by inquisitiveness and well crafted research, come work alongside the core team to help us identify and grow the next set of relentless founders and businesses.
Apply here: https://docs.google.com/forms/d/e/1FAIpQLSeEtsT_xzf-ZEKe8cbmvSD9HCJX97Fi3PIghJP4IiBBy-SOzQ/viewform?usp=send_form&_sm_nck=1
Application Deadline: 16th June, 2024
Pre-Requisite: Must be currently enrolled in an Undergraduate program.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
gradCapital | Internship | 2024, 2025, 2026 Batches
https://www.linkedin.com/posts/prateekbehera96_gradcapital-is-looking-for-interns-we-activity-7206273822965026897-aq1G?utm_source=share&utm_medium=member_android
https://www.linkedin.com/posts/prateekbehera96_gradcapital-is-looking-for-interns-we-activity-7206273822965026897-aq1G?utm_source=share&utm_medium=member_android
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Revature Recruitment 2024 Details :
Job Role
Software Engineer
Education
BE/B.Tech/MCA/MSC
Batch
2024/2023
CTC : 4 to 6 Lpa
Apply link ;
https://revature.com/apply/
Job Role
Software Engineer
Education
BE/B.Tech/MCA/MSC
Batch
2024/2023
CTC : 4 to 6 Lpa
Apply link ;
https://revature.com/apply/
Revature
Apply Now | Turn One Day Into Day One
Apply effortlessly for a brighter future. Start your journey to turning your one day into day one today.
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Caterpillar is hiring for IT ANALYST I
Expected Salary: 5-10 LPA
Apply here:
https://careers.caterpillar.com/en/jobs/job/r0000260274-it-analyst-i/
Expected Salary: 5-10 LPA
Apply here:
https://careers.caterpillar.com/en/jobs/job/r0000260274-it-analyst-i/
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: WayFair
๐ Job Title: Software Engineering Intern
โ๐ป YOE: 2025 and 2026 grads
โก๏ธ Apply: https://www.wayfair.com/careers/job/software-engineering-intern/7063610002/apply
Please do share in your college grps and in case you are applying please react on this post:) ๐โค๏ธ
๐ Job Title: Software Engineering Intern
โ๐ป YOE: 2025 and 2026 grads
โก๏ธ Apply: https://www.wayfair.com/careers/job/software-engineering-intern/7063610002/apply
Please do share in your college grps and in case you are applying please react on this post:) ๐โค๏ธ
Wayfair
Wayfair Careers | Apply Now
WayfairCareersDescription
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
While 1000 people apply for Software Engineering positions, only about 100 apply for ML and AI opportunities. With ML and AI industries booming, now is the perfect time give it a try and build a great career in this field.
If you're confused about what to learn, you can join this webinar.
Link: https://bit.ly/4aUz3W5 (itโs totally free)
P.S: Give it a try for better opportunities in the future, register as soon as possible before itโs closed.
If you're confused about what to learn, you can join this webinar.
Link: https://bit.ly/4aUz3W5 (itโs totally free)
P.S: Give it a try for better opportunities in the future, register as soon as possible before itโs closed.
lu.ma
Roadmap for a Minor in Machine Learning (ML) from IIT for Better Placement Opportunities ยท Zoom ยท Luma
In this live online session professors from IIT Mandi will guide students on getting a Minor in Machine Learning (ML) from IIT
This will also allow you to getโฆ
This will also allow you to getโฆ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
#include<bits/stdc++.h> using namespace std; typedef long long ll; ll solve(ll n) { string s=""; ll mod=1e9+7; bool f=0; for(ll i=0;i<n;i++) { if(f==0) {s+='0'; f=1;} else {s+='1'; f=0;} } //cout<<s<<endl; llโฆ
MOD = 10**9 + 7
def consistent_subsequences(N):
dp_no_consec = [0] * (N + 1)
dp_with_consec = [0] * (N + 1)
dp_no_consec[1] = 1
for i in range(2, N + 1):
dp_no_consec[i] = (dp_no_consec[i - 1] + dp_with_consec[i - 1] + 1) % MOD
dp_with_consec[i] = dp_no_consec[i - 1] % MOD
result = (dp_no_consec[N] + dp_with_consec[N]) % MOD
return result
Consistent Data โ
def consistent_subsequences(N):
dp_no_consec = [0] * (N + 1)
dp_with_consec = [0] * (N + 1)
dp_no_consec[1] = 1
for i in range(2, N + 1):
dp_no_consec[i] = (dp_no_consec[i - 1] + dp_with_consec[i - 1] + 1) % MOD
dp_with_consec[i] = dp_no_consec[i - 1] % MOD
result = (dp_no_consec[N] + dp_with_consec[N]) % MOD
return result
Consistent Data โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: IndMoney
๐ Job Title: Software Engineer
โ๐ป YOE: 2022 and 2023 grads
โก๏ธ Apply: https://docs.google.com/forms/d/e/1FAIpQLScaucx8sC5fX-saowlTitrUB4RUXyXT6UkQoH79Ef0RRAohAg/viewform
Please do share in your college grps and in case you are applying please react on this post:) ๐โค๏ธ
๐ Job Title: Software Engineer
โ๐ป YOE: 2022 and 2023 grads
โก๏ธ Apply: https://docs.google.com/forms/d/e/1FAIpQLScaucx8sC5fX-saowlTitrUB4RUXyXT6UkQoH79Ef0RRAohAg/viewform
Please do share in your college grps and in case you are applying please react on this post:) ๐โค๏ธ