题解列表
C++选择排序从小到大
摘要:#include<iostream>using namespace std;int main(){ int arr[10]; int min……
[STL训练]周瑜的反间计:利用vector<vector<int>>存储数据,之后利用二分法查询,结构清晰
摘要:1、解题思路:利用vector<vector<int>>存储数据,之后利用二分法查询,打印输出。2、注意事项:注意每个case后有一个空行。3、参考代码:#include<……
优先队列实现看病,取消同步流避免超时
摘要:解题思路:优先队列,实现看病案例注意事项:取消同步流,避免超时参考代码://看病 取消同步流,加快速度#include <bits/stdc++.h>using namespace std……
哥德巴赫曾猜测思路简单解
摘要:解题思路:注意事项:参考代码:#include<iostream>#define MAX 32767using namespace std;bool isPrime(int num){&n……
优雅的代码往往只需要一个简单的偏移量就能搞定!
摘要: #include #include #include #include using namespace std; const int dx[] = {-2,-2,2,2,1,-1……
编写题解 3106: 最优乘车(travel)
摘要:C++代码:```cpp#include #include #include #include using namespace std;const int INF=0x3f……
2798: 整数序列的元素最大跨度值
摘要:#include <bits/stdc++.h>using namespace std;int main(){ int n,maxx= -1e18 ,minn=1……
2799: 奥运奖牌计数
摘要:#include <bits/stdc++.h>using namespace std;int main(){ int n; int a……
1231: 杨辉三角 简洁 可读性高
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>usingnamespacestd;in……