👍4
📢 𝐇𝐞𝐲 𝐞𝐯𝐞𝐫𝐲𝐨𝐧𝐞! 𝐁𝐢𝐠 𝐧𝐞𝐰𝐬!
𝐎𝐧 𝐀𝐮𝐠𝐮𝐬𝐭 4𝐭𝐡, 𝐈'𝐥𝐥 𝐛𝐞 𝐨𝐟𝐟𝐞𝐫𝐢𝐧𝐠 𝐅𝐑𝐄𝐄 𝐈𝐧𝐟𝐨𝐬𝐲𝐬 𝐜𝐨𝐝𝐢𝐧𝐠 𝐡𝐞𝐥𝐩 🆓🆓💻.
𝐈'𝐥𝐥 𝐬𝐡𝐚𝐫𝐞 𝐚𝐥𝐥 𝐭𝐡𝐞 𝐜𝐨𝐝𝐞𝐬 𝐫𝐢𝐠𝐡𝐭 𝐡𝐞𝐫𝐞, 𝐬𝐨 𝐦𝐚𝐤𝐞 𝐬𝐮𝐫𝐞 𝐭𝐨 𝐭𝐞𝐥𝐥 𝐚𝐥𝐥 𝐲𝐨𝐮𝐫 𝐟𝐫𝐢𝐞𝐧𝐝𝐬! 🚀
🔄 𝐏𝐥𝐞𝐚𝐬𝐞 𝐬𝐡𝐚𝐫𝐞 𝐨𝐮𝐫 𝐜𝐡𝐚𝐧𝐧𝐞𝐥, 𝐚𝐧𝐝 𝐝𝐨𝐧'𝐭 𝐟𝐨𝐫𝐠𝐞𝐭 𝐭𝐨 𝐭𝐰𝐞𝐚𝐤 𝐭𝐡𝐞 𝐯𝐚𝐫𝐢𝐚𝐛𝐥𝐞 𝐧𝐚𝐦𝐞𝐬 𝐢𝐧 𝐭𝐡𝐞 𝐜𝐨𝐝𝐞𝐬 𝐭𝐨 𝐦𝐚𝐤𝐞 𝐭𝐡𝐞𝐦 𝐲𝐨𝐮𝐫 𝐨𝐰𝐧! 👨💻👩💻
𝐓𝐡𝐚𝐧𝐤𝐬 𝐟𝐨𝐫 𝐭𝐡𝐞 𝐬𝐮𝐩𝐩𝐨𝐫𝐭 @Coding_000✅
Share @Coding_000❤️
https://t.me/Coding_000
https://t.me/Coding_000
𝐎𝐧 𝐀𝐮𝐠𝐮𝐬𝐭 4𝐭𝐡, 𝐈'𝐥𝐥 𝐛𝐞 𝐨𝐟𝐟𝐞𝐫𝐢𝐧𝐠 𝐅𝐑𝐄𝐄 𝐈𝐧𝐟𝐨𝐬𝐲𝐬 𝐜𝐨𝐝𝐢𝐧𝐠 𝐡𝐞𝐥𝐩 🆓🆓💻.
𝐈'𝐥𝐥 𝐬𝐡𝐚𝐫𝐞 𝐚𝐥𝐥 𝐭𝐡𝐞 𝐜𝐨𝐝𝐞𝐬 𝐫𝐢𝐠𝐡𝐭 𝐡𝐞𝐫𝐞, 𝐬𝐨 𝐦𝐚𝐤𝐞 𝐬𝐮𝐫𝐞 𝐭𝐨 𝐭𝐞𝐥𝐥 𝐚𝐥𝐥 𝐲𝐨𝐮𝐫 𝐟𝐫𝐢𝐞𝐧𝐝𝐬! 🚀
🔄 𝐏𝐥𝐞𝐚𝐬𝐞 𝐬𝐡𝐚𝐫𝐞 𝐨𝐮𝐫 𝐜𝐡𝐚𝐧𝐧𝐞𝐥, 𝐚𝐧𝐝 𝐝𝐨𝐧'𝐭 𝐟𝐨𝐫𝐠𝐞𝐭 𝐭𝐨 𝐭𝐰𝐞𝐚𝐤 𝐭𝐡𝐞 𝐯𝐚𝐫𝐢𝐚𝐛𝐥𝐞 𝐧𝐚𝐦𝐞𝐬 𝐢𝐧 𝐭𝐡𝐞 𝐜𝐨𝐝𝐞𝐬 𝐭𝐨 𝐦𝐚𝐤𝐞 𝐭𝐡𝐞𝐦 𝐲𝐨𝐮𝐫 𝐨𝐰𝐧! 👨💻👩💻
𝐓𝐡𝐚𝐧𝐤𝐬 𝐟𝐨𝐫 𝐭𝐡𝐞 𝐬𝐮𝐩𝐩𝐨𝐫𝐭 @Coding_000✅
Share @Coding_000❤️
https://t.me/Coding_000
https://t.me/Coding_000
🥰4👍2👏2
How many Of u writing Infosys Exam August 4th ?
Give reactions....❤️
Based on reactions i will help...✅
Share our channel @CODING_000❤️
Share @coding_000❤️✅
Give reactions....❤️
Based on reactions i will help...✅
Share our channel @CODING_000❤️
Share @coding_000❤️✅
❤29👍5
Guys share our channel to all your friends ✅
Share @Coding_000😊
https://t.me/Coding_000
https://t.me/Coding_000
https://t.me/Coding_000
Share @Coding_000😊
https://t.me/Coding_000
https://t.me/Coding_000
https://t.me/Coding_000
🥰3👍1👏1
To remove Plagiarism 👇👇
1) Use your Own template✅
2) Change Variables ✅
3) Try to read input in unique style✅
4) Understand the code and write in your style ✅
@coding_000
5) Write whole code in main function / write in diffrent function✅
6) Change Function name solve()=> unique✅
7) If possible change flow of the problem (if it doesn't impact the logic of code)✅
@coding_000
there are so many other things to avoid Plagiarism🔥🔲
@Coding_000❤️
Everyone pls Follow this To qualify INFOSYS EXAM 💯✅
1) Use your Own template✅
2) Change Variables ✅
3) Try to read input in unique style✅
4) Understand the code and write in your style ✅
@coding_000
5) Write whole code in main function / write in diffrent function✅
6) Change Function name solve()=> unique✅
7) If possible change flow of the problem (if it doesn't impact the logic of code)✅
@coding_000
there are so many other things to avoid Plagiarism🔥🔲
@Coding_000❤️
Everyone pls Follow this To qualify INFOSYS EXAM 💯✅
❤5👍3👏3
See u all at 11 am ✅
Share @Coding_000❤️
I request you to share this channel to your friends, wattsup groups and college groups 😎😎😎
https://t.me/Coding_000
https://t.me/Coding_000
Share @Coding_000❤️
I request you to share this channel to your friends, wattsup groups and college groups 😎😎😎
https://t.me/Coding_000
https://t.me/Coding_000
❤3👍2🥰1
Start at 11:20 or 11:25 ✅
Give reactions..❤️👍
Give reactions..❤️👍
❤12👍3
Start at 11:22 ✅
❤2👍2
Send your Coding Questions here 👇
https://t.me/exams_discussion
https://t.me/exams_discussion
👍2
const int MODULO = 1e9 + 7;
int main() {
int numElements, divisor;
cin >> numElements >> divisor;
vector<int> elements(numElements);
for (int i = 0; i < numElements; i++) {
cin >> elements[i];
}
vector<vector<vector<long long>>> dp(divisor, vector<vector<long long>>(divisor, vector<long long>(divisor, 0)));
dp[0][0][0] = 1;
for (int value : elements) {
vector<vector<vector<long long>>> newDp(divisor, vector<vector<long long>>(divisor, vector<long long>(divisor, 0)));
for (int rSum = 0; rSum < divisor; rSum++) {
for (int gSum = 0; gSum < divisor; gSum++) {
for (int bSum = 0; bSum < divisor; bSum++) {
if (dp[rSum][gSum][bSum] > 0) {
newDp[(rSum + value) % divisor][gSum][bSum] = (newDp[(rSum + value) % divisor][gSum][bSum] + dp[rSum][gSum][bSum]) % MODULO;
newDp[rSum][(gSum + value) % divisor][bSum] = (newDp[rSum][(gSum + value) % divisor][bSum] + dp[rSum][gSum][bSum]) % MODULO;
newDp[rSum][gSum][(bSum + value) % divisor] = (newDp[rSum][gSum][(bSum + value) % divisor] + dp[rSum][gSum][bSum]) % MODULO;
}
}
}
}
dp = newDp;
}
long long result = 0;
for (int rSum = 0; rSum < divisor; rSum++) {
for (int gSum = 0; gSum < divisor; gSum++) {
int bSum = (divisor - rSum - gSum) % divisor;
if (bSum < 0) bSum += divisor;
result = (result + dp[rSum][gSum][bSum]) % MODULO;
}
}
cout << result << endl;
return 0;
}
RGB COUNTING CODE C++✅
🔥2👍1
This media is not supported in your browser
VIEW IN TELEGRAM
Guys wait don`t start i will upload all...
👍1
Unmute this channel and share this channel to all your friends...
Start at 11:22 ✅
Start at 11:22 ✅
👍2
Now start and share ur questiona below...👇👇👇
Send your Coding Questions here 👇
https://t.me/exams_discussion
Send your Coding Questions here 👇
https://t.me/exams_discussion
from collections import defaultdict, deque
def dfs_count(node, parent, adj, A, mod_target):
count = 0
stack = [(node, parent)]
while stack:
current, parent = stack.pop()
if A[current] % 3 == mod_target:
count += 1
for neighbor in adj[current]:
if neighbor != parent:
stack.append((neighbor, current))
return count
def solve(N, M, A, E, Q, Queries):
adj = defaultdict(list)
for u, v in E:
adj[u-1].append(v-1)
adj[v-1].append(u-1)
total_result = 0
for query in Queries:
if query[0] == 1:
_, U, X = query
U -= 1
A[U] = X
elif query[0] == 2:
_, U, X = query
U -= 1
mod_target = X % 3
count = dfs_count(U, -1, adj, A, mod_target)
total_result += count
return total_result % (10**9 + 7)
Path Queries On MOD
Share our channel @Coding_000❤️
python✅
def dfs_count(node, parent, adj, A, mod_target):
count = 0
stack = [(node, parent)]
while stack:
current, parent = stack.pop()
if A[current] % 3 == mod_target:
count += 1
for neighbor in adj[current]:
if neighbor != parent:
stack.append((neighbor, current))
return count
def solve(N, M, A, E, Q, Queries):
adj = defaultdict(list)
for u, v in E:
adj[u-1].append(v-1)
adj[v-1].append(u-1)
total_result = 0
for query in Queries:
if query[0] == 1:
_, U, X = query
U -= 1
A[U] = X
elif query[0] == 2:
_, U, X = query
U -= 1
mod_target = X % 3
count = dfs_count(U, -1, adj, A, mod_target)
total_result += count
return total_result % (10**9 + 7)
Path Queries On MOD
Share our channel @Coding_000❤️
python✅
❤1🔥1
#include <bits/stdc++.h>
using namespace std;
#define int long long
int32_t main()
{
int N, M;
cin >> N >> M;
vector<vector<int>> grid(N, vector<int>(M));
for (int i = 0; i < N; ++i)
{
for (int j = 0; j < M; ++j)
{
cin >> grid[i][j];
}
}
vector<vector<long long>> dp(N, vector<long long>(M, 0));
vector<vector<long long>> dogDistance(N, vector<long long>(M, LLONG_MAX));
if (grid[0][0] == 0)
{
dogDistance[0][0] = 0;
}
dp[0][0] = grid[0][0];
for (int i = 0; i < N; ++i)
{
for (int j = 0; j < M; ++j)
{
if (i == 0 && j == 0)
continue;
if (i > 0)
{
dp[i][j] = max(dp[i][j], dp[i - 1][j] + grid[i][j] - dogDistance[i - 1][j]);
dogDistance[i][j] = min(dogDistance[i][j], dogDistance[i - 1][j] + 2);
}
if (j > 0)
{
dp[i][j] = max(dp[i][j], dp[i][j - 1] + grid[i][j] - dogDistance[i][j - 1]);
dogDistance[i][j] = min(dogDistance[i][j], dogDistance[i][j - 1] + 2);
}
if (grid[i][j] == 0)
{
dogDistance[i][j] = 0;
}
}
}
cout << dp[N - 1][M - 1] << endl;
return 0;
}Lost in orange ✅- c++
👍2
def count_not_divisible(K, L, R):
def sieve_of_eratosthenes(n):
is_prime = [True] * (n + 1)
primes = []
for p in range(2, n + 1):
if is_prime[p]:
primes.append(p)
for multiple in range(p * p, n + 1, p):
is_prime[multiple] = False
return primes
def count_divisible_up_to(x, primes):
from itertools import combinations
count = 0
for i in range(1, len(primes) + 1):
for comb in combinations(primes, i):
lcm = 1
for num in comb:
lcm *= num
if lcm > x:
break
if lcm > x:
continue
if i % 2 == 1:
count += x // lcm
else:
count -= x // lcm
return count
def count_not_divisible_up_to(x, primes):
if x == 0:
return 0
return x - count_divisible_up_to(x, primes)
L = int(L)
R = int(R)
primes = sieve_of_eratosthenes(K)
count_R = count_not_divisible_up_to(R, primes)
count_L_minus_1 = count_not_divisible_up_to(L - 1, primes)
return count_R - count_L_minus_1
K = int(input().strip())
L = input().strip()
R = input().strip()
result = count_not_divisible(K, L, R)
print(result)
Divisible string ✅
Infosys
def sieve_of_eratosthenes(n):
is_prime = [True] * (n + 1)
primes = []
for p in range(2, n + 1):
if is_prime[p]:
primes.append(p)
for multiple in range(p * p, n + 1, p):
is_prime[multiple] = False
return primes
def count_divisible_up_to(x, primes):
from itertools import combinations
count = 0
for i in range(1, len(primes) + 1):
for comb in combinations(primes, i):
lcm = 1
for num in comb:
lcm *= num
if lcm > x:
break
if lcm > x:
continue
if i % 2 == 1:
count += x // lcm
else:
count -= x // lcm
return count
def count_not_divisible_up_to(x, primes):
if x == 0:
return 0
return x - count_divisible_up_to(x, primes)
L = int(L)
R = int(R)
primes = sieve_of_eratosthenes(K)
count_R = count_not_divisible_up_to(R, primes)
count_L_minus_1 = count_not_divisible_up_to(L - 1, primes)
return count_R - count_L_minus_1
K = int(input().strip())
L = input().strip()
R = input().strip()
result = count_not_divisible(K, L, R)
print(result)
Divisible string ✅
Infosys
👍1
Flower shop - python ✅
👍2