明:公告栏备份
2025-03-23 13:26:35
发布于:广东
新闻
最近没什么人,可以邀加点人。*额
作业不会弄。。。
-复仇者_零“工具大全"-
-病毒几版本-
-Mark down字体-
军规
军规
刑法
∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑
1.看B站不能吃饭。
2.违反要赤石。
3.无了无了
吴三(无3)
该我去洛谷啊!
∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑∑
装备库
冷兵器(大剑)
#include<iostream>
using namespace std;
int main(){
return 0;
}
热兵器(火药)
#include<bits/stdc++.h>
using namespace std;
int main(){
return 0;
}
格式
#include<bits/stdc++.h>
using namespace std;
int a[10005];
int main(){
int n=0;
cin>>n;
for(int i=1;i<=n;i++) cin>>a[i];
return 0;
}
传送门
好笑的
别
百度 传送门
MC 传送门
B站 传送门
聊天室传送门
团队传送门
笔记
物理,功能,电气,时间
freopen("aaa.in","r",stdin);//输入
freopen("aaa.in","w",stdout);//输出
fclose(stdin);//关闭输入
fclose(stdout);//关闭输出
#include<bits/stdc++.h>
using namespace std;
int a[105];
int main(){
int n,m=0,x;
cin>>n;
for(int i=1;i<=n;i++) cin>>a[i];
cin>>x;
int l=1,r=n;
while(l<r){
int m=(l+r)/2;
if(a[m]>=x) r=m;
else l=m+1;
}
if(a[l]==x) cout<<l;
else cout<<-1;
return 0;
}
//【栈】
#include<stack>
stack<int> stk;
stk.push(666);//可填别的 入栈
stk.pop(); // 出栈
stk.top(); // 栈项
stk.size(); // 长度
stk.empty(); // 为空(?)
//【队列】
#include<queue>
queue<int> stk;
que.push(666);//可填别的 入队
que.pop(); // 出队
que.top(); // 队头
que.size(); // 队列
que.empty(); // 为空(?)
#include<bits/stdc++.h>
using namespace std;
int a[105];
int main(){
int n,m=0,x;
cin>>n;
for(int i=1;i<=n;i++) cin>>a[i];
cin>>x;
int l=1,r=n;
while(l<r){
int m=(l+r+1)/2;
if(a[m]<=x) l=m;
else r=m-1;
}
cout<<l;
return 0;
}
梗图
哈哈哈,想得美
这里空空如也
有帮助,赞一个