首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
首页 /
includestring
#
includestring
#
413次浏览
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;//结果输出}}
投递贝壳找房等公司8个岗位
点赞
评论
收藏
分享
玩命加载中
创作者周榜
更多
热议话题
更多
1
...
你觉得实习能学到东西吗
0
2
...
不考虑转正,实习多久合适
0
1
...
现代汽车前瞻技术研发急速编程挑战赛
3
...
秋招什么时候开投比较合适?
0
4
...
如果你有一天可以担任公司的CEO,你会做哪三件事?
0
5
...
如何准备秋招
0
6
...
发工资后,你做的第一件事是什么
0
7
...
工作中哪个瞬间让你想离职
0
8
...
实习,不懂就问
0
9
...
软开人,秋招你打算投哪些公司呢
0
10
...
大疆今年的机械笔试难吗?
0
牛客网
牛客网在线编程
牛客网题解
牛客企业服务