12 2024 档案

该文被密码保护。
posted @ 2024-12-28 09:58 王一行(小号) 阅读(0) 评论(0) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; int main(){ int l,n,m; cin>>l>>n>>m; int a[n+5]; for(int i = 1;i<=n;i++){ cin>>a[i]; } long left = 1,righ 阅读全文
posted @ 2024-12-27 19:32 王一行(小号) 阅读(5) 评论(0) 推荐(0) 编辑
摘要:当二分查找的区间是一个实数域时,称之为实数二分。实数二分的算法思想没有变化,但时因为实数和整数不同,整数是离散的,可以逐一枚举,区间中除了首尾边界外,每个整数都有一个前驱和后驱;实数是连续的,所以实现方式和整数二分有所不同。常见的形式是通过确定好精度prec(le-6,le-8等),以left+pr 阅读全文
posted @ 2024-12-27 19:06 王一行(小号) 阅读(21) 评论(0) 推荐(0) 编辑
摘要:#include<bits/stdc++.h> using namespace std; int main(){ int n,k; cin>>n>>k; int a[n+5]; for(int i = 1;i<=n;i++){ cin>>a[i]; } int l = 1,r = 100000000 阅读全文
posted @ 2024-12-21 09:37 王一行(小号) 阅读(2) 评论(0) 推荐(0) 编辑
摘要:#include <iostream> using namespace std; int main(){ int n; cin>>n; int x[n+5]; for(int i = 1;i<=n;i++){ cin>>x[i]; } for(int i = 1;i<=n;i++){ if(x[i] 阅读全文
posted @ 2024-12-14 08:26 王一行(小号) 阅读(8) 评论(0) 推荐(0) 编辑
摘要:#include <bits/stdc++.h> using namespace std; int main() { long n,sum = 0;//次数 总钱数 cin>>n;//输入 long x,m,s;//方式 价格 时间 vector<long> m1,s1;//存储地铁的优惠券 boo 阅读全文
posted @ 2024-12-08 10:23 王一行(小号) 阅读(5) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示