题解列表
1262: 邮局选址问题(模拟退火)
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>
using namespace std;
struct poit
{
int x;
int y;
}p[1……
算法提高VIP-复数求和
解题思路:分析题目要求:输入几行,将输入的数字存入一个列表中,方便下面的使用for循环把列表中的数字相加,最后格式化输出。注意事项:要会用循环参考代码:n=int(input())l=[]whilen>0:a,b=map(int,input().split())l.append((a,
思路就是要连着一样所以要一直迭代
解题思路:注意事项:参考了c的写法用了好久参考代码:l=list(input().split())l1=l[0]+l[0]l2=l[1]+l[1]#之前都不会这个,原来可以这样搞la=len(l[0])lb=len(l[1])ans=0mn=min(la,
1305: 老管家的忠诚(ST表)
摘要:解题思路:ST表预处理时间为o(nlogn),查询时间为o(1),适用于区间最值查询,但不支持在线修改注意事项:参考代码:#include<bits/stdc++.h>
using namespac……