problems

Luogu CF633B 【A Trivial Problem】题解

一段理解起来特别容易的代码 (目前来看是最短的) ## 思路 由于末尾0的个数就是阶乘中分解出10的个数,也就是分解出2的个数与5的个数中的最小值; 显然5的个数小于2的个数,即找出分解出的5的个数。 **比较容易推出:当 $n$ 为 $5^{k}$ 的倍数时,其阶乘分解出 $5$ 的个数即为 $n ......
题解 Trivial Problem Luogu 633B

anolis 8.8 (CentOS 8) yum update error: Problem 1: package mod_ssl-1:2.4.37-56.0.1.module+an8.8.0+11061+87142f8c.6.x86_64 requires , but none of the providers can be installed

#yum update error message: Problem 1: package mod_ssl-1:2.4.37-56.0.1.module+an8.8.0+11061+87142f8c.6.x86_64 requires httpd = 2.4.37-56.0.1.module+an8 ......
installed providers requires Problem package

【cs50】lab7 & problem set7

(1)lab7 songs sqlite3 songs.db 1)list the names of all songs in the database SELECT name FROM songs; 2)list names of all songs in increasing order of ......
problem lab7 set7 amp lab

L11U3-3 Dealing with flight problems

## 1 Expressions Flight problems Listen to discuss bad news he receives about his flight. has been delayed. mechanical problems. has been canceled due ......
problems Dealing flight with 11

【论文解析】EJOR 2011 A clustering procedure for reducing the number of representative solutions in the Pareto Front of multiobjective optimization problems

> 论文名称:A clustering procedure for reducing the number of representative solutions in the Pareto Front of multiobjective optimization problems ### 动机 假 ......

【每日一题】Problem 522A. Reposts

