题解列表

筛选

优质题解

贪心 + 优先队列

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

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

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

1318: 选课(c++代码)

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

素数回文(c语言代码)

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

1315: 田忌赛马

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

1314: 乘积最大

摘要:```cpp #include using namespace std; int _max(int *a,int n,int k) { if(k==0) { ……