差分与前缀和,时间复杂度O(nlogn) 摘要:解题思路:代码和注释已经很清晰了注意事项:参考代码:#include<bits/stdc++.h>using namespace std;#define maxn 100010#define maxm…… 题解列表 2022年08月24日 0 点赞 0 评论 799 浏览 评分:9.9
1081: Infinite Dictionaries ```cpp#include#include#includeusingnamespacestd;structrec{intflag,x,z;stringy;rec(){flag=0;x=0;y="";z=0;}};booloperatorsecond.z))return1;used1[it->seco 题解列表 2022年08月24日 0 点赞 0 评论 844 浏览 评分:9.9
1080: 战场的数目 ```cpp#include#includeusingnamespacestd;typedeflonglongLL;constLLmod=987654321;LLA[1][2],B[2][2],T[1][2],ans[2][2];voidinit(){B[0][0]=3;B[0][1]=T[0][1] 题解列表 2022年08月24日 0 点赞 0 评论 1131 浏览 评分:9.9
1079: 射击游戏 ```cpp#include#include#includeusingnamespacestd;intn;doubledp[7][7][7][7][7][7];doubledfs(int*h){if(dp[h[0]][h[1]][h[2]][h[3]][h[4]][h[5]]!=-1)returndp 题解列表 2022年08月24日 0 点赞 0 评论 1428 浏览 评分:9.9
2066: [STL训练]第36届ACM亚洲区大连站网络赛The kth great number(注意人数不足k个的时候怎么处理) 摘要:解题思路:注意事项:注意不满k个的时候,输出最大的参考代码:#include<iostream>#include<set>using namespace std;int main(void){ int…… 题解列表 2022年08月23日 0 点赞 0 评论 605 浏览 评分:9.9
权值线段树+离散化+动态规划,时间复杂度O(nlogn) 摘要:解题思路:权值线段树+离散化+动态规划注意事项:参考代码:#include<bits/stdc++.h>using namespace std;#define maxn 100010#define m…… 题解列表 2022年08月23日 0 点赞 2 评论 2125 浏览 评分:8.5
题目 1047: [编程入门]报数问题 #STL大法好```cpp#include#includeusingnamespacestd;intn,m=3,k=0,t=0;intmain(){dequeq;cin>>n;for(inti=1;i 题解列表 2022年08月23日 0 点赞 3 评论 497 浏览 评分:9.9
题目 1036: [编程入门]带参数宏定义练习 摘要:```cpp #include using namespace std; int main() { int a,b; cin >> a >> b; cout …… 题解列表 2022年08月23日 0 点赞 6 评论 531 浏览 评分:6.0
题目 1037: [编程入门]宏定义的练习 摘要:水个题解 ```cpp #include using namespace std; int main() { int a,b; cin >> a >> b; c…… 题解列表 2022年08月23日 0 点赞 2 评论 721 浏览 评分:6.0
题目 1038: [编程入门]宏定义练习之三角形面积 ```cpp#include#include#includeusingnamespacestd;intmain(){doublea,b,c;cin>>a>>b>>c;doublet=(a+b+c)/2;doublek=sqrt(t*(t-a)*(t-c)*(t-b));printf("%.3lf\n" 题解列表 2022年08月23日 0 点赞 9 评论 1060 浏览 评分:8.0