#include<bits/stdc++.h>
using namespace std;
int solve(vector<vector<int>>&v, vector<vector<int>>&vis, int x, int y, int sum,int dx, int dy){
if(vis[x][y]) return sum;
if((x==0 and y==0)(x==0 and y==v[0].size()-1) (x==v.size()-1 and y==0) (x==v.size()-1 and y==v[0].size()-1)){
sum+=v[x][y];
return sum;
}
sum+=v[x][y];
vis[x][y]=1;
if(x+dx==v.size() x+dx<0){
if(dx==1) dx=-1;
else dx=1;
}
if(y+1==v[0].size() || y+dy<0){
if(dy==1) dy=-1;
else dy=1;
}
return solve(v,vis,x+dx,y+dy,sum,dx,dy);
}
int solution(vector<vector<int>>&v, int x, int y){
int n=v.size();
int m=v[0].size();
vector<vector<int>>vis(n,vector<int>(m,0));
return solve(v,vis,x,y,0,1,1);
}
signed main(){
int n,m,x,y;
cin>>n>>m>>x>>y;
vector<vector<int>>v(n,vector<int>(m,0));
for(int i=0; i<n; i++)
for(int j=0; j<m; j++) cin>>v[i][j];
cout<<solution(v,x,y)<<endl;
return 0;
}
Visa ROBOT Traversalโ
using namespace std;
int solve(vector<vector<int>>&v, vector<vector<int>>&vis, int x, int y, int sum,int dx, int dy){
if(vis[x][y]) return sum;
if((x==0 and y==0)
sum+=v[x][y];
return sum;
}
sum+=v[x][y];
vis[x][y]=1;
if(x+dx==v.size()
if(dx==1) dx=-1;
else dx=1;
}
if(y+1==v[0].size() || y+dy<0){
if(dy==1) dy=-1;
else dy=1;
}
return solve(v,vis,x+dx,y+dy,sum,dx,dy);
}
int solution(vector<vector<int>>&v, int x, int y){
int n=v.size();
int m=v[0].size();
vector<vector<int>>vis(n,vector<int>(m,0));
return solve(v,vis,x,y,0,1,1);
}
signed main(){
int n,m,x,y;
cin>>n>>m>>x>>y;
vector<vector<int>>v(n,vector<int>(m,0));
for(int i=0; i<n; i++)
for(int j=0; j<m; j++) cin>>v[i][j];
cout<<solution(v,x,y)<<endl;
return 0;
}
Visa ROBOT Traversalโ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Flexi Analyst is Hiring !!
Role: Software Engineer Intern
Batch: 2024, 2025
Apply: https://www.linkedin.com/jobs/view/3692344146
Role: Software Engineer Intern
Batch: 2024, 2025
Apply: https://www.linkedin.com/jobs/view/3692344146
Linkedin
54 Software Engineer Intern jobs in India (6 new)
Todayโs top 54 Software Engineer Intern jobs in India. Leverage your professional network, and get hired. New Software Engineer Intern jobs added daily.
#include <iostream>
#include <vector>
using namespace std;
vector<int> Solve(int N, int K) {
vector<int> slots(K, 0);
int bagCount = 1;
while (N > 0) {
for (int i = 0; i < K && N > 0; ++i) {
if (bagCount <= N) {
slots[i] += bagCount;
N -= bagCount;
bagCount++;
} else {
slots[i] += N;
N = 0;
}
}
}
return slots;
}
int main() {
int N, K;
cin >> N >> K;
vector<int> result = Solve(N, K);
for (int bags : result) {
cout << bags << " ";
}
cout << endl;
return 0;
}
Bag Distribution Algorithm C++โ
#include <vector>
using namespace std;
vector<int> Solve(int N, int K) {
vector<int> slots(K, 0);
int bagCount = 1;
while (N > 0) {
for (int i = 0; i < K && N > 0; ++i) {
if (bagCount <= N) {
slots[i] += bagCount;
N -= bagCount;
bagCount++;
} else {
slots[i] += N;
N = 0;
}
}
}
return slots;
}
int main() {
int N, K;
cin >> N >> K;
vector<int> result = Solve(N, K);
for (int bags : result) {
cout << bags << " ";
}
cout << endl;
return 0;
}
Bag Distribution Algorithm C++โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Zerodha
Role: Frontend Intern
Batch eligible: 2024 grads only
Apply: https://careers.zerodhafundhouse.com/jobs/ybkmnewaO6cf/frontend-intern
Role: Frontend Intern
Batch eligible: 2024 grads only
Apply: https://careers.zerodhafundhouse.com/jobs/ybkmnewaO6cf/frontend-intern
Zerodhafundhouse
Hiring for Frontend Intern for Bengaluru - Internship
Posted by : Zerodha Asset Management Pvt Ltd | REACT.JS,VUE.JS,JAVASCRIPT,TYPESCRIPT,CSS3,HTML5,REDUX
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: RD&X Network
Role: Software Development Intern
Batch eligible: 2022 and 2023 grads (2024 also if there cllg will allow onsite internship)
Apply: https://bit.ly/3ssuP7h
Role: Software Development Intern
Batch eligible: 2022 and 2023 grads (2024 also if there cllg will allow onsite internship)
Apply: https://bit.ly/3ssuP7h
cuvette.tech
Backend Developer Internship in RD&X Network at Bangalore, Karnataka, India | Cuvette
Apply For Backend Developer Internship | Skills required are Java, Spring Boot, Hibernate (Java) | Stipend โน20K-25K | Job Offer โน 6 LPA - 7.6 LPA | FULL-TIME INTERNSHIP | Location is Work from Home
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Swiggy is hiring for 6 months full time intern role (2023 and 2024 grads eligible)
Apply: https://docs.google.com/forms/d/e/1FAIpQLSf-S4Kqkz5TcmpE9vyDcVjODEoHaVNJ-EjqiPSWCebcrhG_Ew/viewform
Apply: https://docs.google.com/forms/d/e/1FAIpQLSf-S4Kqkz5TcmpE9vyDcVjODEoHaVNJ-EjqiPSWCebcrhG_Ew/viewform
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Seagate is hiring 2023/2024 Grads
https://seagatecareers.com/job/Pune-Intern-Seagate-Research-Group/1007615300/
https://seagatecareers.com/job/Pune-Intern-Seagate-Research-Group/1007615300/
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
int f = 0;
int s = 1;
int ans = 0;
if (n == 0)
{
cout << 0;
}
if (n == 1)
{
cout << 1;
}
for (int i = 2; i <= n; i++)
{
ans = f + s;
f = s;
s = ans;
}
cout << ans;
}
using namespace std;
int main()
{
int n;
cin >> n;
int f = 0;
int s = 1;
int ans = 0;
if (n == 0)
{
cout << 0;
}
if (n == 1)
{
cout << 1;
}
for (int i = 2; i <= n; i++)
{
ans = f + s;
f = s;
s = ans;
}
cout << ans;
}
#include <bits/stdc++.h>
using namespace std;
bool isPrime(int n)
{
for (int i = 2; i <= sqrt(n); i++)
if (n % i == 0)
return false;
return true;
}
int main()
{
int n, m;
cin >> n >> m;
int a = 0;
int b = 0;
while (n < m)
{
if (isPrime(n))
{
a = n;
break;
}
n++;
}
while (n < m)
{
if (isPrime(m))
{
b = m;
break;
}
m--;
}
cout << a + b;
return 0;
}
using namespace std;
bool isPrime(int n)
{
for (int i = 2; i <= sqrt(n); i++)
if (n % i == 0)
return false;
return true;
}
int main()
{
int n, m;
cin >> n >> m;
int a = 0;
int b = 0;
while (n < m)
{
if (isPrime(n))
{
a = n;
break;
}
n++;
}
while (n < m)
{
if (isPrime(m))
{
b = m;
break;
}
m--;
}
cout << a + b;
return 0;
}
public static void main(String[] args) {
String[] arr =new String[]{"aa", "aab", "b", "bbd", "d"};
String tar = "aabbd";
int len = tar.length();
int[] dp = new int[len+1];
Arrays.fill(dp, 9999);
dp[0] = 0;
for(int i = 1; i <= len; i++) {
int cal = 0;
for(int j = 1; j <= i; j++) {
String sub = tar.substring(j-1,i);
boolean found = false;
for(int k = 0; k < arr.length; k++) {
if(arr[k].startsWith(sub)){
found = true;break;
}
}
if(found)dp[i] = Math.min(dp[i], 1 + dp[j-1]);
System.out.print(i + " " + dp[i] + " ");
}
// dp[i] = cal;
}
System.out.println(dp[len]);
}
equal string trilogy โ
String[] arr =new String[]{"aa", "aab", "b", "bbd", "d"};
String tar = "aabbd";
int len = tar.length();
int[] dp = new int[len+1];
Arrays.fill(dp, 9999);
dp[0] = 0;
for(int i = 1; i <= len; i++) {
int cal = 0;
for(int j = 1; j <= i; j++) {
String sub = tar.substring(j-1,i);
boolean found = false;
for(int k = 0; k < arr.length; k++) {
if(arr[k].startsWith(sub)){
found = true;break;
}
}
if(found)dp[i] = Math.min(dp[i], 1 + dp[j-1]);
System.out.print(i + " " + dp[i] + " ");
}
// dp[i] = cal;
}
System.out.println(dp[len]);
}
equal string trilogy โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Kickdrum is Hiring !!
Role: Developer
Batch: 2024
Stipend: 35K per Month
CTC: 16 Lpa (PPO)
Eligibility: above 80% in academic in 10,12, BTech
Duration: 6 Months
Location: Bangalore
Please Note:
Mention "Vivek Tiwari" as the referring person or source.
Form Link:
https://docs.google.com/forms/d/e/1FAIpQLSfCc24PiVVeqMBYv_dCdGdmjpPeZY-TjXun1aB8MScIhVfiIw/viewform
Role: Developer
Batch: 2024
Stipend: 35K per Month
CTC: 16 Lpa (PPO)
Eligibility: above 80% in academic in 10,12, BTech
Duration: 6 Months
Location: Bangalore
Please Note:
Mention "Vivek Tiwari" as the referring person or source.
Form Link:
https://docs.google.com/forms/d/e/1FAIpQLSfCc24PiVVeqMBYv_dCdGdmjpPeZY-TjXun1aB8MScIhVfiIw/viewform
Google Docs
Kickdrum University-2024
Role: Software Developer
Internship Period: 6 months
Stipend: Rs. 35,000 per month
Job Location: Bengaluru (No Remote Location)
Eligibility Criteria: B.E/B.Tech- CS/IT with 80% and above in their academics throughout. No backlogs.
Batch: 2024 Only
Joiningโฆ
Internship Period: 6 months
Stipend: Rs. 35,000 per month
Job Location: Bengaluru (No Remote Location)
Eligibility Criteria: B.E/B.Tech- CS/IT with 80% and above in their academics throughout. No backlogs.
Batch: 2024 Only
Joiningโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: CloudSEK
Role: SDE - Backend Intern
Batch eligible: 2022 and 2023 grads
Apply: https://www.linkedin.com/jobs/view/3699008130
Role: SDE - Backend Intern
Batch eligible: 2022 and 2023 grads
Apply: https://www.linkedin.com/jobs/view/3699008130
Linkedin
CloudSEK hiring SDE - Backend - Intern in Bengaluru, Karnataka, India | LinkedIn
Posted 5:07:33 PM. WHO ARE WE?
We are a bunch of super enthusiastic, passionate, and highly driven people, working toโฆSee this and similar jobs on LinkedIn.
We are a bunch of super enthusiastic, passionate, and highly driven people, working toโฆSee this and similar jobs on LinkedIn.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: LinkedIn
Role: SDE Intern
Batch eligible: 2025 grads only
Apply: https://www.linkedin.com/jobs/view/3694138424
Role: SDE Intern
Batch eligible: 2025 grads only
Apply: https://www.linkedin.com/jobs/view/3694138424
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Router.gg
Role: SDE Intern - iOS
Batch eligible: 2024 grads only
Location: Delhi
Duration: 6-9 months.
Apply: https://www.linkedin.com/jobs/view/3702890647
P.S: Only go if your cllg allow you to do on-site internship.
Role: SDE Intern - iOS
Batch eligible: 2024 grads only
Location: Delhi
Duration: 6-9 months.
Apply: https://www.linkedin.com/jobs/view/3702890647
P.S: Only go if your cllg allow you to do on-site internship.
Linkedin
Rooter.gg hiring Software Development Intern- iOS in Delhi, India | LinkedIn
Posted 6:17:04 AM. Job Title: Software Development Intern- iOSJob Type: Internship (only 2024 Grads -currentlyโฆSee this and similar jobs on LinkedIn.
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Micron Hiring !!!
Role - Data Engineer
CTC - 20 lpa
Batch - 2023,22,21,20
https://careers.micron.com/careers/job/17504660
Role - Data Engineer
CTC - 20 lpa
Batch - 2023,22,21,20
https://careers.micron.com/careers/job/17504660