How many of u 2024 Batch
Join below 👇👇 and share to Ur friends 😊😊
https://t.me/Coding_2024
https://t.me/Coding_2024
https://t.me/Coding_2024
Join below 👇👇 and share to Ur friends 😊😊
https://t.me/Coding_2024
https://t.me/Coding_2024
https://t.me/Coding_2024
👍2
Hi everyone!
It takes a lot of work to find and share useful opportunities every day. Can you help me by telling your college friends about our channel. Your support keeps me going and encourages me to share more opportunities. Just taking a few seconds to spread the word can make a big difference!
Thanks a lot😊🌟
Main Channel -
https://t.me/Coding_000 ❤️
Job Updates:
https://t.me/Offcampus_000 ✅
Free Exam help:
https://t.me/whitehatcoding ❤️
Projects -
https://t.me/Finalyearprojectcse_Ml 👨💻
https://coding000.github.io/Projects/
Share above all channels to your friends 😍✅✅
It takes a lot of work to find and share useful opportunities every day. Can you help me by telling your college friends about our channel. Your support keeps me going and encourages me to share more opportunities. Just taking a few seconds to spread the word can make a big difference!
Thanks a lot😊🌟
Main Channel -
https://t.me/Coding_000 ❤️
Job Updates:
https://t.me/Offcampus_000 ✅
Free Exam help:
https://t.me/whitehatcoding ❤️
Projects -
https://t.me/Finalyearprojectcse_Ml 👨💻
https://coding000.github.io/Projects/
Share above all channels to your friends 😍✅✅
❤1👍1
HCL INTERNAL EXAM Cleared🥳😍❤️
Congratulations 🎉🎉🥳
Helped Proof 👇👇
https://t.me/Coding_000/6008?single
Any exam Book your slot ✅
Contact here @ILOVEU_143❤️
100% clearance guarantee 🔥🔥
Share my channel with your friends and college groups🥳
Trust us Expect us ❤️
Congratulations 🎉🎉🥳
Helped Proof 👇👇
https://t.me/Coding_000/6008?single
Any exam Book your slot ✅
Contact here @ILOVEU_143❤️
100% clearance guarantee 🔥🔥
Share my channel with your friends and college groups🥳
Trust us Expect us ❤️
❤2🤩1
👉🏻Hello guy's Anyone Need EXAM ASSISTANCE....📖🖋️
✅DUOLINGO - 125+🔥
✅GRE - 315+
✅TOEFL - 90+
📥DM me @ILOVEU_143 ❤️for above exam assistance..😊
Share @coding_000✅
✅DUOLINGO - 125+🔥
✅GRE - 315+
✅TOEFL - 90+
📥DM me @ILOVEU_143 ❤️for above exam assistance..😊
Share @coding_000✅
👍3
TECH Mahindra Exam
Round 2
Help available.👨💻
100% Clearance GUARANTEE.✅
Check our past Results. 👇👇
https://t.me/Coding_000/5567?single
https://t.me/Coding_000/5563?single
Contact @ILOVEU_143 ✅
Round 2
Help available.👨💻
100% Clearance GUARANTEE.✅
Check our past Results. 👇👇
https://t.me/Coding_000/5567?single
https://t.me/Coding_000/5563?single
Contact @ILOVEU_143 ✅
❤1👍1
Dm @ILOVEU_143✅
For Coding Help or Any Exam Help 😄
💯 Clearance ✅
Check the previous proofs 👆👆
Share @Coding_000❤️
For Coding Help or Any Exam Help 😄
💯 Clearance ✅
Check the previous proofs 👆👆
Share @Coding_000❤️
👍1👏1
𝐇𝐞𝐥𝐥𝐨 𝐄𝐯𝐞𝐫𝐲𝐨𝐧𝐞,
𝐔𝐧𝐥𝐨𝐜𝐤 𝐲𝐨𝐮𝐫 𝐥𝐞𝐚𝐫𝐧𝐢𝐧𝐠 𝐩𝐨𝐭𝐞𝐧𝐭𝐢𝐚𝐥 𝐰𝐢𝐭𝐡 𝐄𝐚𝐫𝐧𝐲𝐐𝐮𝐢𝐳! 🚀🧠 𝐃𝐚𝐢𝐥𝐲 𝐪𝐮𝐢𝐳𝐳𝐞𝐬, 𝐫𝐞𝐚𝐥 𝐫𝐞𝐰𝐚𝐫𝐝𝐬. 𝐉𝐨𝐢𝐧 𝐧𝐨𝐰: https://www.earnyquiz.in/ 🌟 https://t.me/+wDV6hLEouWI1MWU1
😁😅Earn money by solving questions
𝐔𝐧𝐥𝐨𝐜𝐤 𝐲𝐨𝐮𝐫 𝐥𝐞𝐚𝐫𝐧𝐢𝐧𝐠 𝐩𝐨𝐭𝐞𝐧𝐭𝐢𝐚𝐥 𝐰𝐢𝐭𝐡 𝐄𝐚𝐫𝐧𝐲𝐐𝐮𝐢𝐳! 🚀🧠 𝐃𝐚𝐢𝐥𝐲 𝐪𝐮𝐢𝐳𝐳𝐞𝐬, 𝐫𝐞𝐚𝐥 𝐫𝐞𝐰𝐚𝐫𝐝𝐬. 𝐉𝐨𝐢𝐧 𝐧𝐨𝐰: https://www.earnyquiz.in/ 🌟 https://t.me/+wDV6hLEouWI1MWU1
😁😅Earn money by solving questions
👍3
Dm @ILOVEU_143✅
For Coding Help or Any Exam Help 😄
💯 Clearance ✅
Check the previous proofs 👆👆
Share @Coding_000❤️
For Coding Help or Any Exam Help 😄
💯 Clearance ✅
Check the previous proofs 👆👆
Share @Coding_000❤️
👍2
👍6
How many Of u writing Infosys Exam Today ?
Give reactions....❤️
Based on reactions i will help...✅
Otherwise I will sleep..😴
Share our channel make 4.5k 🎯🎯
Share @coding_000❤️✅
Give reactions....❤️
Based on reactions i will help...✅
Otherwise I will sleep..😴
Share our channel make 4.5k 🎯🎯
Share @coding_000❤️✅
❤19👍3🔥1
How many facing login issue in Infosys..?
Hit like...👍👍
Hit like...👍👍
👍14
Guys pls check now working...
👍1
The Infosys online test for the SP role has been scheduled for Sunday,
21st January, 2024 from 2:30 PM to 5:30 PM.
The test window is stuck and the team is working from backend and it will be sorted in next 10 minutes
Don't refresh and close the window. Stay there.
The test will be starting soon and the time will be extended.
21st January, 2024 from 2:30 PM to 5:30 PM.
The test window is stuck and the team is working from backend and it will be sorted in next 10 minutes
Don't refresh and close the window. Stay there.
The test will be starting soon and the time will be extended.
👍3❤1
#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll dp[10005][2];
const int mod = (1e9 + 7);
ll solve(ll i, ll o, ll n, ll k, vector<ll> &v) {
if (i > n) {
return 0;
}
if (dp[i][o] != -1)
return dp[i][o];
ll ans = 0;
if (o == 0) {
for (int j = i; j < min(n + 1, i + k); j++) {
ans = max(ans, solve(j + 1, 1 - o, n, k, v)) % mod;
}
} else {
ll ta = 0;
ll mx = 0;
for (int j = i; j < min(n + 1, i + k); j++) {
if (ta + v[j] >= 0) {
ta += v[j];
mx = max(mx, ta);
} else {
ta = 0;
}
ll c = solve(j + 1, 1 - o, n, k, v) % mod;
ans = max(ans, ((j - i + 1) * mx) % mod + c % mod);
}
}
return dp[i][o] = ans;
}
int main() {
ll n, k;
cin >> n >> k;
vector<ll> v;
ll neg = 0;
for (int i = 0; i < n; i++) {
ll x;
cin >> x;
v.push_back(x);
if (x <= 0)
neg++;
}
if (neg == v.size()) {
cout << 0 << endl;
return 1;
}
memset(dp, -1, sizeof(dp));
cout << max(solve(0, 0, v.size() - 1, k, v), solve(0, 1, v.size() - 1, k, v)) << endl;
}
Array Segment
Infosys ✅
using namespace std;
#define ll long long
ll dp[10005][2];
const int mod = (1e9 + 7);
ll solve(ll i, ll o, ll n, ll k, vector<ll> &v) {
if (i > n) {
return 0;
}
if (dp[i][o] != -1)
return dp[i][o];
ll ans = 0;
if (o == 0) {
for (int j = i; j < min(n + 1, i + k); j++) {
ans = max(ans, solve(j + 1, 1 - o, n, k, v)) % mod;
}
} else {
ll ta = 0;
ll mx = 0;
for (int j = i; j < min(n + 1, i + k); j++) {
if (ta + v[j] >= 0) {
ta += v[j];
mx = max(mx, ta);
} else {
ta = 0;
}
ll c = solve(j + 1, 1 - o, n, k, v) % mod;
ans = max(ans, ((j - i + 1) * mx) % mod + c % mod);
}
}
return dp[i][o] = ans;
}
int main() {
ll n, k;
cin >> n >> k;
vector<ll> v;
ll neg = 0;
for (int i = 0; i < n; i++) {
ll x;
cin >> x;
v.push_back(x);
if (x <= 0)
neg++;
}
if (neg == v.size()) {
cout << 0 << endl;
return 1;
}
memset(dp, -1, sizeof(dp));
cout << max(solve(0, 0, v.size() - 1, k, v), solve(0, 1, v.size() - 1, k, v)) << endl;
}
Array Segment
Infosys ✅
🔥3❤1👍1
#include <iostream>
#include <vector>
#include <deque>
#include <unordered_map>
using namespace std;
int smartTaxiDriver(int N, int K, vector<int>& T, vector<int>& P, vector<int>& C) {
unordered_map<int, vector<pair<int, int>>> g;
for (int i = 0; i < N - 1; ++i) {
g[P[i] - 1].push_back({i + 2, C[i]});
}
int mpc = 0;
for (int sn = 1; sn <= N; ++sn) {
vector<int> d(N + 1, -1);
d[sn] = 0;
deque<pair<int, int>> q = {{sn, 0}};
while (!q.empty()) {
auto [cn, cd] = q.front();
q.pop_front();
for (auto& [ne, rd] : g[cn]) {
if (d[ne] == -1 || d[ne] > cd + rd) {
d[ne] = cd + rd;
q.push_back({ne, d[ne]});
}
}
}
int pc = 0;
for (int des : T) {
if (d[des] <= K) {
pc++;
}
}
mpc = max(mpc, pc);
}
return mpc - 1;
}
int main() {
int N, K;
cin >> N >> K;
vector<int> T(N - 1), P(N - 1), C(N - 1);
for (int i = 0; i < N - 1; ++i) {
cin >> T[i];
}
for (int i = 0; i < N - 1; ++i) {
cin >> P[i];
}
for (int i = 0; i < N - 1; ++i) {
cin >> C[i];
}
int res = smartTaxiDriver(N, K, T, P, C);
cout << res << endl;
return 0;
}
Smart Taxi Driver ✅
Infosys @coding_000❤️
#include <vector>
#include <deque>
#include <unordered_map>
using namespace std;
int smartTaxiDriver(int N, int K, vector<int>& T, vector<int>& P, vector<int>& C) {
unordered_map<int, vector<pair<int, int>>> g;
for (int i = 0; i < N - 1; ++i) {
g[P[i] - 1].push_back({i + 2, C[i]});
}
int mpc = 0;
for (int sn = 1; sn <= N; ++sn) {
vector<int> d(N + 1, -1);
d[sn] = 0;
deque<pair<int, int>> q = {{sn, 0}};
while (!q.empty()) {
auto [cn, cd] = q.front();
q.pop_front();
for (auto& [ne, rd] : g[cn]) {
if (d[ne] == -1 || d[ne] > cd + rd) {
d[ne] = cd + rd;
q.push_back({ne, d[ne]});
}
}
}
int pc = 0;
for (int des : T) {
if (d[des] <= K) {
pc++;
}
}
mpc = max(mpc, pc);
}
return mpc - 1;
}
int main() {
int N, K;
cin >> N >> K;
vector<int> T(N - 1), P(N - 1), C(N - 1);
for (int i = 0; i < N - 1; ++i) {
cin >> T[i];
}
for (int i = 0; i < N - 1; ++i) {
cin >> P[i];
}
for (int i = 0; i < N - 1; ++i) {
cin >> C[i];
}
int res = smartTaxiDriver(N, K, T, P, C);
cout << res << endl;
return 0;
}
Smart Taxi Driver ✅
Infosys @coding_000❤️
🔥2❤1👍1
This media is not supported in your browser
VIEW IN TELEGRAM
#include <bits/stdc++.h>
using namespace std;
void solve(vector<vector<int>> vv, int operation, int xx, int yy, int &res)
{
for (int i = 1; i < 3; i++)
{
int sum1 = 0;
for (int j = 0; j < vv.size(); j++)
{
sum1 += vv[j][i - 1];
}
int sum2 = 0;
for (int j = 0; j < vv.size(); j++)
{
sum2 += vv[j][i];
}
if (sum1 == sum2)
{
res = min(res, operation);
}
return;
}
for (int i = 0; i < vv.size(); i++)
{
solve(vv, operation, xx, yy, res);
vector<int> p1 = vv[i];
reverse(p1.begin(), p1.end());
solve(vv, operation + yy, xx, yy, res);
vector<int> p2 = vv[i];
int temp1 = p2[0];
int temp2 = p2[1];
int temp3 = p2[2];
p2[2] = temp1;
p2[1] = temp3;
p2[0] = temp2;
solve(vv, operation + xx, xx, yy, res);
vector<int> p3 = vv[i];
temp1 = p2[0];
temp2 = p2[1];
temp3 = p2[2];
p2[2] = temp2;
p2[1] = temp1;
p2[0] = temp3;
solve(vv, operation + xx, xx, yy, res);
}
return;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t = 1;
while (t--)
{
int n = 0, m = 0, a = 0, b = 0, c = 0, d = 0, sum = 0, diff = 0, maxN = 0, minN = 0, count = 0, temp = 0;
bool flag = false;
cin >> n;
cin >> m;
int xx;
cin >> xx;
int yy;
cin >> yy;
vector<vector<int>> vv(n, vector<int>(m));
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cin >> vv[i][j];
}
}
if (n == 1)
{
cout << -1 << endl;
continue;
}
int res = INT_MAX;
solve(vv, 0, xx, yy, res);
cout << res << endl;
}
return 0;
}
Pay for Gift ✅
Infosys share @coding_000❤️
using namespace std;
void solve(vector<vector<int>> vv, int operation, int xx, int yy, int &res)
{
for (int i = 1; i < 3; i++)
{
int sum1 = 0;
for (int j = 0; j < vv.size(); j++)
{
sum1 += vv[j][i - 1];
}
int sum2 = 0;
for (int j = 0; j < vv.size(); j++)
{
sum2 += vv[j][i];
}
if (sum1 == sum2)
{
res = min(res, operation);
}
return;
}
for (int i = 0; i < vv.size(); i++)
{
solve(vv, operation, xx, yy, res);
vector<int> p1 = vv[i];
reverse(p1.begin(), p1.end());
solve(vv, operation + yy, xx, yy, res);
vector<int> p2 = vv[i];
int temp1 = p2[0];
int temp2 = p2[1];
int temp3 = p2[2];
p2[2] = temp1;
p2[1] = temp3;
p2[0] = temp2;
solve(vv, operation + xx, xx, yy, res);
vector<int> p3 = vv[i];
temp1 = p2[0];
temp2 = p2[1];
temp3 = p2[2];
p2[2] = temp2;
p2[1] = temp1;
p2[0] = temp3;
solve(vv, operation + xx, xx, yy, res);
}
return;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t = 1;
while (t--)
{
int n = 0, m = 0, a = 0, b = 0, c = 0, d = 0, sum = 0, diff = 0, maxN = 0, minN = 0, count = 0, temp = 0;
bool flag = false;
cin >> n;
cin >> m;
int xx;
cin >> xx;
int yy;
cin >> yy;
vector<vector<int>> vv(n, vector<int>(m));
for (int i = 0; i < n; i++)
{
for (int j = 0; j < m; j++)
{
cin >> vv[i][j];
}
}
if (n == 1)
{
cout << -1 << endl;
continue;
}
int res = INT_MAX;
solve(vv, 0, xx, yy, res);
cout << res << endl;
}
return 0;
}
Pay for Gift ✅
Infosys share @coding_000❤️
🔥2❤1