首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
忆水寒
宁波大学
2017届
C++工程师
颓废躺~
关注
私信
加入黑名单
举报TA
TA的博客
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(203)
合法括号序列判断
0
//大家好,我是yishuihan class Parenthesis { public: bool chkParenthesis(string str, int n) { // write code here if(n<=1) return false...
发表于 2016-08-14 15:59:59
球的半径和体积
0
#include<iostream> #include<cmath> #include<cstdio> using namespace std; double myfabs(double x, double y) { return x-y > 0 ?...
发表于 2016-08-14 15:26:11
穿点最多的直线
1
//写完了看看别人的代码,都比我简洁,我就不贴代码了。这个题目还可以使用哈希表完成; 思路如下: /* 共线最多的点的个数 思路:可以看所有两点能够构造的直线的斜率,根据斜率来判断共线的点的个数 这样斜率和该斜率上点的个数就构成了一个键值对,可以使用hash表来存储 */ int maxPoi...
发表于 2016-08-14 11:03:38
平分的直线
0
/*大家好,我是yishuihan*/ class Bipartition { public: vector<double> getBipartition(vector<Point> A, vector<Point> B) { // wri...
发表于 2016-08-14 09:42:12
碰撞的蚂蚁
0
class Ants { public: double antsCollision(int n) { // write code here return (1-(1.0/pow(2,n-1))); } };
发表于 2016-08-13 20:24:19
判断直线相交
0
class CrossLine { public: bool checkCrossLine(double s1, double s2, double y1, double y2) { // write code here double eplison=0.00...
发表于 2016-08-13 20:20:04
最接近的数
0
//please call me "小果铖"; class CloseNumber { public: vector<int> getCloseNumber(int x) { // write code here vector&...
发表于 2016-08-13 16:18:30
二进制小数
0
//请叫我“小果铖” class BinDecimal { public: string printBin(double num) { // write code here if(num>=1 ||num<0) return "Error...
发表于 2016-08-13 11:35:26
二叉排序树
0
//题目给的测试用例是一个二叉排序树?前序遍历的结果,第一个是根节点,不符合要求啊? 下面我的代码才是真正的二叉排序树。 #include<iostream> #include<vector> #include<algorithm> using namespace...
发表于 2016-08-13 11:12:55
二进制插入
0
class BinInsert { public: int binInsert(int n, int m, int j, int i) { // write code here int flag=0; int res=(m<<j)...
发表于 2016-08-12 20:48:34
首页
上一页
2
3
4
5
6
7
8
9
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题