[原题](https://codeforces.com/problemset/problem/522/A) #### 解决思路 用哈希表存储每个人物的节点长度即可 ```C++ #include int main() { std::map tree; tree["POLYCARP"] = 1; in ......
Problem Reposts 522

[Algorithm] Two crystal balls problem

You're given two identical crystal balls and a 100-story building. The balls are incredibly tough, but there exists some floor in the building, above ......
Algorithm crystal problem balls Two

LRU 力扣 146 https://leetcode.cn/problems/lru-cache/

一道经典题目,用双向链表去做能够满足O1的复杂度 核心代码如下 class LRUCache { MyLinkedList myLinkedList; int size; int capacity; HashMap<Integer, MyNode> map; public LRUCache(int ......
lru-cache leetcode problems https cache

A*B Problem(High)

###### ~~这高精度真__的难~~ ## 题目描述 给出两个自然数,求它们的乘积。 ## 输入格式 输入共两行,每行一个自然数。 ## 输出格式 输出一个自然数表示乘积。 ## 样例 #1 ### 样例输入 #1 ``` 1 2 ``` ### 样例输出 #1 ``` 2 ``` ## 提示 ......
Problem High

Could not fetch URL https://pypi.org/simple/keras-bert/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443):

pip下载包的时候报错 Could not fetch URL https://pypi.org/simple/keras-bert/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pyp ......

每日一题 力扣 445 https://leetcode.cn/problems/add-two-numbers-ii/

可以直接用栈去做就行,逆序想到栈的做法 然后算完一个就直接赋值给答案数组 我用的是常见 public ListNode addTwoNumbers(ListNode l1, ListNode l2) { int sizeA=0; int sizeB=0; ListNode start=l1; Lis ......

【每日一题】Problem 414B. Mashmokh and ACM

[原题](https://codeforces.com/problemset/problem/414/B) #### 解决思路 1. 先计算 $[1, n]$ 中的约数集合 2. $dp[i][j](i\in [1, n], j\in [1, k])$ 表示第 $j$ 个数放置 $i$ 所拥有的可能 ......
Mashmokh Problem 414 ACM and

【每日一题】Problem 289B. Polo the Penguin and Matrix

[原题](https://codeforces.com/problemset/problem/289/B) #### 解决思路 1. 题目要求将所有元素通过 **+-** 的方式变成同一个元素 $e$,那么就需要找到一个点,计算小于(或大于)$e$ 的所有点所需变化总次数 2. 因此可以将二维数组转 ......
Problem Penguin Matrix Polo 289

【每日一题】Problem 505B. Mr. Kitayuta's Colorful Graph

[原题](https://codeforces.com/contest/505/problem/B) #### 解决思路 考虑到数据量不大($2 \le n \le 100, 2 \le m \le 100, 1 \le a_i \lt b_i \le n, 1 \lt c_i \le m)$),因 ......
Kitayuta Colorful Problem Graph 505

Constructive Problem

Constructive Problem time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output As you know, any pro ......
Constructive Problem

【每日一题】Problem 489C. Given Length and Sum of Digits...

[原题](https://codeforces.com/problemset/problem/489/C) #### 解决思路 结果值越大,要求满足后续数位能成立的情况下,当前数位的值尽可能大;取最小结果同理 ##### 误区 1. 注意边界 - 一般情况下,数字开头不能为 0,除非数字长度为 ** ......
Problem Digits Length Given 489

【每日一题】Problem 476B. Dreamoon and WiFi

[原题](https://codeforces.com/problemset/problem/476/B) #### 解决思路 ##### 数学 不管 **recv** 字符串如何,最终的结果一定满足以下条件: 1. '+' 数量与 **send** 字符串相同 2. '-' 数量与 **send* ......
Dreamoon Problem WiFi 476 and

【cs 50 2022】lab2 && problem set2

lab2 #include <ctype.h> #include <cs50.h> #include <stdio.h> #include <string.h> // Points assigned to each letter of the alphabet int POINTS[] = {1, ......
amp problem 2022 lab2 set2

【每日一题】Problem 489B. BerSU Ball

[原题](https://codeforces.com/problemset/problem/489/B) #### 解决思路 排序+双指针 ```C++ #include int main() { int n; std::cin >> n; std::vector a(n + 1, 0); for ......
Problem BerSU Ball 489

【每日一题】Problem 416B. Art Union

[原题](https://codeforces.com/contest/416/problem/B) #### 解决思路 ![image](https://img2023.cnblogs.com/blog/3076745/202306/3076745-20230627001424047-208527 ......
Problem Union 416 Art

【每日一题】Problem 443B. Kuriyama Mirai's Stones

[原题](https://codeforces.com/contest/433/problem/B) #### 解决思路 1. 两个数组,一个未排序,一个排序; 2. 使用前缀和的方式减少时间复杂度 ```C++ #include int main() { std::ios::sync_with_s ......
Kuriyama Problem Stones Mirai 443

【cs50 2022】lab1 && problem set1

|lab1| #include <cs50.h> #include <stdio.h> int main(void) { // TODO: Prompt for start size int start_size; do{ start_size = get_int("Start size: "); ......
amp problem 2022 lab1 set1

【每日一题】Problem 359B. Permutation

[原题](https://codeforces.com/problemset/problem/359/B) #### 解决思路 虽然题解思路里写着 $dp$,但是还是用最简单的 $math$ 方法写了 找规律题: 1. 如果结果为 $0$,只需要每个 $a_{2i-1}-a_{i}$ 同向即可,即都 ......
Permutation Problem 359

【每日一题】Problem 253B. Physics Practical

[原题](https://codeforces.com/problemset/problem/253/B) #### 解决思路 1. 定义 $dp[i][j]$ 为对 $i$ 元素做出选择后,要删除的最少元素个数 2. 对于 $i$,有两种情况,选或不选 1. 选:则找到 $y(y>2x)$ 的个数 ......
Practical Problem Physics 253

【每日一题】Problem 234C. Weather

[原题](https://codeforces.com/problemset/problem/234/C) #### 解决思路 - 还是先从二维数组开始,定义一个二维数组$dp$,对于 $dp[i,j]$,$i$ 表示第 $i$ 个元素,$j$ 表示当前元素的状态(正数或负数) $dp[i,0]$ ......
Problem Weather 234

每日一题力扣 1262 https://leetcode.cn/problems/greatest-sum-divisible-by-three/

、 题解 这道题目核心就算是要知道如果x%3=2的话,应该要去拿%3=1的数字,这样子才能满足%3=0 贪心 sum不够%3的时候,就减去余数为1的或者余数为2的 需要注意 两个余数为1会变成余数为2的,所以可能减去2个余数为1 核心代码如下 public int maxSumDivThreeOth ......

Yet Another Minimization Problem(CF1637D)

## $\text{Des}$ You are given two arrays $ a $ and $ b $ , both of length $ n $ . You can perform the following operation any number of times (possibl ......
Minimization Another Problem 1637D 1637

HDU5293 Tree chain problem

# HDU5293 Tree chain problem ## Solution 1 考虑 dp。把链的信息挂在深度最浅的节点上,自下而上更新答案。 记 $f_u$ 表示 $u$ 子树内的最大权值和,$S$ 表示挂在 $u$ 上的某条链,$son(x)$ 表示点 $x$ 的儿子集合,$T_u$ 表示 ......
problem chain 5293 Tree HDU

【每日一题】Problem 180C. Letter

[原题](https://codeforces.com/problemset/problem/180/C) #### 解决思路 每一个字符以前一个字符为基准,来判断自己是 upper 还是 lower,从而找到最少的解 1. 最开始的解决思路是,用回溯的方式来解决,即使划分区块该方法也十分耗时,因为 ......
Problem Letter 180

【每日一题】Problem 174B. File List

[原题](https://codeforces.com/problemset/problem/174/B) #### 解决思路 纯模拟,比较文件名长度是否合规,文件格式+下一个文件名长度是否合规 ##### 误区 1. 文件名的长度要和文件格式+下一个文件名的长度分开判断 - 更新左端点和每次迭代开 ......
Problem File List 174