#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โฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Codingal hiring Frontend Engineer Intern
2026/2027 batch passouts
30 k per month stipend
Apply Here : https://www.ycombinator.com/companies/codingal/jobs/35OsrhF-frontend-engineering-intern
2026/2027 batch passouts
30 k per month stipend
Apply Here : https://www.ycombinator.com/companies/codingal/jobs/35OsrhF-frontend-engineering-intern
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
AutoDesk hiring for
Data Scientist
Exp : fresher
Exp CTC : 22 lpa
Apply Link : https://autodesk.wd1.myworkdayjobs.com/Ext/job/Bengaluru-IND/Software-Engineer_24WD84215-1
Data Scientist
Exp : fresher
Exp CTC : 22 lpa
Apply Link : https://autodesk.wd1.myworkdayjobs.com/Ext/job/Bengaluru-IND/Software-Engineer_24WD84215-1
๐คฉ2๐1
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Hiring Alert for Freshers ๐
Netlink Software Group America Inc is seeking talented Frontend Freshers!
๐ธ๏ธLocation - Bhopal
๐ธ๏ธQualification- Bachelors degree in IT, CS or related field
๐ธ๏ธSkills Required- HTML, CSS, JavaScript and React
Interested ones can share their CV at shikhav@netlink.com
Netlink Software Group America Inc is seeking talented Frontend Freshers!
๐ธ๏ธLocation - Bhopal
๐ธ๏ธQualification- Bachelors degree in IT, CS or related field
๐ธ๏ธSkills Required- HTML, CSS, JavaScript and React
Interested ones can share their CV at shikhav@netlink.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Canonical
Batch : 2024/2023/2022 passouts
Role : Software Engineer
Location : Mumbai : https://boards.greenhouse.io/canonicaljobs/jobs/6423643
Hyderbaad :https://grnh.se/b8be5ad21us
Gurgaon : https://grnh.se/c583c78f1us
Batch : 2024/2023/2022 passouts
Role : Software Engineer
Location : Mumbai : https://boards.greenhouse.io/canonicaljobs/jobs/6423643
Hyderbaad :https://grnh.se/b8be5ad21us
Gurgaon : https://grnh.se/c583c78f1us
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐TECHNIP Energies Hiring
Role: Graduate Trainee โ Data Science (Computer Vision)
Qualification:
โข Bachelor's degree in Computer Science, Computer Vision, Machine Learning, or a related field.
โข Strong knowledge of computer vision algorithms , libraries, tools and frameworks, such as OpenCV, TensorFlow, PyTorch, Theano, Caffe.
๐ปApply Link: https://hcxg.fa.em2.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/job/8276
Role: Graduate Trainee โ Data Science (Computer Vision)
Qualification:
โข Bachelor's degree in Computer Science, Computer Vision, Machine Learning, or a related field.
โข Strong knowledge of computer vision algorithms , libraries, tools and frameworks, such as OpenCV, TensorFlow, PyTorch, Theano, Caffe.
๐ปApply Link: https://hcxg.fa.em2.oraclecloud.com/hcmUI/CandidateExperience/en/sites/CX_1/job/8276
T.EN Career Site
Graduate Trainee - Data Science
Graduate Trainee - Automation & Digital
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Tower Research is Hiring
Role: ML Intern
Expected Stipend: 70k - 100k per month
๐ปApply here: https://boards.greenhouse.io/embed/job_app?token=6114125&gh_src=be8ebc4b1&source=LinkedIn
Role: ML Intern
Expected Stipend: 70k - 100k per month
๐ปApply here: https://boards.greenhouse.io/embed/job_app?token=6114125&gh_src=be8ebc4b1&source=LinkedIn
boards.greenhouse.io
Machine Learning Intern 2025
Gurgaon
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Applied Materials
Role: Software Engineering Intern
Qualification:
Bachelor of Engineering degree in any of the following :Computer Science , Information Sciences, Information Technology and Electronics and Communication.
๐ปApply Link: https://careers.appliedmaterials.com/careers/job/790299921398?domain=appliedmaterials.com
Role: Software Engineering Intern
Qualification:
Bachelor of Engineering degree in any of the following :Computer Science , Information Sciences, Information Technology and Electronics and Communication.
๐ปApply Link: https://careers.appliedmaterials.com/careers/job/790299921398?domain=appliedmaterials.com