首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
首页 /
includestring
#
includestring
#
384次浏览
10人互动
收藏话题
分享
此刻你想和大家分享什么
热门
最新
2020-08-22 15:44
大连理工大学 自然语言处理
始终显示格式错误,求大佬帮忙看看,谢谢~#include<string>(5850)#include<iostream>using namespace std;int main(){ string s; while(cin>>s) { int left = 0, right = s.length()-1; int n1,n2,n3; n1 = n3 = (s.length()+2)/3; n2 = s.length()+2 - (s.length()+2)*2/3; for(int i = 1; i < n1; i++) { cout<<s[left++]; for(int j = 1; j <= n2-2; j++) cout<<' '; cout<<s[right--]<<endl; } while(left<=right) cout<<s[left++]; cout<<endl; }} 「求助大佬帮看看这道算法题吧!」Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. Fo... https://www.nowcoder.com/questionTerminal/c6e414fddd7c401887c350c9cc41f01b
点赞
评论
收藏
分享
2020-09-07 17:12
门头沟学院 C++
贝壳找房算法岗位对牛弹琴#include <iostream>(5488)#include <math.h>#include <cstdio>(5862)#include<algorithm>#include<string>(5850)#include<stdlib.h>#include<map>(5868)#include<stdio.h>#include <string.h>(5856)#include <vector>#include<string>(5850)#include <bits/stdc++.h>#include<iomanip>(7639)#include<math.h>using namespace std;int fun1(const std::string&str,const std::string&sub)//函数作用:找子串得个数{ int num=0; for(size_t i=0; (i=str.find(sub,i))!=std::string::npos; num++,i++); return num;}int main()//第一题 多次重复包含子串{ int n; cin>>n; int result[n]; for(int i=0;i<n;i++) { result[i]=0; } // for(int i=0;i<n;i++)//{ // cout<<result[i]<<endl;//结果输出 // } string son_s1="63231323"; string son_s2="53231323"; string son_s3="43231323"; string s; for(int i=0;i<n;i++) { cin>>s; result[i]=fun1(s,son_s1)+fun1(s,son_s2)+fun1(s,son_s3); } for(int i=0;i<n;i++) { cout<<result[i]<<endl;//结果输出 }}
投递贝壳找房等公司9个岗位
点赞
评论
收藏
分享
提到的真题
返回内容
玩命加载中
创作者周榜
更多
热议话题
更多
1
...
写给毕业5年后的自己
0
2
...
好好告别我的学生时代
0
1
...
华泰证券Fintech星战营
3
...
职场捅娄子大赛
0
4
...
晒一下我的毕业照
0
5
...
华为求职进展汇总
0
6
...
海信求职进展汇总
0
7
...
毕业季等于分手季吗
0
8
...
如果今天是你的last day,你会怎么度过?
0
9
...
如何缓解求职过程中的焦虑?
0
10
...
记录实习开销
0
牛客网
牛客企业服务