题解列表

筛选

1315: 田忌赛马

摘要:```cpp #include using namespace std; int b[10001],bb[10001]; long long sum,t; int main() { ……

素数回文(c语言代码)

摘要:```c #include #include int IsPrime(int n); int IsParlindrome(int n); int main()//素回文数 { i……

1318: 选课(c++代码)

摘要:```cpp #include #include using namespace std; const int maxn=301; int f[maxn][maxn],bro[maxn],s……

1671:小九九(c++)双循环+if语句

摘要:解题思路:双循环+if语句//附上“%d*%d=%-3d”数据类型注意事项:判断语句if(i>=j)用于输出矩阵中对角线以下的数据参考代码:#include<iostream>#include<cst……
优质题解

贪心 + 优先队列

摘要:# 贪心 + 优先队列 ## 解题思路 > 问题一:某一娱乐项目所需要支付的钱随着购买人数的增加是一个怎样的趋势? 可以发现,单价为$$one = k \times x + b$$,购买……

难度比蛇形矩阵简单多了

摘要:解题思路:注意事项:看了之前的Python的题解感觉自己的效率应该会差一点,因为用了双重循环,当应该会清晰一些参考代码:l=[]n=k=0for i in range(5):    l.append(……