首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
Acaibird
获赞
4
粉丝
0
关注
14
看过 TA
7
男
浙大宁波理工学院
2025
Web前端
IP属地:浙江
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑Acaibird吗?
发布(124)
评论
刷题
收藏
Acaibird
关注TA,不错过内容更新
关注
2022-10-22 21:12
已编辑
浙大宁波理工学院 Web前端
cin成员函数
cin.fail();格式错误,未读取到预期参数值类型;指针不变,设置流状态为failbit; cin.bad();输入发生毁灭性错误,导致io不稳定 cin.eof();遇到文件终止符 cin.good(); cin.get(char c); cin.get(char c,int ,终止字符); cin.getline(char *,int ,终止字符); cin.ignore(int,终止字符) char cin.peek() ;返回输入流下一个字符,流指针不变; cin.putback(char c);将前面用cin读取到的单个字符,返回输入流中; //#include <bits...
0
点赞
评论
收藏
分享
2022-09-21 20:45
已编辑
浙大宁波理工学院 Web前端
求字符串的周期
两个案例之间换行输出: 除开第一个案例,其他的直接输出答案中之前先输出一个换行; //#include <bits/stdc++.h> #include <functional> #include <iostream> #include <cstdio> #include <algorithm> #include <sstream> #include <cstring> #include <queue> #include <vector> #include <iterator>...
0
点赞
评论
收藏
分享
2022-09-11 15:29
浙大宁波理工学院 Web前端
打表:记录所有输入所对应的输出;避免输入数据重复超时
https://acm.hdu.edu.cn/showproblem.php?pid=2553 #include <bits/stdc++.h> #include <functional> #include <iostream> #include <cstdio> #include <algorithm> #include <sstream> #include <cstring> #include <queue> #include <vector> #include <iterat...
0
点赞
评论
收藏
分享
2022-09-08 00:37
浙大宁波理工学院 Web前端
map:自定义排序,初始化,以及key的替换
struct mykey { int k; mykey(int a) { k=a; } bool operator<(const mykey& a)const { return this->k>a.k; } }; template<typename t> void replace_key(t& a,const typename t::key_type& oldk, const typename t::key_type& newk) { typename t::iterator pos=a.find(oldk); typename t...
0
点赞
评论
收藏
分享
2022-08-31 15:57
浙大宁波理工学院 Web前端
快速幂
ll quick_pow( ll x, ll y ) { if(x==0&&y==0) return 0; ll sum = 1 ; while( y > 0 ) { if( y % 2 ) sum = sum * x % MOD ; y /= 2; x = x * x % MOD ; } return sum; }
0
点赞
评论
收藏
分享
2022-08-30 23:14
浙大宁波理工学院 Web前端
带别名的 模板alias template
template <class T, class Container = vector<T>, class Compare = less<typename Container::value_type> > using priqueue = priority_queue<T,Container,Compare>;
0
点赞
评论
收藏
分享
2022-08-30 21:04
已编辑
浙大宁波理工学院 Web前端
function对象,头文件functional
链接 //lamda只能是auto才可以; int main(int argc, char** argv) { auto fun = [](const int a, const int b) {return a + b; }; std::function<int(int, int)> func = fun; fun(1, 2); return 0; }
0
点赞
评论
收藏
分享
2022-08-30 19:32
浙大宁波理工学院 Web前端
for_each详解
for_each如何调用function obj的过程 #include<iostream> #include<vector> #include<algorithm> #include<typeinfo> using namespace std; struct Play { Play() { cout<<"new a Play"<<endl; } Play(const Play&) { cout<<"new a copy Play"<<endl; } void operator () (in...
0
点赞
评论
收藏
分享
2022-09-28 22:59
已编辑
浙大宁波理工学院 Web前端
求多边形面积公式(已经知道顶点坐标)
链接 int t; cin>>t; while(t--) { int n; cin>>n; for(int i=1;i<=n;i++){ double x,y,x0,y0,sum = 0.0; cin >> x >> y; x0 = x; y0 = y; while (--n) { double xtmp,ytmp; cin >> xtmp >> ytmp; sum += (x*ytmp-y*xtmp); x = xtmp; y = ytmp; } sum += (x*y0-y*x0); printf("%.lf\n...
0
点赞
评论
收藏
分享
2022-08-27 16:35
已编辑
浙大宁波理工学院 Web前端
bitset
** ** int main(int argc, char *argV[]) { ios::sync_with_stdio(false); //cin.tie(0); //cout.tie(0); //cout << bitset<32>(5) << endl; //000000000000000000000000000001010101001101数值转化为二进制; //cout << bitset<sizeof(10) * 4>(6) << endl; bitset<10> s("0101001101");...
0
点赞
评论
收藏
分享
2022-08-26 16:39
浙大宁波理工学院 Web前端
迭代器之适配器
insert iterator copye(.begin(),.end(),back_iterator(container)) //容器末尾加上元素:适用于vector,string ,deque,list copy(.begin(),end(),front_iterator(container) //容器前面加上元素:适用于vector,string ,deque,list //注意如果是安插1 2 3则安***去就是3 2 1内部使用insert(.begin())成员函数 general_iterator(containter):适用于关联式容器和无序容器; 2.stream_ite...
0
点赞
评论
收藏
分享
2022-08-25 03:42
已编辑
浙大宁波理工学院 Web前端
个位数和一定,数字位数一定,求最小数
求出最大数,反转最大数;高位补1即可; #include <iostream> #include <cstdio> #include <algorithm> #include <sstream> #include <cstring> #include <queue> #include <vector> #include <map> #include <stack> #include <deque> #include <cmath> #include <io...
0
点赞
评论
收藏
分享
2022-08-29 19:22
已编辑
浙大宁波理工学院 Web前端
快速排序
int a[5000010]; void quick_sort(int a[],int l,int r){ if(l>=r) return; int x=a[l],i=l-1,j=r+1; while(i<j){ do i++;while(a[i]<x); do j--;while(a[j]>x); if(i<j) swap(a[i],a[j]); } quick_sort(a,l,j); quick_sort(a,j+1,r); }
0
点赞
评论
收藏
分享
2022-08-24 16:39
浙大宁波理工学院 Web前端
c++ :类型推导
******** C++11 类型推导decltype
0
点赞
评论
收藏
分享
2022-08-24 16:35
浙大宁波理工学院 Web前端
函数对象:多态性,暂态表达式,
链接 类名+操作符号sort(coll.begin(),coll.end(),cmp()); cmp()是一个暂态表达式; 函数对象的多态性依靠类的属性,及通过传递不同的参数到类构造函数之中;生成函数对象的不同状态的实例。 class str { public: string a; string b; str(string a1, string b1) : a(a1), b(b1) {}; }; class cmp { public: bool operator() (const str&a1,const str &b1) { return a1.b>b1.b; } };...
0
点赞
评论
收藏
分享
1
2
3
4
5
6
9
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务