Selected Solutions from 2024 Nowcoder Winter Algorithm Camp

A. Cosmic End Find a number within a given range that is the product of three distinct primes. Given the small constraitn (upper bound ≤ 100), precompute small primes and check all combinations of three distinct ones. The maximum third prime needed is around 100/(2×3) ≈ 16, so checking primes up to 19 suffices. #include <bits/stdc++.h> us ...

Posted on Sun, 05 Jul 2026 16:45:51 +0000 by heimskr

NowCoder 2024 Multi-University Contest Round 1: Problem Set Analysis

The contest comprised 11 problems with varying difficulty levels based on technical depth: High Solvability (8/11): Problems A, B, C, D, H, I, J, K generally follow standard patterns. Low Solvability (3/11): E, F, G involve complex nested algorithms or obscure insights. The following sections detail the solutions for the most instructive prob ...

Posted on Fri, 08 May 2026 13:20:15 +0000 by gwh

Competitive Programming Weekly Solutions: Winter Algorithm Training Contests

2024 Nowcoder Winter Algorithm Training Camp 4 A - Lemon Soda Check if the first value is at least k times the second value. Complexity: O(1) #include <bits/stdc++.h> using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int x, y, factor; cin >> x >> y >&gt ...

Posted on Fri, 08 May 2026 03:23:40 +0000 by bigphpn00b