#include<bits/stdc++.h>
using namespace std;
int dp[205][205][2];
int arr[205][205];
int solve(int i, int j, int d, int m, int n) {
if(i<0i>=m j<0 j>=n arr[i][j]==-1) return 0;
if(dp[i][j][d] != -1) return dp[i][j][d];
int res = arr[i][j];
if(d == 0) {
res += max(solve(i, j+1, d, m, n), solve(i+1, j, 1-d, m, n));
} else {
res += max(solve(i, j-1, d, m, n), solve(i+1, j, 1-d, m, n));
}
dp[i][j][d] = res;
return res;
}
int main() {
int t;
cin >> t;
while(t--) {
int m, n;
cin >> m >> n;
for(int i=0; i<m; i++) {
for(int j=0; j<n; j++) {
char c;
cin >> c;
if(c == '1') arr[i][j] = 1;
else if(c == '0') arr[i][j] = 0;
else arr[i][j] = -1;
}
}
memset(dp, -1, sizeof(dp));
cout << max(solve(0, 0, 0, m, n), arr[0][0] + solve(0, 0, 1, m, n)) << endl;
}
return 0;
}
Compro โ
using namespace std;
int dp[205][205][2];
int arr[205][205];
int solve(int i, int j, int d, int m, int n) {
if(i<0
if(dp[i][j][d] != -1) return dp[i][j][d];
int res = arr[i][j];
if(d == 0) {
res += max(solve(i, j+1, d, m, n), solve(i+1, j, 1-d, m, n));
} else {
res += max(solve(i, j-1, d, m, n), solve(i+1, j, 1-d, m, n));
}
dp[i][j][d] = res;
return res;
}
int main() {
int t;
cin >> t;
while(t--) {
int m, n;
cin >> m >> n;
for(int i=0; i<m; i++) {
for(int j=0; j<n; j++) {
char c;
cin >> c;
if(c == '1') arr[i][j] = 1;
else if(c == '0') arr[i][j] = 0;
else arr[i][j] = -1;
}
}
memset(dp, -1, sizeof(dp));
cout << max(solve(0, 0, 0, m, n), arr[0][0] + solve(0, 0, 1, m, n)) << endl;
}
return 0;
}
Compro โ
Today Anyone Give OA PayPal /Intuit ?
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Odoo
Role : Software Developer Internship - 4 Months
Batch : 2024 passouts
Stipend : 20,000 INR per month
Link : https://www.odoo.com/jobs/software-developer-intern-rs20000-00-month-stipend-685
Role : Software Developer Internship - 4 Months
Batch : 2024 passouts
Stipend : 20,000 INR per month
Link : https://www.odoo.com/jobs/software-developer-intern-rs20000-00-month-stipend-685
Odoo
Odoo Software Developer Job for Fresher in Gandhinagar
Odoo is looking for freshers/interns who are looking for jobs for software development in Gandhinagar. Join us today and get โน20,000 stipend/month and a good working environment. Apply Now!
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Cornerstone
Role: Junior Engineer (Testing Role)
Batch eligible: 2023 and 2024 passouts
Apply: https://cornerstone.csod.com/ux/ats/careersite/2/home/requisition/9133?c=cornerstone
Role: Junior Engineer (Testing Role)
Batch eligible: 2023 and 2024 passouts
Apply: https://cornerstone.csod.com/ux/ats/careersite/2/home/requisition/9133?c=cornerstone
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Nielsen is Hiring !!
Position: Analyst/ Data Analyst
Expected CTC: 5.4 - 8.6 LPA
Experienc๏ปฟe: Freshers/ Experienced
๐Link (Analyst): https://jobs.lever.co/nielsen/f4a5a515-59ce-4fac-b3ab-5840027426bc?lever-source=LinkedIn
๐Link (Data Analyst): https://jobs.lever.co/nielsen/a0937c64-1580-4c36-b0f6-510916f28982?lever-source=LinkedIn&source=6
Position: Analyst/ Data Analyst
Expected CTC: 5.4 - 8.6 LPA
Experienc๏ปฟe: Freshers/ Experienced
๐Link (Analyst): https://jobs.lever.co/nielsen/f4a5a515-59ce-4fac-b3ab-5840027426bc?lever-source=LinkedIn
๐Link (Data Analyst): https://jobs.lever.co/nielsen/a0937c64-1580-4c36-b0f6-510916f28982?lever-source=LinkedIn&source=6
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Rudderstack is Hiring !!
Role : SDE-Intern
Batch : 2023/2024/2025
๐Link : https://docs.google.com/forms/d/e/1FAIpQLSfNMdrzbRAi6tk2glX3amf6MRSry4S5H4G8-fFBi4nRYl8vgg/viewform
Role : SDE-Intern
Batch : 2023/2024/2025
๐Link : https://docs.google.com/forms/d/e/1FAIpQLSfNMdrzbRAi6tk2glX3amf6MRSry4S5H4G8-fFBi4nRYl8vgg/viewform
Google Docs
S/w Engineering Internship(Jan 2024) @ RudderStack
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Analyst Position at Dassault Systรจmes
Location - Pune
Qualifications/Experience:
- Bachelorโs Degree in Business, Finance, or Accounting (equivalent work experience considered)
- 0 to 1-year experience in finance and accounting streams preferred
- Excellent communication skills (verbal and written)
- Proficient with MS Office (Excel, Word, and PowerPoint)
- Strong analytical skills and a good team player
- Keen learner with a positive attitude
- Structured, disciplined, and flexible approach towards work
- Ability to work in cross-functional teams with a solution-finding approach
- Able to work in multiple and culturally different environments
- Able to maintain high quality in all deliverables and according to the operating principles
- Education: BCom/BCA/MCom/MBA-Finance/MBA-Marketing (Only passouts candidates)
- Immediate Joiners will be preferred
Interested candidates, please send your CV to
ganesh.thik@3ds.com
Location - Pune
Qualifications/Experience:
- Bachelorโs Degree in Business, Finance, or Accounting (equivalent work experience considered)
- 0 to 1-year experience in finance and accounting streams preferred
- Excellent communication skills (verbal and written)
- Proficient with MS Office (Excel, Word, and PowerPoint)
- Strong analytical skills and a good team player
- Keen learner with a positive attitude
- Structured, disciplined, and flexible approach towards work
- Ability to work in cross-functional teams with a solution-finding approach
- Able to work in multiple and culturally different environments
- Able to maintain high quality in all deliverables and according to the operating principles
- Education: BCom/BCA/MCom/MBA-Finance/MBA-Marketing (Only passouts candidates)
- Immediate Joiners will be preferred
Interested candidates, please send your CV to
ganesh.thik@3ds.com
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Nawansh Singla on LinkedIn: Data Associate
Are you looking for a remote job in the data domain? ๐ค
Here is an exciting opportunity ๐
๐ฐ Garner Health is hiring a data associate
(Freshers can applyโฆ
Here is an exciting opportunity ๐
๐ฐ Garner Health is hiring a data associate
(Freshers can applyโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
๐Amdocs is Hiring !!
Role: Associate Technical & Business Operations Analyst- Fresher
Expected CTC: 3 - 5 LPA
๐Apply here: https://jobs.amdocs.com/careers/job/563430996070471
Role: Associate Technical & Business Operations Analyst- Fresher
Expected CTC: 3 - 5 LPA
๐Apply here: https://jobs.amdocs.com/careers/job/563430996070471
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name: Credflow
Role: Backend Developer
Batch eligible: 2022 and 2023 passouts
CTC: 17-20 LPA
Apply: https://bit.ly/48RnuhZ
Role: Backend Developer
Batch eligible: 2022 and 2023 passouts
CTC: 17-20 LPA
Apply: https://bit.ly/48RnuhZ
#include <iostream>
#include <vector>
using namespace std;
vector<vector<int>> Availability(int N, vector<int> L, vector<int> R) {
int cur = 0;
vector<vector<int>> ans;
if (N == 0) {
ans.push_back({0, 1000000000});
}
for (int i = 0; i < N; i++) {
if (cur < L[i]) {
ans.push_back({cur, L[i]});
}
cur = R[i];
}
if (cur < 1000000000) {
ans.push_back({cur, 1000000000});
}
return ans;
}
Availability โ
#include <vector>
using namespace std;
vector<vector<int>> Availability(int N, vector<int> L, vector<int> R) {
int cur = 0;
vector<vector<int>> ans;
if (N == 0) {
ans.push_back({0, 1000000000});
}
for (int i = 0; i < N; i++) {
if (cur < L[i]) {
ans.push_back({cur, L[i]});
}
cur = R[i];
}
if (cur < 1000000000) {
ans.push_back({cur, 1000000000});
}
return ans;
}
Availability โ
vector<string> solve(string t, int Q, vector<string> q) {
stringstream ss(t);
string tk;
vector<string> p;
while (getline(ss, tk, '\"')) {
p.push_back(tk);
}
vector<string> r;
for (string qry : q) {
size_t pos = qry.find_last_of('.');
qry = qry.substr(pos + 1);
int j = 0;
for (j = 0; j < p.size(); j++) {
if (p[j] == qry) {
break;
}
}
r.push_back(p[j + 2]);
}
return r;
}
Json parsing โ
stringstream ss(t);
string tk;
vector<string> p;
while (getline(ss, tk, '\"')) {
p.push_back(tk);
}
vector<string> r;
for (string qry : q) {
size_t pos = qry.find_last_of('.');
qry = qry.substr(pos + 1);
int j = 0;
for (j = 0; j < p.size(); j++) {
if (p[j] == qry) {
break;
}
}
r.push_back(p[j + 2]);
}
return r;
}
Json parsing โ
#include<bits/stdc++.h>
using namespace std;
int findMessages (int N, vector<string> A) {
int ans=N;
set<string> st;
for(int i=0; i<N; i++) {
string s;
for(int j=0; j<A[i].size(); j++)
s += 'a' + ('z' - A[i][j]);
if (st.find(s) != st.end())
ans -= 1;
st.insert(A[i]);
}
return ans;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int N;
cin >> N;
vector<string> A(N);
for(int i_A = 0; i_A < N; i_A++)
{
cin >> A[i_A];
}
int out_;
out_ = findMessages(N, A);
cout << out_;
}
Alice and messages โ
using namespace std;
int findMessages (int N, vector<string> A) {
int ans=N;
set<string> st;
for(int i=0; i<N; i++) {
string s;
for(int j=0; j<A[i].size(); j++)
s += 'a' + ('z' - A[i][j]);
if (st.find(s) != st.end())
ans -= 1;
st.insert(A[i]);
}
return ans;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int N;
cin >> N;
vector<string> A(N);
for(int i_A = 0; i_A < N; i_A++)
{
cin >> A[i_A];
}
int out_;
out_ = findMessages(N, A);
cout << out_;
}
Alice and messages โ
def solve(N, A, D, V):
info_index = {
'bank_account_number': 0,
'account_holder_first_name': 1,
'account_holder_last_name': 2,
'registered_mobile_number': 3,
'branch_code': 4
}
filtered_accounts = [account for account in A if str(account[info_index[D]]) == V]
sorted_accounts = sorted(filtered_accounts, key=lambda x: int(x[0]))
output = "\n".join([" ".join(map(str, account)) for account in sorted_accounts])
return output
N = int(input())
A = []
for _ in range(N):
account_info = input().split()
account_info[0] = int(account_info[0])
account_info[3] = int(account_info[3])
account_info[4] = int(account_info[4])
A.append(account_info)
D = input()
V = input()
result = solve(N, A, D, V)
print(result)
Searching google pay saved account โ
info_index = {
'bank_account_number': 0,
'account_holder_first_name': 1,
'account_holder_last_name': 2,
'registered_mobile_number': 3,
'branch_code': 4
}
filtered_accounts = [account for account in A if str(account[info_index[D]]) == V]
sorted_accounts = sorted(filtered_accounts, key=lambda x: int(x[0]))
output = "\n".join([" ".join(map(str, account)) for account in sorted_accounts])
return output
N = int(input())
A = []
for _ in range(N):
account_info = input().split()
account_info[0] = int(account_info[0])
account_info[3] = int(account_info[3])
account_info[4] = int(account_info[4])
A.append(account_info)
D = input()
V = input()
result = solve(N, A, D, V)
print(result)
Searching google pay saved account โ
vector<int> solve(int N, const vector<vector<int>>& A, const vector<vector<int>>& queries) {
vector<int> results;
results.reserve(queries.size());
for (const auto& query : queries) {
int l = query[0];
int r = query[1];
int x = query[2];
int count = 0;
for (int i = l - 1; i < r; ++i) {
if (A[i][1] > x) {
++count;
}
}
results.push_back(count);
}
return results;
}
//Partial 6/10
Tax Payment โ
vector<int> results;
results.reserve(queries.size());
for (const auto& query : queries) {
int l = query[0];
int r = query[1];
int x = query[2];
int count = 0;
for (int i = l - 1; i < r; ++i) {
if (A[i][1] > x) {
++count;
}
}
results.push_back(count);
}
return results;
}
//Partial 6/10
Tax Payment โ
long long OneBlock(int N, vector<int> Arr) {//one block
vector<int> one_indices;
for (int i = 0; i < N; ++i) {
if (Arr[i] == 1) {
one_indices.push_back(i);
}
}
if (one_indices.size() <= 1) {
return 1;
}
long long ways = 1;
for (int i = 1; i < one_indices.size(); ++i) {
int zeros_between_ones = one_indices[i] - one_indices[i - 1] - 1;
ways *= (zeros_between_ones + 1);
}
return ways;
}