题解列表

筛选

C++ 10行代码解决问题

摘要:解题思路:通过题意计算出第0年的纪年来作为初始值注意事项:参考代码:#include<iostream> using namespace std; int main(){ string tia……

1036: [编程入门]带参数宏定义练习

摘要:解题思路:写一个宏,包含两个实参,内容是用另一个temp来交换这两个实参。注意事项:temp要定义出来,否则无法使用宏。参考代码:#include <iostream> #define Swap……

自定义函数

摘要:```cpp #include using namespace std; double fact(int n){ double a,b=1.0; for(a=1;ax>>n; fo……

1037: [编程入门]宏定义的练习

摘要:解题思路:和上一题一样,主要是为了练习宏定义的格式。注意事项:无,甚至不用写注释。参考代码:#include <iostream> #define REMAINDER(num1, num2) (……

C++ 动态规划

摘要:解题思路:将每条蓝肽序列的子序列存入字符串数组中,将问题化为寻找最长公共子序列问题注意事项:参考代码: #include<iostream>  #include<string>  #include……

[编程入门]电报加密

摘要:解题思路:注意事项:参考代码:a=input()b=[]for i in a:    if i>=&#39;a&#39; and i<&#39;z&#39;or i>=&#39;A&#39; and ……