优质题解 找第一个只出现一次的字符(C++代码解析和题解) 摘要:代码解析:使用了哈希表 unordered_map 来统计每个字符的出现次数。首先,定义了一个函数 findFirstUniqueChar,它的输入参数是一个字符串 s,表示要查找的字符串。函数返回第…… 题解列表 2023年07月17日 2 点赞 6 评论 1766 浏览 评分:7.5
优质题解 C语言训练-"水仙花数"问题(c++代码) 摘要:首先我们要引出一个解题方法——**穷举法(又称枚举)**,即用循环表示出所有可能性再根据题目要求使用*if* 语句筛选出符合条件的结果。 让我们先读题: > 所谓"水仙花数"是指这样的一个三位…… 题解列表 2023年07月17日 2 点赞 3 评论 1166 浏览 评分:9.5
基因相关性(C++)简单实用 摘要:参考代码:#include <iostream>#include <string>using namespace std;string compareDNA(const string& dna1, c…… 题解列表 2023年07月16日 0 点赞 0 评论 470 浏览 评分:9.9
密码翻译(C++)简单实用 摘要:参考代码:#include <iostream>#include <string>using namespace std;string encrypt(const string& str) { …… 题解列表 2023年07月16日 0 点赞 0 评论 391 浏览 评分:9.9
整理药名(C++)简单实用 摘要:代码解析:参考代码:#include <iostream>#include <string>#include <cctype>using namespace std;string formatMedi…… 题解列表 2023年07月16日 0 点赞 0 评论 658 浏览 评分:6.0
2903: 不高兴的津津 摘要:参考代码:#include <bits/stdc++.h>using namespace std;int a,b,c,maxday = 0,maxtime = 0;int main(){ for…… 题解列表 2023年07月16日 0 点赞 0 评论 302 浏览 评分:9.9
1013: [编程入门]Sn的公式求和 摘要:参考代码:#include <bits/stdc++.h>using namespace std;int n,ans = 2,s;int main(){ cin>>n; for(int i…… 题解列表 2023年07月16日 0 点赞 0 评论 300 浏览 评分:9.9
信息学奥赛一本通T1307-高精度乘法c++ 摘要:解题思路:看下面↓注意事项:多注意注意参考代码:#include<bits/stdc++.h>using namespace std;const int N=2e+3+10;int x[N]={0},…… 题解列表 2023年07月16日 0 点赞 0 评论 691 浏览 评分:9.9
1099: 校门外的树(简单c++) 摘要:解题思路:1.#include <bits/stdc++.h> using namespace std; long long a[100000];//创造数组 int main() { …… 题解列表 2023年07月16日 0 点赞 0 评论 252 浏览 评分:9.9
最长最短单词(C++代码解析) 摘要:代码解析:引入了必要的头文件,包括iostream、string和sstream和vector头文件用于使用向量容器。接下来,定义了一个getWords函数,该函数接受一个字符串sentence作为参…… 题解列表 2023年07月16日 0 点赞 0 评论 690 浏览 评分:9.9