๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> p(n);
for (int i = 0; i < n; ++i) {
cin >> p[i];
}
vector<int> d(n, 1), c(n, 1);
for (int i = 1; i < n; ++i) {
for (int j = 0; j < i; ++j) {
if (p[i] > p[j]) {
if (d[i] < d[j] + 1) {
d[i] = d[j] + 1;
c[i] = c[j];
} else if (d[i] == d[j] + 1) {
c[i] += c[j];
}
}
}
}
int m = *max_element(d.begin(), d.end());
int res = 0;
for (int i = 0; i < n; ++i) {
if (d[i] == m) {
res += c[i];
}
}
cout << res << endl;
return 0;
}
BNP โ
#include <iostream>
#include <string>
#include <vector>
using namespace std;
string solve(string a, string b, int c) {
int d = a.length();
vector<bool> e(c + 1, false);
for (int f = 0; f < d; f++) {
int g = (b[f] - a[f] + 26) % 26;
bool h = false;
for (int i = 1; i <= c; i++) {
if (!e[i] && i == g) {
h = true;
e[i] = true;
break;
}
}
if (!h) {
return "No";
}
}
return "Yes";
}
int main() {
string a, b;
int c;
cin >> a >> b >> c;
cout << solve(a, b, c) << endl;
return 0;
}
MAQ โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Adtran is hiring Software Engineer
For 2021, 2022 gards
Location: Hyderabad
https://adtran.wd3.myworkdayjobs.com/en-US/ADTRAN/job/Software-Engineer_R003741
For 2021, 2022 gards
Location: Hyderabad
https://adtran.wd3.myworkdayjobs.com/en-US/ADTRAN/job/Software-Engineer_R003741
Myworkdayjobs
Software Engineer
Welcome! Our Growth is Creating Great Opportunities! Our team is expanding, and we want to hire the most talented people we can. Continued success depends on it! Once you've had a chance to explore our current open positions, apply to the ones you feel suitโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
#hiring #hiringintern #frontend #frontendhiring #intern | Pavan Gandhi | 45 comments
๐ Hiring Frontend Intern! ๐
We at MyWays.ai are looking for a talented Frontend Intern to join us in crafting user-centric experiences for our AI SaaS product, Zeko AI
๐ก Whatโs in it for you?
An opportunity to work with cutting-edge technologies, solveโฆ
We at MyWays.ai are looking for a talented Frontend Intern to join us in crafting user-centric experiences for our AI SaaS product, Zeko AI
๐ก Whatโs in it for you?
An opportunity to work with cutting-edge technologies, solveโฆ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
careers
Junior Associate-Application Development in Gurgaon, Haryana | Careers at SoftwareOne, Gurgaon, India
Why SoftwareOne?
Looking for an internship or first job? Starting your career is complicated, isn't it?
Not with us! You can become a new #swomie and enjoy the advantages we have prepared for new talents, as we want you to gain experience but also developโฆ
Looking for an internship or first job? Starting your career is complicated, isn't it?
Not with us! You can become a new #swomie and enjoy the advantages we have prepared for new talents, as we want you to gain experience but also developโฆ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <bits/stdc++.h>
using namespace std;
vector<int> solve(const string &s) {
int n = s.length();
vector<vector<int>> adj(n);
vector<int> result(n, 0);
for (int a = 0; a < n; a++) {
if (s[a] == '1') {
int b = 2 * a + 1;
int c = 2 * a + 2;
if (b < n && s[b] == '1')
{
adj[a].push_back(b);
adj[b].push_back(a);
}
if (c < n && s[c] == '1')
{
adj[a].push_back(c);
adj[c].push_back(a);
}
}
}
auto bfs = [&](int start) {
vector<int> dist(n, -1);
queue<int> q;
q.push(start);
dist[start] = 0;
int maxDist = 0;
while (!q.empty()) {
int u = q.front();
q.pop();
for (int v : adj[u]) {
if (dist[v] == -1) {
dist[v] = dist[u] + 1;
maxDist = max(maxDist, dist[v]);
q.push(v);
}
}
}
return maxDist;
};
for (int a = 0; a < n; a++)
{
if (s[a] == '1')
{
result[a] = bfs(a);
}
}
vector<int> res;
for (int a = 0; a < n; a++)
{
if (s[a] == '1')
{
res.push_back(result[a]);
}
}
return res;
}
int main() {
string s;
cin >> s;
vector<int> res = solve(s);
for (int x : res)
{
cout << x << " ";
}
cout << endl;
return 0;
}
Barclays โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Company Name : Zynga
Batch : 2023/2022/2021
Role : Software Engineer 1
Link : https://job-boards.greenhouse.io/zyngacareers/jobs/5379737004?gh_src=503a64f04us
Batch : 2023/2022/2021
Role : Software Engineer 1
Link : https://job-boards.greenhouse.io/zyngacareers/jobs/5379737004?gh_src=503a64f04us
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Linkedin
Simran Kataria on LinkedIn: ๐ Weโre Hiring! Join Our Team at Enalo Technologies Pvt. Ltd.!๐
We areโฆ | 239 comments
We areโฆ | 239 comments
๐ Weโre Hiring! Join Our Team at Enalo Technologies Pvt. Ltd.!๐
We are looking for a passionate and skilled Backend Developer Intern to join our dynamicโฆ | 239 comments on LinkedIn
We are looking for a passionate and skilled Backend Developer Intern to join our dynamicโฆ | 239 comments on LinkedIn
#include <bits/stdc++.h>
using namespace std;
vector<int> commonFootSteps(int fatherPos, int martinPos, int velFather, int steps) {
vector<int> answer(2, 0);
vector<int> temp(steps + 1, 0);
for (int i = 0; i <= steps; i++)
temp[i] = fatherPos + velFather * i - martinPos;
for (int i = 0; i <= steps; i++) {
if (temp[i] <= 0)
continue;
int v2 = temp[i];
int count = 0;
for (int j = i; j <= steps; j++) {
if (temp[j] % v2 == 0)
count++;
}
if (answer[0] <= count) {
answer[0] = count;
answer[1] = v2;
}
}
return answer;
}
int main() {
int x1, x2, v, n;
cin >> x1 >> x2 >> v >> n;
vector<int> result = commonFootSteps(x1, x2, v, n);
for (int i : result)
cout << i << " ";
return 0;
}
Barcalys โ
using namespace std;
vector<int> commonFootSteps(int fatherPos, int martinPos, int velFather, int steps) {
vector<int> answer(2, 0);
vector<int> temp(steps + 1, 0);
for (int i = 0; i <= steps; i++)
temp[i] = fatherPos + velFather * i - martinPos;
for (int i = 0; i <= steps; i++) {
if (temp[i] <= 0)
continue;
int v2 = temp[i];
int count = 0;
for (int j = i; j <= steps; j++) {
if (temp[j] % v2 == 0)
count++;
}
if (answer[0] <= count) {
answer[0] = count;
answer[1] = v2;
}
}
return answer;
}
int main() {
int x1, x2, v, n;
cin >> x1 >> x2 >> v >> n;
vector<int> result = commonFootSteps(x1, x2, v, n);
for (int i : result)
cout << i << " ";
return 0;
}
Barcalys โ
#include <iostream>
#include <vector>
int score(vector<int>& a) {
int n = a.size(), s = 0;
for (int i = 0; i < n - 1; ++i) {
int x = a[i] + a[i + 1];
if (x % 2 == 0) s += 5;
}
for (int i = 0; i < n - 2; ++i) {
int y = a[i] + a[i + 1] + a[i + 2];
int z = a[i] * a[i + 1] * a[i + 2];
if (y % 2 != 0 && z % 2 == 0) s += 10;
}
return s;
}
Impetus โ
#include <iostream>
#include <vector>
#include <cmath>
using namespace std;
void f(int x, vector<int>& p) {
vector<bool> v(x + 1, true);
v[0] = v[1] = false;
for (int i = 2; i <= x; i++) {
if (v[i]) {
p.push_back(i);
for (int j = i * i; j <= x; j += i)
v[j] = false;
}
}
}
void g(int n) {
int x = sqrt(n) + 1;
vector<int> p;
f(x, p);
int y = n - 1;
vector<bool> t(y, true);
for (int i = 0; i < p.size(); i++) {
int z = p[i];
int s = max(z * z, (2 + z - 1) / z * z);
for (int j = s; j <= n; j += z)
t[j - 2] = false;
}
for (int i = 0; i < y; i++) {
if (t[i])
cout << i + 2 << " ";
}
cout << endl;
}
int main() {
int n;
cin >> n;
g(n);
return 0;
}
Barcalys โ
#include <iostream>
#include <vector>
#include <climits>
#include <algorithm>
using namespace std;
int MinMax(int N, int M, vector<vector<int>>& A) {
int max_minimax = INT_MIN;
for (int mask = 0; mask < (1 << N); ++mask) {
int count = 0;
vector<int> column_max(M, INT_MIN);
for (int i = 0; i < N; ++i) {
if (mask & (1 << i)) {
count++;
for (int j = 0; j < M; ++j) {
column_max[j] = max(column_max[j], A[i][j]);
}
}
}
if (count == M - 1) {
int minimax = *min_element(column_max.begin(), column_max.end());
max_minimax = max(max_minimax, minimax);
}
}
return max_minimax;
}
Impetus โ
#include <vector>
#include <climits>
#include <algorithm>
using namespace std;
int MinMax(int N, int M, vector<vector<int>>& A) {
int max_minimax = INT_MIN;
for (int mask = 0; mask < (1 << N); ++mask) {
int count = 0;
vector<int> column_max(M, INT_MIN);
for (int i = 0; i < N; ++i) {
if (mask & (1 << i)) {
count++;
for (int j = 0; j < M; ++j) {
column_max[j] = max(column_max[j], A[i][j]);
}
}
}
if (count == M - 1) {
int minimax = *min_element(column_max.begin(), column_max.end());
max_minimax = max(max_minimax, minimax);
}
}
return max_minimax;
}
Impetus โ
#include <bits/stdc++.h>
using namespace std;
int ok(const vector<int>& arr) {
vector<int> lis;
for (int x : arr) {
auto it = lower_bound(lis.begin(), lis.end(), x);
if (it == lis.end()) {
lis.push_back(x);
} else {
*it = x;
}
}
return lis.size();
}
int FindminDiscard(const vector<int>& videoRatings) {
int n = videoRatings.size();
int lis = ok(videoRatings);
return n - min(n, lis + 1);
}
Interesting Watch Sequenceโ
๐๐ฆ ๐๐น๐ด๐ผ ๐ป ๐ ใ๐๐ผ๐บ๐ฝ๐ฒ๐๐ถ๐๐ถ๐๐ฒ ๐ฃ๐ฟ๐ผ๐ด๐ฟ๐ฎ๐บ๐บ๐ถ๐ป๐ดใ
Photo
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
bool ok(long long mid, vector<int>& engagement_scores, long long k) {
int n = engagement_scores.size();
long long count = 0;
long long current_or = 0;
for (int i = 0; i < n; ++i) {
current_or = 0;
for (int j = i; j < n; ++j) {
current_or |= engagement_scores[j];
if (current_or >= mid) {
count += (n - j);
break;
}
}
if (count >= k) return true;
}
return count >= k;
}
long long findKthHighestInteraction(vector<int>& engagement_scores, long long k) {
long long max_or = 0;
for (int num : engagement_scores) max_or |= num;
long long left = 0, right = max_or, result = 0;
while (left <= right) {
long long mid = left + (right - left) / 2;
if (ok(mid, engagement_scores, k)) {
result = mid;
left = mid + 1;
} else {
right = mid - 1;
}
}
return result;
}
Interaction strength on tik tok โ
#include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
vector<vector<int>> tasks(N, vector<int>(2));
for (int i = 0; i < N; i++) {
cin >> tasks[i][0] >> tasks[i][1];
}
vector<long long> dp(N, 0);
dp[0] = tasks[0][0];
dp[1] = max({
(long long)dp[0],
(long long)(tasks[1][0] + dp[0]),
(long long)tasks[1][1]
});
for (int i = 2; i < N; i++) {
dp[i] = max({
(long long)dp[i-1],
(long long)(tasks[i][0] + dp[i-1]),
(long long)(tasks[i][1] + dp[i-2])
});
}
cout << dp[N-1] << endl;
return 0;
}
Barclays โ
Forwarded from OffCampus Jobs | OnCampus Jobs | Daily Jobs Updates | Lastest Jobs | All Jobs | CSE Jobs | Fresher Jobs โฅ (Dushyant)
Referral Alert ๐จ
Company - Stealth Startup
Role - Frontend Developer Intern
Batch - 2023/2024/2025/2026
Stipend - 20-35k/month
Location - Remote
PPO after Internship
JD -
https://docs.google.com/document/d/1W_eTdPYmCjY4u-87u8Z-T0kERggL7Fh3GmWSmpOtYK8/edit?tab=t.0
Apply Link -
https://docs.google.com/forms/d/e/1FAIpQLSflX6h9OJTR5OuzrNXiCJHo6edSR0zh--hajoD57z5poYgXig/viewform
Company - Stealth Startup
Role - Frontend Developer Intern
Batch - 2023/2024/2025/2026
Stipend - 20-35k/month
Location - Remote
PPO after Internship
JD -
https://docs.google.com/document/d/1W_eTdPYmCjY4u-87u8Z-T0kERggL7Fh3GmWSmpOtYK8/edit?tab=t.0
Apply Link -
https://docs.google.com/forms/d/e/1FAIpQLSflX6h9OJTR5OuzrNXiCJHo6edSR0zh--hajoD57z5poYgXig/viewform
Google Docs
JD: Front End Developer Intern (Stealth Startup)
Job Title: Front End Developer Intern (Stealth Startup) Location: Remote / Onsite About Us: We are an innovative SaaS company focused on providing cutting-edge solutions to our clients. Our mission is to simplify complex workflows with user-friendly interfaces.โฆ
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.