题解列表

筛选

1236: 母牛生小牛

摘要:```cpp #include using namespace std; int count(int year) { if(year>N; cout……

1233: 核电站问题

摘要:```cpp #include using namespace std; int main() { int n; long long dp[50]={0,2,4,7}; ……

1232: 查找最大元素

摘要:```cpp #include #include using namespace std; int main() { string str; while(cin>>str……

归并排序python解法

摘要:参考代码:def merge_sort(li):    #数组长度不超过两个则不需要排序,直接返回    if len(li) <= 1:        return    mid=len(li)//……

归并排序求逆序对个数

摘要:解题思路:主要思想是归并排序,分为三种情况:①逆序数全部在左侧②逆序数全部在右侧③逆序数位于左右两侧参考代码:def merge_sort(li):    if len(li) <= 1:      ……

1351: 数字三角形4

摘要:```cpp #include using namespace std; int arr[30][30]; int main() { int n,x,y; cin>>n;……

1346: 数字三角形4

摘要:```cpp #include using namespace std; int ij[27][27]; int main() { int n,answer=-1; ci……