随笔分类 -  算法

蓝桥杯比赛算法学习
摘要:#include <cctype> #include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ vector<int> numbers = {1,2,3}; // 从大到小排序 阅读全文
posted @ 2024-03-23 16:16 Mask_2022 阅读(32) 评论(0) 推荐(0)
摘要:解题思路 先正序排列,打印一遍,再倒序打印一遍 #include <iostream> #include <algorithm> using namespace std; int main() { // 请在此输入您的代码 long long N= 1e5*5; long long A[N]; ci 阅读全文
posted @ 2024-03-21 22:18 Mask_2022 阅读(48) 评论(0) 推荐(0)
摘要:#include <iostream> using namespace std; int __data[200]; int halfIntervalSearch(const int n) { int r,l,h = 0; l = 0; r = 200; h = (r+l)/2; while(__da 阅读全文
posted @ 2024-03-19 22:20 Mask_2022 阅读(44) 评论(0) 推荐(0)
摘要:#include <iostream> using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */ long lon 阅读全文
posted @ 2024-03-19 21:10 Mask_2022 阅读(42) 评论(0) 推荐(0)