The Bitwise Equation โ
Oracle
Oracle
#include <iostream>
#include <vector>
#include <cmath>
#define MOD 1000000007
#define ll long long
#define vll vector<long long>
using namespace std;
ll solve(ll n) {
vll v(n + 1);
v[1] = 2;
v[2] = 9;
for (int i = 3; i <= n; i++) {
v[i] = (4LL * v[i - 1] % MOD - v[i - 2] + 2 * (ll)pow(-1, i)) % MOD;
v[i] = (v[i] + MOD) % MOD;
}
return v[n];
}
vll ways(const vll &nvalues) {
vll results;
for (const auto &n : nvalues) {
results.push_back(solve(n));
}
return results;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
vll a(n);
for (ll i = 0; i < n; i++) {
cin >> a[i];
}
vll ans = ways(a);
for (const auto &result : ans) {
cout << result << " ";
}
cout << endl;
return 0;
}
Dominos Tilling 3Dโ
#include <vector>
#include <cmath>
#define MOD 1000000007
#define ll long long
#define vll vector<long long>
using namespace std;
ll solve(ll n) {
vll v(n + 1);
v[1] = 2;
v[2] = 9;
for (int i = 3; i <= n; i++) {
v[i] = (4LL * v[i - 1] % MOD - v[i - 2] + 2 * (ll)pow(-1, i)) % MOD;
v[i] = (v[i] + MOD) % MOD;
}
return v[n];
}
vll ways(const vll &nvalues) {
vll results;
for (const auto &n : nvalues) {
results.push_back(solve(n));
}
return results;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
ll n;
cin >> n;
vll a(n);
for (ll i = 0; i < n; i++) {
cin >> a[i];
}
vll ans = ways(a);
for (const auto &result : ans) {
cout << result << " ";
}
cout << endl;
return 0;
}
Dominos Tilling 3Dโ
string WildcardCharacters(string str) {
vector<string> arr;
size_t pos = str.find(" ");
arr.push_back(str.substr(0, pos));
arr.push_back(str.substr(pos + 1));
string pattern = arr[0];
string word = arr[1];
string regexPtn = "";
for (size_t i = 0; i < pattern.length(); ++i) {
if (pattern[i] == '+') {
regexPtn += "[a-z]";
}
if (pattern[i] == '$') {
regexPtn += "[1-9]";
}
if (pattern[i] == '*') {
if (pattern[i + 1] == '{') {
regexPtn += ".{" + string(1, pattern[i + 2]) + "}";
i += 2;
} else {
regexPtn += ".{3}";
}
}
}
regex regexPattern("^" + regexPtn + "$");
return regex_match(word, regexPattern) ? "true" : "false";
}
#include <regex>
๐1
public static String atrArr(String[] strArr) {
int row = 1;
int col = 0;
int i = 0;
while (i < strArr.length) {
if (strArr[i].equals("<>")) {
row++;
}
i++;
}
col = strArr.length / row;
int[][] matrix = new int[row][col];
int r = 0;
int c = 0;
for (int j = 0; j < strArr.length; j++) {
if (strArr[j].equals("<>")) {
r++;
c = 0;
continue;
}
matrix[r][c] = Integer.parseInt(strArr[j]);
c++;
}
int[][] rref = new int[row][col];
for (int j = 0; j < row; j++) {
for (int k = 0; k < col; k++) {
rref[j][k] = matrix[j][k];
}
}
int lead = 0;
for (int j = 0; j < row; j++) {
if (col <= lead) {
break;
}
int i1 = j;
while (rref[i1][lead] == 0) {
i1++;
if (row == i1) {
i1 = j;
lead++;
if (col == lead) {
lead--;
break;
}
}
}
for (int k = 0; k < col; k++) {
int temp = rref[j][k];
rref[j][k] = rref[i1][k];
rref[i1][k] = temp;
}
int div = rref[j][lead];
for (int k = 0; k < col; k++) {
rref[j][k] = rref[j][k] / div;
}
for (int k = 0; k < row; k++) {
if (k != j) {
int sub = rref[k][lead];
for (int l = 0; l < col; l++) {
rref[k][l] = rref[k][l] - (sub * rref[j][l]);
}
}
}
lead++;
}
String result = "";
for (int j = 0; j < row; j++) {
for (int k = 0; k < col; k++) {
result += rref[j][k];
}
}
return result;
}
RREEF MAtrix โ
int row = 1;
int col = 0;
int i = 0;
while (i < strArr.length) {
if (strArr[i].equals("<>")) {
row++;
}
i++;
}
col = strArr.length / row;
int[][] matrix = new int[row][col];
int r = 0;
int c = 0;
for (int j = 0; j < strArr.length; j++) {
if (strArr[j].equals("<>")) {
r++;
c = 0;
continue;
}
matrix[r][c] = Integer.parseInt(strArr[j]);
c++;
}
int[][] rref = new int[row][col];
for (int j = 0; j < row; j++) {
for (int k = 0; k < col; k++) {
rref[j][k] = matrix[j][k];
}
}
int lead = 0;
for (int j = 0; j < row; j++) {
if (col <= lead) {
break;
}
int i1 = j;
while (rref[i1][lead] == 0) {
i1++;
if (row == i1) {
i1 = j;
lead++;
if (col == lead) {
lead--;
break;
}
}
}
for (int k = 0; k < col; k++) {
int temp = rref[j][k];
rref[j][k] = rref[i1][k];
rref[i1][k] = temp;
}
int div = rref[j][lead];
for (int k = 0; k < col; k++) {
rref[j][k] = rref[j][k] / div;
}
for (int k = 0; k < row; k++) {
if (k != j) {
int sub = rref[k][lead];
for (int l = 0; l < col; l++) {
rref[k][l] = rref[k][l] - (sub * rref[j][l]);
}
}
}
lead++;
}
String result = "";
for (int j = 0; j < row; j++) {
for (int k = 0; k < col; k++) {
result += rref[j][k];
}
}
return result;
}
RREEF MAtrix โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Hello All,
We do have 40 Opening for Automation Fresher
Location :Pune
Interview Process :
1. Aptitude Test
2. F2F interview
3. Manager Round
4. HR interview
Package - 8 Lacs (6 Lacs Fixed + 2 Lacs Joining Bonus)
Passout Year - 2019 to 2023
Java, logically Strong, technical knowledge on Java, C# or python. Data Base. Or any courses or certification candidate did was additional advantage.
Interested people send your resume on hr@qapenguin.com
Thanks,
Team Knowledgeware Training Institute and QAPenguin Pvt Ltd
We do have 40 Opening for Automation Fresher
Location :Pune
Interview Process :
1. Aptitude Test
2. F2F interview
3. Manager Round
4. HR interview
Package - 8 Lacs (6 Lacs Fixed + 2 Lacs Joining Bonus)
Passout Year - 2019 to 2023
Java, logically Strong, technical knowledge on Java, C# or python. Data Base. Or any courses or certification candidate did was additional advantage.
Interested people send your resume on hr@qapenguin.com
Thanks,
Team Knowledgeware Training Institute and QAPenguin Pvt Ltd
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
We are recruiting for the Junior Software Testing Engineer role.
Qualification: B.Sc (CS, IT, CT, CA) B.E (CS, IT, ECE) B.Tech, M.Sc (CS) M.C.A
Location: Tamil Nadu
CTC: 1 LPA to 3 LPA
Work Mode: Remote (6 Working Days)
Training Period: 6 Months for Fresher
Selection Process:
- Technical Assessment Test
-Communication Testing
- Technical Round with QA Team
Requirements:
- 0-3 years of experience in manual testing and automation
-Excellent logical and analytical skills
-Good communication skills (reading, writing, and spoken)
-Good problem-solving skills
- Knowledge about web services, databases (SQL), and data structures
- Flexibility to work in shifts
- Prioritization and time management
Send your resume to: mohanraj.k@desicrew.in
Qualification: B.Sc (CS, IT, CT, CA) B.E (CS, IT, ECE) B.Tech, M.Sc (CS) M.C.A
Location: Tamil Nadu
CTC: 1 LPA to 3 LPA
Work Mode: Remote (6 Working Days)
Training Period: 6 Months for Fresher
Selection Process:
- Technical Assessment Test
-Communication Testing
- Technical Round with QA Team
Requirements:
- 0-3 years of experience in manual testing and automation
-Excellent logical and analytical skills
-Good communication skills (reading, writing, and spoken)
-Good problem-solving skills
- Knowledge about web services, databases (SQL), and data structures
- Flexibility to work in shifts
- Prioritization and time management
Send your resume to: mohanraj.k@desicrew.in
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Bloomont is hiring #Freshers for below roles.
- Trainee Software Tester
- IT project coordinator
Trainee Application Analyst.
- Trainee Dot Net Developers (2019-2023 passed outs)
Interested candidates can share their resumes at hr@bloomont.com
- Trainee Software Tester
- IT project coordinator
Trainee Application Analyst.
- Trainee Dot Net Developers (2019-2023 passed outs)
Interested candidates can share their resumes at hr@bloomont.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
HDFC Bank is hiring [fresher / experienced] CAs/MBA( finance ) for the Internal Audit role.
Interested candidates can send their resume at carishabbhatia@gmail.com
Use below mentioned subject for Email
If Fresher :-
CA/MBA_ Fresher_Internal Audit
If Experienced:-
CA/MBA _Experience(yrs)_Profile worked in past
Interested candidates can send their resume at carishabbhatia@gmail.com
Use below mentioned subject for Email
If Fresher :-
CA/MBA_ Fresher_Internal Audit
If Experienced:-
CA/MBA _Experience(yrs)_Profile worked in past
public static Map<Character, Integer> calculateFrequency(String word) {
Map<Character, Integer> freqMap = new HashMap<>();
for (char c : word.toCharArray()) {
freqMap.put(c, freqMap.getOrDefault(c, 0) + 1);
}
for (Map.Entry<Character, Integer> entry : freqMap.entrySet()) {
entry.setValue(entry.getValue() / 2);
}
return freqMap;
}
Minimum Length Word โ
Map<Character, Integer> freqMap = new HashMap<>();
for (char c : word.toCharArray()) {
freqMap.put(c, freqMap.getOrDefault(c, 0) + 1);
}
for (Map.Entry<Character, Integer> entry : freqMap.entrySet()) {
entry.setValue(entry.getValue() / 2);
}
return freqMap;
}
Minimum Length Word โ
def max_zeros(L, K):
if K == 0:
return L
zeros = L - K
max_length = zeros // (K + 1)
remaining = zeros % (K + 1)
if remaining > 0:
max_length += 1
return max_length
L, K = map(int, input().split())
print(max_zeros(L, K),end="")
Zero Count โ
if K == 0:
return L
zeros = L - K
max_length = zeros // (K + 1)
remaining = zeros % (K + 1)
if remaining > 0:
max_length += 1
return max_length
L, K = map(int, input().split())
print(max_zeros(L, K),end="")
Zero Count โ
#include<bits/stdc++.h>
using namespace std;
int main() {
int L, K;
cin >> L >> K;
if(K == 0) {
cout << L << endl;
}
else {
int z = L - K;
int maxi = z / (K + 1);
if(z % (K + 1) != 0) {
maxi++;
}
cout << maxi << endl;
}
return 0;
}
Zero Count โ
using namespace std;
int main() {
int L, K;
cin >> L >> K;
if(K == 0) {
cout << L << endl;
}
else {
int z = L - K;
int maxi = z / (K + 1);
if(z % (K + 1) != 0) {
maxi++;
}
cout << maxi << endl;
}
return 0;
}
Zero Count โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Zeta
Role: SDE Intern
Batch eligible: 2024 passouts
Apply: https://docs.google.com/forms/d/e/1FAIpQLSelAjzPgaV9mNsNtN2okz78E2HVrqhWcj5Gin9RT5YxpfRMhw/viewform
Role: SDE Intern
Batch eligible: 2024 passouts
Apply: https://docs.google.com/forms/d/e/1FAIpQLSelAjzPgaV9mNsNtN2okz78E2HVrqhWcj5Gin9RT5YxpfRMhw/viewform
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
CommerceIQ referral form !!
https://docs.google.com/forms/d/e/1FAIpQLSeOsNJyOet4O-o3JR45eHWNiSbH2t29ZWwRZKDmRHsjCjdyTg/viewform
https://docs.google.com/forms/d/e/1FAIpQLSeOsNJyOet4O-o3JR45eHWNiSbH2t29ZWwRZKDmRHsjCjdyTg/viewform
Google Docs
CommerceIQ Referral
CommerceIQ is hiring for multiple roles including SDE 1, SDE 2, SDE 3, SDM, Data Scientist and more for Bengaluru and Chennai location. Please go through the open positions from the careers website and fill out this form with all the details for a referral.โฆ
def calc_valency(element):
return sum(map(int, str(sum(map(int, map(str, map(ord, element))))))) % 9 or 9
def balance_compound(compound, eq_point):
elem1, elem2 = compound[0], compound[1]
val1, val2 = calc_valency(elem1), calc_valency(elem2)
results = []
for mult1 in range(1, eq_point // val1 + 1):
rem_point = eq_point - mult1 * val1
if rem_point % val2 == 0:
mult2 = rem_point // val2
results.append(f"{elem1}{mult1} {elem2}{mult2}")
for i in range(len(results) - 2, -1, -1):
print(results[i])
if not results:
print("Not Possible")
compound_input = input().strip()
equivalent_point_input = int(input().strip())
balance_compound(compound_input, equivalent_point_input)
Compound โ
Codevita
return sum(map(int, str(sum(map(int, map(str, map(ord, element))))))) % 9 or 9
def balance_compound(compound, eq_point):
elem1, elem2 = compound[0], compound[1]
val1, val2 = calc_valency(elem1), calc_valency(elem2)
results = []
for mult1 in range(1, eq_point // val1 + 1):
rem_point = eq_point - mult1 * val1
if rem_point % val2 == 0:
mult2 = rem_point // val2
results.append(f"{elem1}{mult1} {elem2}{mult2}")
for i in range(len(results) - 2, -1, -1):
print(results[i])
if not results:
print("Not Possible")
compound_input = input().strip()
equivalent_point_input = int(input().strip())
balance_compound(compound_input, equivalent_point_input)
Compound โ
Codevita
๐1
๐Fullstack Developer Job
BlackLight Studio | Noida, India
Job Type: In-Office
Job Offer: โน 6LPA - 12LPA
Experience: 3+ years
โ Apply here๐ https://cuvette.tech/app/public/job/65605758c756a7f66e2f5dd0?referralCode=8T994D
BlackLight Studio | Noida, India
Job Type: In-Office
Job Offer: โน 6LPA - 12LPA
Experience: 3+ years
โ Apply here๐ https://cuvette.tech/app/public/job/65605758c756a7f66e2f5dd0?referralCode=8T994D
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int solve(string r) {
int c = 0;
for (int i = 0; i < r.size() - 2; i++) {
if (r[i] != r[i+1] && r[i+1] != r[i+2]) {
c++;
}
}
return c;
}
int main() {
string r1, r2;
cin >> r1 >> r2;
if (count(r1.begin(), r1.end(), 'M') + count(r1.begin(), r1.end(), 'L') != r1.size() ||
count(r2.begin(), r2.end(), 'M') + count(r2.begin(), r2.end(), 'L') != r2.size()) {
cout << "Invalid input" << endl;
return 0;
}
int s1 = solve(r1);
int s2 = solve(r2);
if (s1 > s2) {
cout << "Ashok" << endl;
} else if (s2 > s1) {
cout << "Anand" << endl;
} else {
cout << "Draw" << endl;
}
return 0;
}
Orchad โ
Codevita
#include <string>
#include <algorithm>
using namespace std;
int solve(string r) {
int c = 0;
for (int i = 0; i < r.size() - 2; i++) {
if (r[i] != r[i+1] && r[i+1] != r[i+2]) {
c++;
}
}
return c;
}
int main() {
string r1, r2;
cin >> r1 >> r2;
if (count(r1.begin(), r1.end(), 'M') + count(r1.begin(), r1.end(), 'L') != r1.size() ||
count(r2.begin(), r2.end(), 'M') + count(r2.begin(), r2.end(), 'L') != r2.size()) {
cout << "Invalid input" << endl;
return 0;
}
int s1 = solve(r1);
int s2 = solve(r2);
if (s1 > s2) {
cout << "Ashok" << endl;
} else if (s2 > s1) {
cout << "Anand" << endl;
} else {
cout << "Draw" << endl;
}
return 0;
}
Orchad โ
Codevita
Infinite multiplesโ