๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
class Shop:
def __init__(self):
self.items = {}
def create(self, X, Y):
if X in self.items and self.items[X] > 0:
return False
else:
self.items[X] = Y
return True
def place_order(self, X, Y, Z):
if Y not in self.items or self.items[Y] < Z:
return False
else:
self.items[Y] -= Z
return True
def balance(self):
return sum(self.items.values())
def process_queries(queries):
shop = Shop()
result = []
for query in queries:
parts = query.split()
command = parts[0]
if command == "Create":
X = int(parts[1])
Y = int(parts[2])
if shop.create(X, Y):
result.append("Item Created successfully!")
else:
result.append("Couldn't create item!")
elif command == "PlaceOrder":
X = int(parts[1])
Y = int(parts[2])
Z = int(parts[3])
if shop.place_order(X, Y, Z):
result.append("Order placed successfully!")
else:
result.append("Couldn't place order!")
elif command == "Balance":
result.append(f"Total no of items in the shop is {shop.balance()}")
return result
Shop inventory โ
๐1
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll solve(ll n, ll m, vector<vector<string>>& c) {
vector<vector<ll>> g1(n), g2(n);
vector<ll> d1(n, 0), d2(n, 0);
for (const auto& t : c) {
if (t[0] == "x") {
ll a = stoll(t[1]) - 1;
ll b = stoll(t[2]) - 1;
g1[a].push_back(b);
d1[b]++;
} else if (t[0] == "y") {
ll a = stoll(t[1]) - 1;
ll b = stoll(t[2]) - 1;
g2[a].push_back(b);
d2[b]++;
}
}
auto ts = [&](vector<vector<ll>>& g, vector<ll>& d) -> vector<ll> {
queue<ll> q;
for (ll i = 0; i < n; i++) {
if (d[i] == 0) q.push(i);
}
vector<ll> o;
while (!q.empty()) {
ll u = q.front();
q.pop();
o.push_back(u);
for (ll v : g[u]) {
d[v]--;
if (d[v] == 0) q.push(v);
}
}
return o.size() == n ? o : vector<ll>();
};
vector<ll> o1 = ts(g1, d1);
vector<ll> o2 = ts(g2, d2);
if (o1.empty() || o2.empty()) return -1;
vector<ll> r(n, 0), cols(n, 0);
for (ll i = 0; i < n; i++) {
for (ll v : g1[o1[i]]) {
r[v] = max(r[v], r[o1[i]] + 1);
}
}
for (ll i = 0; i < n; i++) {
for (ll v : g2[o2[i]]) {
cols[v] = max(cols[v], cols[o2[i]] + 1);
}
}
ll max_r = *max_element(r.begin(), r.end()) + 1;
ll max_cols = *max_element(cols.begin(), cols.end()) + 1;
return max_r + max_cols;
}
int main() {
ll n, m;
cin >> n >> m;
vector<vector<string>> c(m, vector<string>(3));
for (ll i = 0; i < m; i++) {
cin >> c[i][0] >> c[i][1] >> c[i][2];
}
cout << solve(n, m, c) << endl;
return 0;
}
Stay inside Circle โ
๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Aminurmus Technology is hiring
Multiple Roles:
- SDE ( Intern/Fulltime)
- Reactjs Developer ( Intern/Fulltime)
- Dot net Developer (Intern/ Fulltime)
- Mern Stack Developer (Intern/Fulltime)
- Figma Developer Intern
- Fullstack Developer (Intern/Fulltime)
- Data Analysis
- Android Developer
Remote Opportunity
Batch: First year to Final Year
๐ปApply: https://aminurmus.com/career
Use Referral Mail Id:
rupam.bernwal@aminurmus.com
Multiple Roles:
- SDE ( Intern/Fulltime)
- Reactjs Developer ( Intern/Fulltime)
- Dot net Developer (Intern/ Fulltime)
- Mern Stack Developer (Intern/Fulltime)
- Figma Developer Intern
- Fullstack Developer (Intern/Fulltime)
- Data Analysis
- Android Developer
Remote Opportunity
Batch: First year to Final Year
๐ปApply: https://aminurmus.com/career
Use Referral Mail Id:
rupam.bernwal@aminurmus.com
Aminurmus
Aminurmus Technology Pvt Ltd.
Web site created using create-react-app
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
VE3
VE3 - Python Developer Intern in Pune City
VE3 Job Title: Python Developer Intern Location: Pune, India Position Type: Full-time About the Company We leverage our strong capabilities to
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Cornerstone Hiring
Role: Junior Engineer
Qualifications:
- B.E/B.Tech/MCA Freshers
๐ปApply Link: https://cornerstone.csod.com/ux/ats/careersite/2/home/requisition/9966?c=cornerstone
Role: Junior Engineer
Qualifications:
- B.E/B.Tech/MCA Freshers
๐ปApply Link: https://cornerstone.csod.com/ux/ats/careersite/2/home/requisition/9966?c=cornerstone
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
๐จHiring update | Ankit from Topmate
๐จHiring update
Join us at our new office!
Our team at topmate is hiring for a Data Analyst role.
This is an Internship opportunity for people with any level of experience.
What we are looking for:
-> Hands-on experience with Mixpanel and SQL.
-> A strongโฆ
Join us at our new office!
Our team at topmate is hiring for a Data Analyst role.
This is an Internship opportunity for people with any level of experience.
What we are looking for:
-> Hands-on experience with Mixpanel and SQL.
-> A strongโฆ
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll maxcoins(ll A[], ll siz) {
ll nums[siz + 2];
ll n = 1;
for (ll i = 0; i < siz; i++) {
if (A[i] > 0) {
nums[n] = A[i];
n++;
}
}
nums[0] = nums[n] = 1;
n++;
ll dp[n][n] = {};
for (ll j = 2; j < n; j++) {
for (ll left = 0; left < n - j; left++) {
ll right = left + j;
for (ll i = left + 1; i < right; i++) {
if (left == 0 && right == n - 1)
dp[left][right] = max(nums[left] * nums[i] * nums[right] + dp[left][i] + dp[i][right], dp[left][right]);
else
dp[left][right] = max(nums[left] * nums[right] + dp[left][i] + dp[i][right], dp[left][right]);
}
}
}
return dp[0][n - 1];
}
int main() {
ll T;
cin >> T;
for (ll t = 1; t <= T; t++) {
ll siz;
cin >> siz;
ll A[siz];
for (ll i = 0; i < siz; i++) {
cin >> A[i];
}
ll ans = maxcoins(A, siz);
cout << "#" << t << ans << endl;
}
return 0;
}
Samsung โ
const int MOD = 1e9 + 7;
int solve (int N, const vector<int>& rollMax) {
vector<vector<vector<int>>> dp(N, vector<vector<int>>(6, vector<int>(61, 0)));
for (int j = 0; j < 6; ++j) {
dp[0][j][1] = 1;
}
for (int i = 1; i < N; ++i) {
for (int j = 0; j < 6; ++j) {
for (int k = 1; k <= rollMax[j]; ++k) {
if (k > 1) {
dp[i][j][k] = dp[i - 1][j][k - 1];
}
for (int m = 0; m < 6; ++m) {
if (m != j) {
dp[i][m][1] = (dp[i][m][1] + dp[i - 1][j][k]) % MOD;
}
}
}
}
}
int total = 0;
for (int j = 0; j < 6; ++j) {
for (int k = 1; k <= rollMax[j]; ++k) {
total = (total + dp[N - 1][j][k]) % MOD;
}
}
return total;
}
RoundGlass โ
int solve (int N, const vector<int>& rollMax) {
vector<vector<vector<int>>> dp(N, vector<vector<int>>(6, vector<int>(61, 0)));
for (int j = 0; j < 6; ++j) {
dp[0][j][1] = 1;
}
for (int i = 1; i < N; ++i) {
for (int j = 0; j < 6; ++j) {
for (int k = 1; k <= rollMax[j]; ++k) {
if (k > 1) {
dp[i][j][k] = dp[i - 1][j][k - 1];
}
for (int m = 0; m < 6; ++m) {
if (m != j) {
dp[i][m][1] = (dp[i][m][1] + dp[i - 1][j][k]) % MOD;
}
}
}
}
}
int total = 0;
for (int j = 0; j < 6; ++j) {
for (int k = 1; k <= rollMax[j]; ++k) {
total = (total + dp[N - 1][j][k]) % MOD;
}
}
return total;
}
RoundGlass โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Sign Up | LinkedIn
500 million+ members | Manage your professional identity. Build and engage with your professional network. Access knowledge, insights and opportunities.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
https://forms.zohopublic.com/vembutechnologies/form/JobApplicationsVembuTechnologies/formperma/AzaIrXHa1Cq-J9jUggYjz2HGGUA7mt8F-PC_WGQWd90
2024 batch with minimum 75+ marks in all education
2024 batch with minimum 75+ marks in all education
Zohopublic
Job Applications - Vembu Technologies
Fill out this form.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
HERE Technologies - Apprenticeship 2024
https://forms.office.com/pages/responsepage.aspx?id=zTRAbSVyck-4U5H-rqZJGRx7enunnXRKvRWEwxcSdNxUNDNRMkhVTkhORE0wMkJFTTI3Wk9GRlVNOC4u&route=shorturl
https://forms.office.com/pages/responsepage.aspx?id=zTRAbSVyck-4U5H-rqZJGRx7enunnXRKvRWEwxcSdNxUNDNRMkhVTkhORE0wMkJFTTI3Wk9GRlVNOC4u&route=shorturl
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Graduate Trainee Engineer in Madhapur, Hyderabad, India | OSI Systems, Inc
Careers Home is hiring a Graduate Trainee Engineer in Madhapur, Hyderabad, India. Review all of the job details and apply today!
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company: Capital One
Role: SWE Intern
Batch: 2024/2025
Apply:
https://www.capitalonecareers.com/job/-/-/234/74471877888
Role: SWE Intern
Batch: 2024/2025
Apply:
https://www.capitalonecareers.com/job/-/-/234/74471877888
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Wayfair
Batch : 2023/2022 passouts
Role :
SDE1 : https://www.wayfair.com/careers/job/software-engineer-i--engineering-automation/7514507002?gh_src=&source=
SDE 2 :
Batch : 2021/2020
Link : https://www.wayfair.com/careers/job/software-engineer-ii--application-security/7717344002?gh_src=&source=
Batch : 2023/2022 passouts
Role :
SDE1 : https://www.wayfair.com/careers/job/software-engineer-i--engineering-automation/7514507002?gh_src=&source=
SDE 2 :
Batch : 2021/2020
Link : https://www.wayfair.com/careers/job/software-engineer-ii--application-security/7717344002?gh_src=&source=
Wayfair
Wayfair Careers | Apply Now
WayfairCareersDescription
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Amazon is hiring SDE
For 2024, 2025 gards
Location: Bangalore
https://www.amazon.jobs/en/jobs/2836867/software-dev-engineer-amazon-university-talent-acquisition
For 2024, 2025 gards
Location: Bangalore
https://www.amazon.jobs/en/jobs/2836867/software-dev-engineer-amazon-university-talent-acquisition
amazon.jobs
Software Dev Engineer, Amazon University Talent Acquisition
At Amazon, we hire the best minds in technology to innovate and build on behalf of our customers. The focus we have on our customers is why we are one of the worldโs most beloved brands โ customer obsession is part of our company DNA. Our Software Developmentโฆ