标签: div3

10 篇文章

thumbnail
Codeforces Round 1080 (Div. 3)
链接:https://codeforces.com/contest/2195 A. Sieve of Erato67henes 算法: 数学。 思路: 由于 [latex]67[/latex] 为质数,所有就是判断数组中有没有 [latex]67[/latex]。 关键代码: void miyan() { int n; cin >> n; set&…
thumbnail
Codeforces Round 1076 (Div. 3)
链接:https://codeforces.com/contest/2193 A. DBMB and the Array 算法: 贪心。 思路: 考虑到操作可以执行任意次,所以只要数组和与 [latex]s[/latex] 的差是 [latex]x[/latex] 的倍数就可以满足题目要求。 关键代码: void miyan() { ll n, s…
thumbnail
Codeforces Round 1054 (Div. 3)
链接:https://codeforces.com/contest/2149 A. Be Positive 算法:     数学。 思路:     无。 关键代码: void miyan() { int n; cin >> n; vector<int> a(n); for (auto &x : …
thumbnail
Codeforces Round 1047 (Div. 3)
链接:https://codeforces.com/contest/2137 A. Collatz Conjecture     这题读假了以为是找出全部的可能值。 算法:     模拟。 思路:     无。 关键代码: voi…
thumbnail
Codeforces Round 1032 (Div. 3)
链接:https://codeforces.com/contest/2121 A. Letter Home 算法:     模拟。 思路:     分类讨论,判断是在全部点的左、右或中间即可。 关键代码: void solve() { int n, s; cin >> n >> s; vector<in…
thumbnail
Codeforces Round 1016 (Div. 3)
链接:https://codeforces.com/contest/2093 A. Ideal Generator 算法:     数学,打表。 思路:     无。 关键代码: void solve() { int k; cin >> k; if (k &…