已注销
已注销
全部文章
分类
归档
标签
去牛客网
登录
/
注册
已注销的博客
全部文章
(共21篇)
题解 | #小白鼠排队#(结构体+sort)
#include <iostream> #include <algorithm> using namespace std; struct rat { int weight; string color; }; bool cmp(rat a,rat b) { ...
2023-01-23
0
363
题解 | #子串计算#(map+substr)
#include <iostream> #include <map> using namespace std; map<string, int> cnt; //自动初始化 int main() { string str; while(cin &...
2023-01-23
0
471
题解 | #三角形的边#(不需要算最小值和次小值)
#include <iostream> #include <algorithm> using namespace std; int calDiff(int a,int b,int c) { int diff; int maxn = max({a,b,c});...
2023-01-22
0
425
题解 | #字母统计#(map解法)
#include <iostream> #include <map> using namespace std; int main() { string str; while(cin >> str) { map<char, i...
2023-01-22
0
351
题解 | #特殊乘法#(死算方法)
#include <iostream> using namespace std; int getD(int n){ int d = 0; while(n > 0){ n = n / 10; d++; } return...
2023-01-20
0
367
题解 | #数字求和#
#include <iostream> using namespace std; int main() { int a, sum = 0, n; cin >> a; for(int i = 0;i < 5; i++){ cin ...
2023-01-20
0
449
题解 | #数字之和#
#include <iostream> using namespace std; int normalSum(int n){ int sum = 0; while(n > 0){ sum += n % 10; n = n /10; ...
2023-01-19
1
365
题解 | #统计同成绩学生人数#
#include <iostream> using namespace std; int calSame(int n,int* A,int key){ int count = 0, i; for(i = 0;i < n; i++){ if(A[i]...
2023-01-19
0
457
题解 | #字符串排序#
#include <iostream> #include <string> #include <algorithm> using namespace std; bool cmp(char a, char b){ return a < b; } i...
2023-01-18
0
385
题解 | #最大公约数#辗转相除法
#include <iostream> #include <algorithm> using namespace std; int maxDivisor(int n1,int n2){ int mod; int maxn = max(n1, n2); ...
2023-01-18
0
256
首页
上一页
1
2
3
下一页
末页