牛客978130688号
牛客978130688号
全部文章
分类
题解(8)
归档
标签
去牛客网
登录
/
注册
牛客978130688号的博客
全部文章
(共8篇)
[编程题]数据分类处理
主要思路:vector接收I数据,set接收R数据(自动去重排序)中间步骤中使用了stringstream实现string与int转换(不熟悉使用可查) #include<bits/stdc++.h> using namespace std; int n1, n2; int main()...
字符串
2021-04-03
1
587
[编程题]删除字符串中出现次数最少的字符
#include<bits/stdc++.h> using namespace std; int main() { string s; while(cin >> s) { int c[300] = {0}; for(int i ...
2021-04-03
1
564
[编程题]简单错误记录
类似华为16年题,可参考,下为代码修改,思想不变。 #include <iostream> #include<bits/stdc++.h> #include<string> #include<algorithm> using namespace st...
字符串
2021-04-03
0
352
密码验证合格程序
#include<bits/stdc++.h> using namespace std; int style(string s) { int sty[4] = {0}; for(int i = 0; i < s.size(); i++) { if(s...
字符串
2021-04-02
0
407
[编程题]识别有效的IP地址和掩码并进行分类统计
#include<bits/stdc++.h> #include<vector> using namespace std; int ip[4], ipy[4]; string s; string s1, s2; int A = 0,B = 0,C = 0,D = 0,E =...
字符串
2021-04-02
1
387
坐标移动
#include<bits/stdc++.h> using namespace std; int main() { string s; while(cin >> s) { vector<string> v; whi...
2021-04-02
0
326
字符串排序
#include<iostream> #include<bits/stdc++.h> #include<algorithm> using namespace std; int main() { string s; //freopen("1.txt...
2021-03-30
0
326
[编程题]质数因子
功能:输入一个正整数,按照从小到大的顺序输出它的所有质因子(重复的也要列举)(如180的质因子为2 2 3 3 5 ) 最后一个数后面也要有空格输入描述:输入一个long型整数请在这里输入引用内容输出描述:按照从小到大的顺序输出它的所有质数的因子,以空格隔开。最后一个数后面也要有空格。 示例1...
2021-03-30
1
439