首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
crisy1991
电子科技大学
2017届
C++工程师
牛客中一小步,人生中的一大步!
关注
私信
加入黑名单
举报TA
首页
刷题
圈子
项目
笔记
基本资料
真题试卷
在线编程
心理测试
回答的问题(65)
中国人口数量在10亿~20亿,如果用二进制记录人口数量,则至少需要_____位的长度。
4
如果采用二进制表示的话:n位二进制书所能表达的最大数字是2^n-1; 中国人口10亿~20亿,那么n位二进制数所能表达的数字要大于20亿就是2 000 000 000; 1G=1024*1024*1024=2^30= 1 073 741 824 ~ 10亿多点点,要表示10亿到20...
发表于 2016-06-15 17:36:12
双栈排序
2
class TwoStacks { public: vector<int> twoStacksSort(vector<int> numbers) { // write code here vector<int> temp; ...
发表于 2016-06-01 11:17:36
回文链表
1
class Palindrome { public: bool isPalindrome(ListNode* pHead) { // write code here ListNode *frond = pHead; ListNode *back...
发表于 2016-05-31 17:20:16
明明的随机数
0
#include<iostream> using namespace std; int main(){ int n; while(cin>>n){ int array[1001]={0},m=0; for(int i=0;i&l...
发表于 2016-05-26 23:16:20
计算某字符出现次数
0
#include<iostream> #include<string.h> using namespace std; int main(){ char s[100000]; char a; int n=0; cin.getline(s,1000...
发表于 2016-05-26 22:36:47
用两个栈实现队列
13
class Solution { public: void push(int node) { stack1.push(node); } int pop() { //等待栈2出完后才能继续入栈不然,不然就会占据栈顶 if(sta...
发表于 2016-05-26 16:49:50
重建二叉树
0
class Solution { public: struct TreeNode* reConstructBinaryTree(vector<int> pre,vector<int> in) { return reConstructBinaryTree...
发表于 2016-05-25 14:37:06
装最多水的容器
0
给定n个非负整数a1,a2,...,an,其中每个表示在坐标(i,ai)的一个点。 Ñ垂直线绘制,使得线的两个端点i是在(i,ai)和(i,0)。找到两条线,其与X轴一起形成了一个容器,使得所述容器包含最多的水。注意:您可能不倾斜的容器。 (i,ai) i表示在X轴上的位置...
发表于 2016-05-23 16:37:12
二维数组打印
0
class Printer { public: vector<int> arrayPrint(vector<vector<int> > arr, int n) { // write code here vector<i...
发表于 2016-05-20 22:56:34
顺时针打印矩阵
0
class Printer { public: vector<int> clockwisePrint(vector<vector<int> > mat, int n, int m) { // write code here ...
发表于 2016-05-20 22:01:17
首页
上一页
1
2
3
4
5
6
7
下一页
末页
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题