allcoding1_official
Статистика- Последний пост
- 14 авг.
- Последнее чтение
- 13 авг.
- Постов за неделю
- 3
- Всего постов
- 28
- Тип
- открытый
- Язык
- английский
- В каталоге с
- 13 авг.
- 1/24сутки в ленте
- 1 015
- 1/48двое суток
- 1 163
- 1/72трое суток
- 1 254
Оценка по просмотрам недавних постов: пост набирает почти всё за первые сутки.
Посты
видео или голосовое, без подписи
NTT Data is hiring for Technical Graduate Trainee Apply Now:- https://www.jobseekers19.com/2026/08/nttdata-for-hiring.html
𝐊𝐏𝐌𝐆 is hiring Position: Consultant Qualification: Bachelor’s/ Master’s Degree Experience: 0-2 (Years) Location: Bangalore/ Gurgaon Apply Now:- https://www.jobseekers19.com/2026/08/is-hiring.html
Qualcomm is hiring for Associate Software Engineer Salary: 10-20 LPA Apply here: https://www.jobseekers19.com/2026/08/qualcomm-is-hiring-for-associate.html
Apply Now:- https://www.jobseekers19.com/2026/08/ntt-data-is-hiring.html
Wipro Hiring Graduate Engineer Trainee Graduation Year: 2024 / 2025 / 2026 Salary: 3.2 LPA Location: Noida Apply Now:- https://www.jobseekers19.com/2026/08/wipro-hiring-graduate-engineer-trainee.html
Mastercard Hiring Software Engineer: Graduation Year: 2022 / 2023 / 2024 / 2025 Salary: 16 LPA Location: Pune Apply Link: https://careers.mastercard.com/us/en/job/MASRUSR281108EXTERNALENUS/Software-engineer
import java.util.*; class Main { public static int solve(int N, String colors, int[] neededTime) { long answer = 0; int i = 0; while (i < N) { int j = i; while (j + 1 < N && colors.charAt(j + 1) == colors.charAt(i)) j++; int len = j - i + 1; if (len >= 2) { long keep = 0; long diffuse = neededTime[i]; for (int k = i + 1; k <= j; k++) { long newKeep = diffuse; long newDiffuse = Math.min(keep, diffuse) + neededTime[k]; keep = newKeep; diffuse = newDiffuse; } answer += Math.min(keep, diffuse); } i = j + 1; } return (int) answer; }
видео или голосовое, без подписи
import java.util.*; class Main { public static int solve(String word1, String word2) { int n = word1.length(); int m = word2.length(); final int INF = 1_000_000; int[][][] dp = new int[n + 1][m + 1][2]; for (int i = 0; i <= n; i++) { for (int j = 0; j <= m; j++) { dp[i][j][0] = INF; dp[i][j][1] = INF; } } dp[n][m][0] = 0; dp[n][m][1] = 0; for (int i = n; i >= 0; i--) { for (int j = m; j >= 0; j--) { for (int p = 0; p < 2; p++) { if (i == n && j == m) continue; int ans = INF; if (i < n) { ans = Math.min(ans, 1 + dp[i + 1][j][p ^ 1]); } if (j < m) { ans = Math.min(ans, 1 + dp[i][j + 1][p ^ 1]); } if (i < n && j < m) { char c = word1.charAt(i); if (p == 1) { c = (char) ('a' + (c - 'a' + 13) % 26); } if (c == word2.charAt(j)) ans = Math.min(ans, dp[i + 1][j + 1][p]); else ans = Math.min(ans, 1 + dp[i + 1][j + 1][p]); } dp[i][j][p] = ans; } } } return dp[0][0][0]; }
видео или голосовое, без подписи
видео или голосовое, без подписи
def solve(N: int, nums: list) -> int: def max_product(arr): mx = mn = ans = arr[0] for x in arr[1:]: if x < 0: mx, mn = mn, mx mx = max(x, mx * x) mn = min(x, mn * x) ans = max(ans, mx) return ans res = -10**18 i = 0 while i < N: j = i while j + 1 < N and abs(nums[j]) < abs(nums[j + 1]): j += 1 res = max(res, max_product(nums[i:j + 1])) i = j + 1 return res
def is_vowel(ch): return ch in 'AEIOU' def solve(): data = sys.stdin.read().strip() if not data: return 0 s = data.split()[0] n = len(s) dp_vowel = [0] * (n + 1) dp_consonant = [0] * (n + 1) dp_consonant[0] = 1 for i in range(1, n + 1): if s[i-1] != '0': digit = int(s[i-1]) letter = chr(ord('A') + digit - 1) if is_vowel(letter): dp_vowel[i] = (dp_vowel[i] + dp_consonant[i-1]) % MOD else: dp_consonant[i] = (dp_consonant[i] + dp_consonant[i-1] + dp_vowel[i-1]) % MOD if i >= 2 and s[i-2] != '0': two_digit = int(s[i-2:i]) if 10 <= two_digit <= 26: letter = chr(ord('A') + two_digit - 1) if is_vowel(letter): dp_vowel[i] = (dp_vowel[i] + dp_consonant[i-2]) % MOD else: dp_consonant[i] = (dp_consonant[i] + dp_consonant[i-2] +dp_vowel[i-2]) % MOD
int solve(int N, int fee, vector<int>& prices) { int max_cash = 0; int bought_even_stock = -1e9; int bought_odd_stock = -1e9; for (int idx = 0; idx < N; idx++) { int current_price = prices[idx]; int updated_cash = max_cash; int updated_even_stock = bought_even_stock; int updated_odd_stock = bought_odd_stock; if (current_price % 2 == 0) { updated_even_stock = max(bought_even_stock, max_cash - current_price); if (bought_odd_stock != -1e9) { updated_cash = max(updated_cash, bought_odd_stock + current_price - fee); } } else { updated_odd_stock = max(bought_odd_stock, max_cash - current_price); if (bought_even_stock != -1e9) { updated_cash = max(updated_cash, bought_even_stock + current_price - fee); } } max_cash = updated_cash; bought_even_stock = updated_odd_stock; } return max_cash; }
Car code int solve(int T, int capacity, vector<vector<int>>& trips) { map<int, long long> passenger_diffs; for (int idx = 0; idx < T; idx++) { int count = trips[idx][0]; int start_loc = trips[idx][1]; int end_loc = trips[idx][2]; passenger_diffs[start_loc] += count; passenger_diffs[end_loc] -= count; } long long accumulated_standing_cost = 0; long long active_riders = 0; int last_point = -1; for (auto& entry : passenger_diffs) { int curr_point = entry.first; if (last_point != -1 && curr_point > last_point) { long long dist = curr_point - last_point; if (active_riders > capacity) { accumulated_standing_cost += (active_riders - capacity) * dist; } } active_riders += entry.second; last_point = curr_point; } return accumulated_standing_cost; }
int solve(int N, int days, vector<int>& weights) { int start_cap = 1; int end_cap = 0; for (int cargo_w : weights) { start_cap = max(start_cap, cargo_w); end_cap += cargo_w; } end_cap *= 2; int min_required_capacity = end_cap; while (start_cap <= end_cap) { int mid_cap = start_cap + (end_cap - start_cap) / 2; int active_day = 1; int loaded_weight = 0; int pkg_idx = 0; bool fits_in_time = true; while (pkg_idx < N) { if (active_day > days) { fits_in_time = false; break; } int day_capacity = (active_day % 2 == 1) ? mid_cap : (mid_cap / 2); if (weights[pkg_idx] > day_capacity) { active_day++; loaded_weight = 0; continue; } if (loaded_weight + weights[pkg_idx] <= day_capacity) { loaded_weight += weights[pkg_idx]; pkg_idx++; } else { active_day++; loaded_weight = 0; } } if (fits_in_time && active_day <= days) { min_required_capacity = mid_cap; end_cap = mid_cap - 1; } else { start_cap = mid_cap + 1; } } return min_required_capacity; }
видео или голосовое, без подписи
int solve(int N, int P, vector<vector<int>>& costs) { int half = N / 2; const int MAX_VAL = 1e9; vector<vector<vector<int>>> table(N + 1, vector<vector<int>>(half + 1, vector<int>(2, MAX_VAL))); table[1][1][0] = costs[0][0]; table[1][0][1] = costs[0][1]; for (int idx = 1; idx < N; idx++) { for (int cityA_cnt = 0; cityA_cnt <= half; cityA_cnt++) { for (int prev_city = 0; prev_city < 2; prev_city++) { if (table[idx][cityA_cnt][prev_city] == MAX_VAL) continue; if (cityA_cnt + 1 <= half) { int extra = (prev_city == 0) ? P : 0; table[idx + 1][cityA_cnt + 1][0] = min(table[idx + 1][cityA_cnt + 1][0], table[idx][cityA_cnt][prev_city] + costs[idx][0] + extra); } int cityB_cnt = idx - cityA_cnt; if (cityB_cnt + 1 <= half) { int extra = (prev_city == 1) ? P : 0; table[idx + 1][cityA_cnt][1] = min(table[idx + 1][cityA_cnt][1], table[idx][cityA_cnt][prev_city] + costs[idx][1] + extra); } } } } return min(table[N][half][0], table[N][half][1]); }
видео или голосовое, без подписи