题解列表

筛选

2939: 最匹配的矩阵

摘要:解题思路:注意事项:本题较难参考代码:#include <stdio.h> #include <stdlib.h> #include <math.h> using namespace std; ……

2918:成绩排序

摘要:```c #include #include typedef struct student { char name[25]; int score; }student; int ma……

一种利用switch_case特性的巧妙解法

摘要:# 一种利用switch_case特性的巧妙解法——减少代码量 ## 传统写法 各种写法很多,这儿提供一种典型的: ```c #include int main() { int ……

字符大法好

摘要:解题思路:用字符串一个一个取出来注意事项:特别注意就是别想复杂了,一般数学取数字问题多多考虑字符串参考代码:#include <iostream>#include <stdio.h>using nam……

字符串连接

摘要:```cpp #include using namespace std; int main() { string s,t; getline(cin,s); getline(……

就要和别人不一样

摘要:解题思路:如果没完没了怎么办?我们构造一个函数,一个名为 `run` 的函数。创建了一个列表 `ranges`,其中包含了多个元组。每个元组包含两个值,第一个值是利润上限 `limit`,第二个值是对……