作为第一个题解我很荣幸 摘要:解题思路:利用getline可以正常输入空格注意事项:注意i和i-1参考代码:c++:#include <bits/stdc++.h>using namespace std;/*inline int …… 题解列表 2022年10月24日 0 点赞 0 评论 372 浏览 评分:9.9
我觉得比楼上写的还简单^_^ 摘要:解题思路:注意事项:参考代码:#include <iostream> // #include <sstream> // #include <cstdio> // #include <algori…… 题解列表 2023年02月22日 0 点赞 1 评论 214 浏览 评分:9.9
2866: 过滤多余的空格 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int N=10200;char s[N];int main(){ wh…… 题解列表 2023年12月15日 0 点赞 0 评论 144 浏览 评分:9.9
优质题解 过滤多余的空格(C++代码解析和题解) 摘要:代码解析:在 main 函数中,首先声明一个字符串变量 sentence,用于存储输入的整行句子。使用 getline(cin, sentence) 函数读取一行用户输入,并将其存储在 sentenc…… 题解列表 2023年07月17日 0 点赞 0 评论 995 浏览 评分:8.4
哪需要那么复杂几步的事 摘要:解题思路:注意事项:参考代码:#include<cstring>#include<iostream>using namespace std;int main(){ string s; whil…… 题解列表 2023年04月25日 0 点赞 0 评论 192 浏览 评分:0.0
题解 2866: 过滤多余的空格 摘要: #include using namespace std; char a[20000],b,c,d,n,s[2000]; int main(){ …… 题解列表 2023年12月15日 0 点赞 0 评论 135 浏览 评分:0.0
过滤多余的空格 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s; getline(cin,s); stri…… 题解列表 2024年03月07日 0 点赞 0 评论 208 浏览 评分:0.0