๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
int main() {
int a;
cin >> a;
vector<vector<int>> b(a, vector<int>(a));
for (int c = 0; c < a; ++c) {
for (int d = 0; d < a; ++d) {
cin >> b[c][d];
}
}
int sax;
cin >> sax;
cin.ignore();
for (int o = 0; o < sax; ++o) {
string query;
int x;
getline(cin, query);
stringstream ss(query);
string type;
ss >> type >> x;
int sum = 0;
for (int e = 0; e < a; ++e) {
for (int f = 0; f < a; ++f) {
if (b[e][f] == x) {
if (type == "ADJACENT") {
if (e > 0) sum += b[e-1][f];
if (e < a-1) sum += b[e+1][f];
if (f > 0) sum += b[e][f-1];
if (f < a-1) sum += b[e][f+1];
} else if (type == "DIAGONAL") {
if (e > 0 && f > 0) sum += b[e-1][f-1];
if (e > 0 && f < a-1) sum += b[e-1][f+1];
if (e < a-1 && f > 0) sum += b[e+1][f-1];
if (e < a-1 && f < a-1) sum += b[e+1][f+1];
}
}
}
}
cout << sum << endl;
}
return 0;
}
using namespace std;
int main() {
int a;
cin >> a;
vector<vector<int>> b(a, vector<int>(a));
for (int c = 0; c < a; ++c) {
for (int d = 0; d < a; ++d) {
cin >> b[c][d];
}
}
int sax;
cin >> sax;
cin.ignore();
for (int o = 0; o < sax; ++o) {
string query;
int x;
getline(cin, query);
stringstream ss(query);
string type;
ss >> type >> x;
int sum = 0;
for (int e = 0; e < a; ++e) {
for (int f = 0; f < a; ++f) {
if (b[e][f] == x) {
if (type == "ADJACENT") {
if (e > 0) sum += b[e-1][f];
if (e < a-1) sum += b[e+1][f];
if (f > 0) sum += b[e][f-1];
if (f < a-1) sum += b[e][f+1];
} else if (type == "DIAGONAL") {
if (e > 0 && f > 0) sum += b[e-1][f-1];
if (e > 0 && f < a-1) sum += b[e-1][f+1];
if (e < a-1 && f > 0) sum += b[e+1][f-1];
if (e < a-1 && f < a-1) sum += b[e+1][f+1];
}
}
}
}
cout << sum << endl;
}
return 0;
}
๐1
class Parser {
public static String isBalanced(String s) {
Stack<Character> stack = new Stack<>();
for (char ch : s.toCharArray()) {
switch (ch) {
case '(': case '{': case '[':
stack.push(ch);
break;
case ')':
if (stack.isEmpty() || stack.pop() != '(') {
return "false";
}
break;
case '}':
if (stack.isEmpty() || stack.pop() != '{') {
return "false";
}
break;
case ']':
if (stack.isEmpty() || stack.pop() != '[') {
return "false";
}
break;
default:
return "false";
}
}
return stack.isEmpty() ? "true" : "false";
}
Java Braces โ
public static String isBalanced(String s) {
Stack<Character> stack = new Stack<>();
for (char ch : s.toCharArray()) {
switch (ch) {
case '(': case '{': case '[':
stack.push(ch);
break;
case ')':
if (stack.isEmpty() || stack.pop() != '(') {
return "false";
}
break;
case '}':
if (stack.isEmpty() || stack.pop() != '{') {
return "false";
}
break;
case ']':
if (stack.isEmpty() || stack.pop() != '[') {
return "false";
}
break;
default:
return "false";
}
}
return stack.isEmpty() ? "true" : "false";
}
Java Braces โ
def getResult(n, k, pos):
def canDistribute(maverickSweets):
sweets_left = k - maverickSweets
left = pos - 1
right = n - pos
for i in range(1, left + 1):
required = max(maverickSweets - i, 1)
sweets_left -= required
if sweets_left < 0:
return False
for i in range(1, right + 1):
required = max(maverickSweets - i, 1)
sweets_left -= required
if sweets_left < 0:
return False
return sweets_left >= 0
low, high = 1, k
result = 0
while low <= high:
mid = (low + high) // 2
if canDistribute(mid):
result = mid
low = mid + 1
else:
high = mid - 1
return result
DE Shaw โ
def canDistribute(maverickSweets):
sweets_left = k - maverickSweets
left = pos - 1
right = n - pos
for i in range(1, left + 1):
required = max(maverickSweets - i, 1)
sweets_left -= required
if sweets_left < 0:
return False
for i in range(1, right + 1):
required = max(maverickSweets - i, 1)
sweets_left -= required
if sweets_left < 0:
return False
return sweets_left >= 0
low, high = 1, k
result = 0
while low <= high:
mid = (low + high) // 2
if canDistribute(mid):
result = mid
low = mid + 1
else:
high = mid - 1
return result
DE Shaw โ
๐1
def calculate_length(encrypted_data, I, E):
results = []
for start, end in zip(I, E):
length = 0
i = start
multiplier = 1
while i <= end:
if encrypted_data[i].isalpha():
length += multiplier
else:
multiplier = int(encrypted_data[i]) * 10**(len(str(multiplier)) - 1)
i += 1
results.append(length)
return results
DE Shaw โ
results = []
for start, end in zip(I, E):
length = 0
i = start
multiplier = 1
while i <= end:
if encrypted_data[i].isalpha():
length += multiplier
else:
multiplier = int(encrypted_data[i]) * 10**(len(str(multiplier)) - 1)
i += 1
results.append(length)
return results
DE Shaw โ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
const int sz = 1e5 + 5, mod = 1e9 + 7;
long long solve(vector<int>cost, int mn) {
int n = cost.size();
for(int i = 1; i < n; i++) {
cost[i] = min(cost[i], 2 * cost[i - 1]);
}
if(n < 2) {
long long ans = -1;
for(int i = 0; i < (1 << n); i++) {
long long cst = 0;
long long wt = 0;
for(int j = 0; j < n; j++) {
if((i >> j)&1) {
cst += cost[j];
wt += (1 << j);
}
}
if(wt >= mn) {
if(ans == -1 || cst < ans) ans = cst;
}
}
return ans;
}
int n1 = n / 2;
int n2 = n - n1;
long long ans = -1;
std::vector<long long int> v1(1 << n1), v2;
for(int i = 0; i < (1 << n1); i++) {
long long cst = 0;
long long wt = 0;
for(int j = 0; j < n1; j++) {
if((i >> j)&1) {
cst += cost[j];
wt += (1 << j);
}
}
if(i >= mn) {
if(ans == -1 || ans > cst) ans = cst;
}
v1[i] = cst;
//cout << i << " " <<v1[i] << "\n";
}
int lst = (1 << n1) - 2;
for(int i = lst; i >= 0; i--)
v1[i] = min(v1[i], v1[i + 1]);
lst++;
for(int i = 0; i < (1 << n2); i++) {
long long cst = 0;
long long wt = 0;
for(int j = 0; j < n2; j++) {
if((i >> j)&1) {
cst += cost[j + n1];
wt += (1 << (j + n1));
}
}
if(wt >= mn) {
if(ans == -1 || ans > cst) ans = cst;
} else if(lst + wt >= mn){
cst += v1[mn - wt];
//if(cst < 37) cout << v1[2] << "\n";
if(ans == -1 || ans > cst) ans = cst;
}
}
return ans;
}
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << solve({2, 5, 7, 11, 25}, 26) << "\n";
return 0;
}
DE Shaw โ
using namespace std;
#define ll long long int
const int sz = 1e5 + 5, mod = 1e9 + 7;
long long solve(vector<int>cost, int mn) {
int n = cost.size();
for(int i = 1; i < n; i++) {
cost[i] = min(cost[i], 2 * cost[i - 1]);
}
if(n < 2) {
long long ans = -1;
for(int i = 0; i < (1 << n); i++) {
long long cst = 0;
long long wt = 0;
for(int j = 0; j < n; j++) {
if((i >> j)&1) {
cst += cost[j];
wt += (1 << j);
}
}
if(wt >= mn) {
if(ans == -1 || cst < ans) ans = cst;
}
}
return ans;
}
int n1 = n / 2;
int n2 = n - n1;
long long ans = -1;
std::vector<long long int> v1(1 << n1), v2;
for(int i = 0; i < (1 << n1); i++) {
long long cst = 0;
long long wt = 0;
for(int j = 0; j < n1; j++) {
if((i >> j)&1) {
cst += cost[j];
wt += (1 << j);
}
}
if(i >= mn) {
if(ans == -1 || ans > cst) ans = cst;
}
v1[i] = cst;
//cout << i << " " <<v1[i] << "\n";
}
int lst = (1 << n1) - 2;
for(int i = lst; i >= 0; i--)
v1[i] = min(v1[i], v1[i + 1]);
lst++;
for(int i = 0; i < (1 << n2); i++) {
long long cst = 0;
long long wt = 0;
for(int j = 0; j < n2; j++) {
if((i >> j)&1) {
cst += cost[j + n1];
wt += (1 << (j + n1));
}
}
if(wt >= mn) {
if(ans == -1 || ans > cst) ans = cst;
} else if(lst + wt >= mn){
cst += v1[mn - wt];
//if(cst < 37) cout << v1[2] << "\n";
if(ans == -1 || ans > cst) ans = cst;
}
}
return ans;
}
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << solve({2, 5, 7, 11, 25}, 26) << "\n";
return 0;
}
DE Shaw โ
๐4
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
110,000+ Software Engineer jobs in India (4,689 new)
Todayโs top 110,000+ Software Engineer jobs in India. Leverage your professional network, and get hired. New Software Engineer jobs added daily.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Shadowfax is hiring SDE 1 and SDE 2
Tech Stack - Python/Django
Expected CTC
- SDE 1 - 18LPA
- SDE 2 - 30LPA
For 2023, 2022, 2021, 2020 grads
Apply - https://tinyurl.com/gc-shadowfax
Tech Stack - Python/Django
Expected CTC
- SDE 1 - 18LPA
- SDE 2 - 30LPA
For 2023, 2022, 2021, 2020 grads
Apply - https://tinyurl.com/gc-shadowfax
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
HyperVerge MLE Internship
Batch: 2024, 2025
Expected Stipend : 40k per month
https://docs.google.com/forms/d/e/1FAIpQLSc0LJIe7BdknWg0ipP6NpaOxoJzym3IfgYgEnNucWAgT-9GHA/viewform
Batch: 2024, 2025
Expected Stipend : 40k per month
https://docs.google.com/forms/d/e/1FAIpQLSc0LJIe7BdknWg0ipP6NpaOxoJzym3IfgYgEnNucWAgT-9GHA/viewform
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Apollo24 7
Role : Product Analyst
Skillset : Python and SQL majorly
Batch : 2024/2023/2022 passouts
Link : https://docs.google.com/forms/d/e/1FAIpQLSfU5X4eevEnG6R5KO5fsYpP_R-JFu5aTPDtB3rKC2rPjHeHVw/viewform
Role : Product Analyst
Skillset : Python and SQL majorly
Batch : 2024/2023/2022 passouts
Link : https://docs.google.com/forms/d/e/1FAIpQLSfU5X4eevEnG6R5KO5fsYpP_R-JFu5aTPDtB3rKC2rPjHeHVw/viewform
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Divita Shekhar on LinkedIn: Google Forms: Sign-in | 13 comments
Attention New Graduates!
We are looking to hire smart & energetic freshers to join us as part of our Cyber Security Practice in EY India LLPโฆ | 13 comments on LinkedIn
We are looking to hire smart & energetic freshers to join us as part of our Cyber Security Practice in EY India LLPโฆ | 13 comments on LinkedIn
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : PayU
Role : Software Engineer - Internship
Batch : 2025/2026 passouts
SDE Intern Link : https://jobs.eu.lever.co/payu/936044ca-c3f1-4072-b193-d395c3e164cf
Data Engineer Intern : https://jobs.eu.lever.co/payu/330d411a-955b-4545-902c-b983d44ed167
Role : Software Engineer - Internship
Batch : 2025/2026 passouts
SDE Intern Link : https://jobs.eu.lever.co/payu/936044ca-c3f1-4072-b193-d395c3e164cf
Data Engineer Intern : https://jobs.eu.lever.co/payu/330d411a-955b-4545-902c-b983d44ed167
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Latest Job Openings
Company โ Coding Junior
Role โ Artificial Intelligence (AI) Intern
Exp. โ Fresher
Apply Here โ https://internshala.com/internship/details/work-from-home-artificial-intelligence-ai-internship-at-coding-junior1716102979?utm_source=cp_link&referral=web_share
Company โ SuperTails
Role โ Data Analytics Internship
Exp. โ Exp. With Python & SQL
Apply Here โ https://internshala.com/internship/details/data-analytics-internship-in-bangalore-at-supertails1716094713?utm_source=cp_link&referral=web_share
Company โ Thoucentric
Role โ Junior Data Engineer
Exp. โ 0-2 yrs
Apply Here โ https://www.linkedin.com/jobs/view/3929033684
Company โ Coding Junior
Role โ Artificial Intelligence (AI) Intern
Exp. โ Fresher
Apply Here โ https://internshala.com/internship/details/work-from-home-artificial-intelligence-ai-internship-at-coding-junior1716102979?utm_source=cp_link&referral=web_share
Company โ SuperTails
Role โ Data Analytics Internship
Exp. โ Exp. With Python & SQL
Apply Here โ https://internshala.com/internship/details/data-analytics-internship-in-bangalore-at-supertails1716094713?utm_source=cp_link&referral=web_share
Company โ Thoucentric
Role โ Junior Data Engineer
Exp. โ 0-2 yrs
Apply Here โ https://www.linkedin.com/jobs/view/3929033684
Internshala
Artificial Intelligence (AI) Work From Home Internship at Coding Junior
Selected intern's day-to-day responsibilities include:
1. Create and wireframe AI-based assessments
2. Create and develop AI-based chatting bot
3. Work directly under the CTO
1. Create and wireframe AI-based assessments
2. Create and develop AI-based chatting bot
3. Work directly under the CTO
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
IRLY is hiring Full Stack Engineer Intern
For 2024, 2025, 2026 grads
Apply asap
Check out this job at IRLY: https://www.linkedin.com/jobs/view/3924628491
For 2024, 2025, 2026 grads
Apply asap
Check out this job at IRLY: https://www.linkedin.com/jobs/view/3924628491
Linkedin
6,000+ Full Stack Engineer jobs in India (350 new)
Todayโs top 6,000+ Full Stack Engineer jobs in India. Leverage your professional network, and get hired. New Full Stack Engineer jobs added daily.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
OpenGig is hiring SDE Intern - Frontend
Stipend: 20k-25k fixed
Location: Remote
Apply - https://app.opengig.work/jobs/opengig/269
Stipend: 20k-25k fixed
Location: Remote
Apply - https://app.opengig.work/jobs/opengig/269
Open Gig
SDE Intern Frontend - NextJs | OpenGig
Why join As a small team, we work in a highly collaborative environment and you'll have the opportunity to participate in every part of the business from idea to production. Synergy in Smallness: Emb...
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
We at Spinny are hiring for Talent Acquisition, preferably someone who can speak Kannada, for front-line hiring at our headquarters in Gurugram. Freshers are also encouraged to apply.
Additionally, we are hiring a TA proficient in Hindi and English.
Interested candidates can share their CV at the email address provided below:
trisha.gupta@spinny.com
Additionally, we are hiring a TA proficient in Hindi and English.
Interested candidates can share their CV at the email address provided below:
trisha.gupta@spinny.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Reliance Brands Limited is hiring summer interns in Mumbai, Bangalore and Gurgaon for the following roles:
- Sourcing
- Design for Designer Wear Brands
- Operations
- HR
If you're interested or know someone who might be, please share resume at sneh.sachan@ril.com.
Only relevant candidates will be contacted.
- Sourcing
- Design for Designer Wear Brands
- Operations
- HR
If you're interested or know someone who might be, please share resume at sneh.sachan@ril.com.
Only relevant candidates will be contacted.