华为oj
风从北边来
这个作者很懒,什么都没留下…
展开
-
华为oj 001
【001-字符串最后一个单词的长度】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51231903C++实现:vector<string> SplitString(const string &inStr, const string &spliter){ vector<string&g...原创 2018-08-17 09:52:59 · 212 阅读 · 0 评论 -
华为0j 021
【华为OJ】【021-汽水瓶】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51335956C++实现:int GetSum(int nBt){ int n1,n2; n1 = nBt / 3; n2 = nBt % 3; if (nBt >= 3) return n1+GetSum(n1+n2);...原创 2018-09-01 20:28:24 · 131 阅读 · 0 评论 -
华为oj 015
【华为OJ】【015-求int型数据在内存中存储时1的个数】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51319753C++实现:void main(){ int n1,n2,n3,n4; string str1,strOut; cin >> n1; n2 = 0; while(n1 != ...原创 2018-08-29 22:11:10 · 117 阅读 · 0 评论 -
华为oj 014
【华为OJ】【014-字串的连接最长路径查找】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51319745C++实现:void main(){ int n1,n2,n3,n4; string str1,strOut; vector<string> strIn; cin >> n1;...原创 2018-08-29 21:21:41 · 109 阅读 · 0 评论 -
华为oj 013
【华为OJ】【013-句子逆序】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51319735C++实现:void main(){ string str1,strOut; vector<string> strIn; do { cin >> str1; strIn.push_b...原创 2018-08-29 21:12:19 · 130 阅读 · 0 评论 -
华为oj 009
华为OJ】【009-提取不重复的整数】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51315205C++实现:void main(){ int n1,n2,n3,n4; string str1,strOut; cin >> str1; vector<char> chList; fo...原创 2018-08-29 20:54:54 · 142 阅读 · 0 评论 -
华为oj 008
华为OJ】【008-合并表记录】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51315163C++实现:void main(){ int n1,n2,n3,n4; cin >> n1; n2=n1; map<int, int> nMap; while(n2--) { ci...原创 2018-08-29 20:36:05 · 239 阅读 · 0 评论 -
华为oj 007
【华为OJ】【007-取近似值】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51315104C++实现:void main(){ float n1; cin >> n1; cout << (int)(n1+ 0.5f)<< endl; system("pause");}...原创 2018-08-29 20:09:08 · 224 阅读 · 0 评论 -
华为oj 006
题目链接:https://blog.csdn.net/DERRANTCM/article/details/51249154C++实现:string getResult(long ulDataInput){ string str1,str2; long int i=2; while(i<= ulDataInput) { while(ulDataInput % i ...原创 2018-08-29 20:07:27 · 120 阅读 · 0 评论 -
华为oj 005
【华为OJ】【005-进制转换】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51249114C++实现:int HexToInt(char ch){ if (ch >= '0' && ch <= '9') { return ch - '0'; } else if(ch >...原创 2018-08-29 15:12:14 · 192 阅读 · 0 评论 -
华为oj 004
【华为OJ】【004-字符串分隔】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51249067C++实现:void main(){ string str1,str2; getline(cin,str1); getline(cin,str2); int n1Add = 8 - str1.size()%8; ...原创 2018-08-29 14:28:23 · 121 阅读 · 0 评论 -
华为0j 017
【华为OJ】【017-密码验证合格程序】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51328467C++实现:void main(){ string str1,strOut; vector<string> strList,strValid;// cin >> str1; str1 =...原创 2018-08-30 19:47:25 · 205 阅读 · 0 评论 -
华为0j 016
【华为OJ】【016-坐标移动】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51328464C++实现:void main(){ string str1,strOut; vector<string> strList,strValid; cin >> str1; str1 = "A10;...原创 2018-08-30 16:42:27 · 188 阅读 · 0 评论 -
华为oj 003
【003-明明的随机数】https://blog.csdn.net/DERRANTCM/article/details/51231923C++实现:void main(){ int n; cin>>n; int n1; int nums[1001] = {0}; for (int i=0;i<n;i++) { cin>>n1;...原创 2018-08-17 10:54:44 · 340 阅读 · 0 评论 -
华为oj 002
【002-计算字符个数】https://blog.csdn.net/DERRANTCM/article/details/51231912C++实现:void main(){ string inStr; getline(cin,inStr); char ch; cin >> ch; string::size_type chNum = inStr.size...原创 2018-08-17 10:04:07 · 133 阅读 · 0 评论 -
华为0j 022
华为OJ】【022-删除字符串中出现次数最少的字符】题目链接:https://blog.csdn.net/DERRANTCM/article/details/51335957C++实现:void main(){ string strIn; cin >> strIn; map<char,int> chNum; for (int i=0;i&l...原创 2018-09-01 21:37:47 · 160 阅读 · 0 评论