摘要: 题目链接 A.DNA Sorting 题面 思路 题目意思就是说,如果一个字符串中前面的字符比后面的字符大,那么它的无序度就+1,根据这个给一组字符串从最有序到最无序依次输出。那么明白题目意思之后直接模拟即可。 示例代码 #include<bits/stdc++.h> using namespace 阅读全文
posted @ 2025-03-15 15:34 Thin_time 阅读(10) 评论(0) 推荐(0)
摘要: 题目链接 A. 因式分解 题面 思路 分解质因数模板题 示例代码 #include<bits/stdc++.h> using namespace std; #define ll long long //#define int ll #define pii pair<int, int> #define 阅读全文
posted @ 2025-03-15 15:30 Thin_time 阅读(10) 评论(0) 推荐(0)
摘要: 算法模板 vector<bool> is_prime(N, true); vector<int> primes; void get() { is_prime[0] = is_prime[1] = false; fer(i, 2, N + 1) { if(is_prime[i]) primes.pus 阅读全文
posted @ 2025-03-15 14:35 Thin_time 阅读(14) 评论(0) 推荐(0)