题解列表

筛选

3154 字符简写(新手上路,求大佬指正)(动态规划)

摘要:解题思路:对于输入的数据我们只需要辨别是否是字符c1和c2。对一个符合题目要求的子串来说,结尾一定是c2字符,开头为c1字符。因此只需要将每个c2字符前c1字符的个数相加即可。同时子串有长度n的限制,……

2000: 偶数列举

摘要:``` #include using namespace std; int main(){ //下面是for循环 int n , sum = 0; cin>>n; for……

1000: [竞赛入门]简单的a+b

摘要:解题思路:注意事项:其实直接提交就好,源代码就是1000的题解参考代码:#include<iostream>using namespace std;int main(){    int a,b;   ……

2791题解(新手)

摘要:新手思路 ``` #include using namespace std; int main(){ int c = 0; int a; cin>>a; ch……

2788: 晶晶赴约会

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     int day;     int arr[4]……

2787: 有一门课不及格的学生

摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() {     int a,b;     cin>>a>>b;……