题解列表

筛选

1208: 孤独的骑士

摘要:```cpp #include using namespace std; int knight(char a,int b) { if(a>='c'&&a=3&&b>n; f……

3047: Crossing River

摘要:解题思路:运用双循环,完成多次操作,在运用数学方法注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int a[100005],t,n;……

1207: 字符排列问题

摘要:```cpp #include #include using namespace std; int main() { int sum=0,n; char str[20];……

两个数组,对应输出

摘要:一、解题思路: 拿两个数组,一个字符数组ch存放所有字符,另一个动态数组b存放对应的个数。输出时对应着输出即可。用n表示输入n行,ans计数。用动态数组str存放输入的所有字符串。flag用于比较……

1206: 字符串问题

摘要:```cpp #include #include using namespace std; int main() { char a[300]; gets(a); ……

单词的长度(istringstream)

摘要:解题思路:  利用sstream 头文件中的istringstream 函数自动分出单词(以字符串的形式保存), 后面直接打印size函数注意事项:参考代码:#include<iostream>#in……

1366: 超级书架2

摘要:解题思路:运用快排、while循环;注意事项:参考代码:#include<bits/stdc++.h> using namespace std; long long n,b,a[20005]; ……

连续出现的字符(简易版)

摘要:解题思路: 遍历字符串注意事项:参考代码:#include<iostream>#include <string>using namespace std;int main(){ int k; strin……