题解列表

筛选

信息学奥赛一本通T1424-喷水装置

摘要:解题思路:注意事项:整体思路是按照喷头的起始位置从小到大进行排序,然后依次放置喷头,直到覆盖整个地块或者没有剩余的喷头可以放置。#include<iostream>#include<algorithm……

信息学奥赛一本通T1423-种树

摘要:解题思路:代码的思路是首先按照结束位置end对s数组进行从小到大的排序,然后遍历s数组中的每个元素。对于每个元素,首先计算数组a中在结束位置end到开始位置start之间已经被覆盖的位置数sum。如果……

C++速度求解,够取巧

摘要:解题思路:暴力!按题目求解注意事项: 注意有局限性,万一人家输入的数组是乱序排放呢参考代码:#include <bits/stdc++.h>using namespace std;#define N ……

蓝桥杯【3150】一种做法~

摘要:## 3150的一种解法 **第一次写题解,不好勿喷** ### 直接上代码 ```c++ #include using namespace std; int fin……

矩阵最大值c++

摘要:```cpp #include using namespace std; int main() { int m, n; int a[101][101]; whi……

动态规划(C++)代码

摘要:#include <iostream> using namespace std; const int N = 1000010, INF = 0x3f3f3f3f; int a[N],……

二维数组线性dp(C++)

摘要:#include using namespace std; const int N = 110; int f[N][N]; int a[N][N]; int main() { int ……