摘要: 代码 #include<iostream> #include<string> #include<algorithm> #include<iomanip> #include<cctype> int main(){ std::string a(26,'\0'); std::string b(26,'\0 阅读全文
posted @ 2026-10-22 16:45 2699( 阅读(0) 评论(0) 推荐(0)
摘要: 疑惑 我的代码不知道为什么一直会有一串2570在最后一行 代码 #include<iostream> #include<string> #include<algorithm> std::string dec2n(int x,int n=2); int main(){ int x; while(std 阅读全文
posted @ 2026-10-22 15:43 2699( 阅读(2) 评论(0) 推荐(0)
摘要: 回答 用getline(cin,s) 代码 #include<iostream> #include<string> #include<algorithm> #include<cctype> bool is_palindrome(const std::string &s); bool is_palin 阅读全文
posted @ 2026-10-22 14:12 2699( 阅读(2) 评论(0) 推荐(0)
摘要: 回答 1.加密,每个字母往后移一位 2.转小写,转大写 3.迭代容器起点,终点,新起点,迭代容器所要历遍的函数 代码 #include <iostream> #include <string> #include <algorithm> #include <cctype> unsigned char 阅读全文
posted @ 2026-10-21 15:23 2699( 阅读(4) 评论(0) 推荐(0)
摘要: 回答 1.以容器容量大小为迭代次数,历尽函数,将结果返回容器储存 2.minmax只用迭代1次,那两个共要两次 3一样 代码 #include<iostream> #include<vector> #include<algorithm> #include<numeric> #include<ioma 阅读全文
posted @ 2026-10-21 14:50 2699( 阅读(6) 评论(0) 推荐(0)
摘要: 问题回答 1.reverse 直接在原容器中反转 reverse_copy()复制后反转给到新容器 2.rotate通过挪动元素,(a,b,c)a是起始,c是结束,从b新节点开始把后边的挪到前边 代码 #include<iostream> #include<string> #include<vect 阅读全文
posted @ 2026-10-19 14:55 2699( 阅读(4) 评论(0) 推荐(0)