后海大鲨鱼啊
后海大鲨鱼啊
全部文章
未归档
java (3)
信息管理系统(1)
函数模版(1)
剑指offer试题(2)
快速排序(1)
读书笔记(1)
过滤算法(1)
题解(4)
归档
标签
去牛客网
登录
/
注册
奥利给
全部文章
/ 未归档
(共48篇)
牛客网剑指offer02,替换空格。
所示请实现一个函数,将一个字符串中的每个空格替换成“%20”。例如,当字符串为We Are Happy.则经过替换之后的字符串为We%20Are%20Happy 时间限制:1秒 空间限制:32768K 首先我们从前往后遍历记录空格数目,从后往前插入‘%20’,从后往前的好处体现在: 如图所示:...
2019-03-28
0
344
c++读写文本文件
fout表示写操作 fin表示读操作; #include<iostream> #include<bits/stdc++.h> using namespace std; int main() { fstream fout("test.txt");...
2019-03-25
0
306
对Point类进行重载++,--运算符
#include<iostream> #include<bits/stdc++.h> using namespace std; class Point { private: int x,y; public: Point(int a=0,...
2019-03-23
0
415
定义计数器counter,重载运算符+
#include<iostream> #include<bits/stdc++.h> using namespace std; class counter { private: int i; public: counter(){} ...
2019-03-23
0
327
下标运算符“[]"重载
#include<iostream> #include<bits/stdc++.h> using namespace std; class IntArray { private: int *a; int sz; public: ...
2019-03-23
0
273
定义三个类A,B,C,其中B继承于A,C继承于B,都包含f(),用于表明当前执行的是哪个类的f()
#include<iostream> #include<bits/stdc++.h> using namespace std; class A { public: A(){cout<<"create A"<<...
2019-03-22
0
319
定义一个shape 在此基础上派生出Rectangle 和Circle,二者都有GetArea和GetPrim
#include<iostream> #include<bits/stdc++.h> using namespace std; class shape { public: shape(){}; virtual ~shape(){} ...
2019-03-22
0
373
设计一个类A,编写search,实现在数组a的前n个元素中顺序查找值为x的元素并返回下标
#include<bits/stdc++.h> using namespace std; class S { private: int *a; int n; int MS; public: void INit...
2019-03-21
0
343
c++计算两点之间的距离
#include<bits/stdc++.h> using namespace std; class point { private: int a; int b; public: point(int x=0,int y=0)...
2019-03-20
0
607
创建一个employee,用字符数组包含姓名,街道地址,市,省,邮政编码,并且输出完成数据
#include<bits/stdc++.h> using namespace std; class employee { private: char name[10]; char address[20]; char city[10];...
2019-03-20
0
298
首页
上一页
1
2
3
4
5
下一页
末页