蓝桥杯VIP算法训练-轨道炮-看完秒懂的(c++map) 解题思路:轨道炮:看题找算法:典型map题目思路:1.首先横向射和纵向射是分立的问题,可以分别解决然后取最大值。2.单个方向上问题就是:给定初始位置和速度,求一个时间和位置使得在这个时间和位置上重合的点最多。3.因为n只有1000,两两求出相遇时间以及位置,取答案最大的时间和位置即可。 题解列表 2022年03月31日 0 点赞 3 评论 1037 浏览 评分:3.5
编写题解 1211: 平方和与立方和 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>#include<math.h>using namespace std;void func(int m…… 题解列表 2022年03月31日 0 点赞 0 评论 569 浏览 评分:0.0
编写题解 1210: 小明A+B 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ int a,b; …… 题解列表 2022年03月31日 0 点赞 0 评论 496 浏览 评分:0.0
个人理解,希望能提供个思路 解题思路:①输入的整数值表示,从1970年1月1日00:00:00到当前时刻经过的毫秒数。这个数一般比较大,用longlong;②不显示出年月日,只需要显示出时分秒即可,需要毫秒数转换成秒。注意事项:scanf("%lld",&n);//我第一次程序没过, 题解列表 2022年03月31日 0 点赞 0 评论 556 浏览 评分:0.0
编写题解 1206: 字符串问题 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ string str; c…… 题解列表 2022年03月31日 0 点赞 0 评论 507 浏览 评分:0.0
题解 1020: [编程入门]猴子吃桃的问题 摘要:解题思路:从最后一天倒推结果注意事项:1 第10天没有吃 只计算9天2 设每一天的总数为a总数a=吃掉(a/2+1)+剩余aa存在迭代关系 总数a=(剩余aa+1)*2剩余aa是第二天的总数a3 …… 题解列表 2022年03月31日 0 点赞 0 评论 691 浏览 评分:6.0
[AC代码] 自适应辛普森求积分 解题思路:用自适应辛普森求多个圆在矩形ab内的并面积注意事项:参考:www.luogu.com.cn/problem/P4525www.luogu.com.cn/problem/SP8073将超出矩形的线段处理为0-a,0-b不处理r=0的圆参考代码:#includeus 题解列表 2022年03月31日 0 点赞 0 评论 1113 浏览 评分:8.2
一行导包,两行代码 摘要:解题思路:from datetime import date year,month,day=map(int,input().strip().split()) print(date(year,mon…… 题解列表 2022年03月31日 0 点赞 0 评论 605 浏览 评分:9.9
我不理解!!为什么不对!! 摘要: #include int main() { int a; scanf("%d",&a); int arr[1000]={0}; …… 题解列表 2022年03月31日 0 点赞 0 评论 603 浏览 评分:0.0
whlie循环解决数列求和 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ double a=2.0,b=1.0,c,sum=0.0; int n; scanf("%d",&n); whi…… 题解列表 2022年03月31日 0 点赞 0 评论 611 浏览 评分:9.9