rock,scissors and paper 摘要:解题思路:这里根据3个string长度不同 就直接用int标记 封装一个判断函数 函数判断就三种结果 要么前面赢(8,5;4,8,;5,4;) 要不后面赢(这里复制一下就好了) 要不平局(s1.siz…… 题解列表 2024年11月30日 0 点赞 0 评论 293 浏览 评分:0.0
使用unordered_map解题 摘要:解题思路:充分利用STL容器的特性-unordered_map, 对其进行存放和计算 得出第一个个数为1的小写字母注意事项: 参考代码:#include<bits/stdc++.h>char sear…… 题解列表 2024年11月30日 0 点赞 0 评论 296 浏览 评分:0.0
编写题解 1227: 日期排序 摘要: #include struct a { int a; int b; int c; }; int main() …… 题解列表 2024年11月30日 1 点赞 0 评论 505 浏览 评分:9.9
3310: 单调队列 哈哈哈哈哈哈哈哈 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义一个队列,用于存储结果 queue<int> q; int m…… 题解列表 2024年11月30日 0 点赞 0 评论 173 浏览 评分:0.0
编写题解 1227: 日期排序 摘要:import java.util.*;public class Main{ public static void main(String[] args){ Scanner in=n…… 题解列表 2024年11月30日 0 点赞 0 评论 289 浏览 评分:0.0
蓝桥杯算法提高VIP-队列操作 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义全局变量n, k, l int n, k, l; // 定义一…… 题解列表 2024年11月30日 0 点赞 0 评论 194 浏览 评分:0.0
两行直接秒 摘要:解题思路:map输入三数print输出首项+d*(n-1)注意事项:参考代码:a1,a2,n=map(int,input().split())print(a1+(a2-a1)*(n-1))…… 题解列表 2024年11月30日 0 点赞 0 评论 152 浏览 评分:0.0
Python 1075 台球碰撞 用一行代码解决计算问题 摘要:解题思路:首先,按照L,W,x,y,R,a,v,s的形式来讲 第一点,明确台球中心点概念,每次碰撞并不是中心点碰撞台球桌边界,而是以边界撞击边界值,所以台球中心点的位移区域是R<=x<=L-R,…… 题解列表 2024年11月30日 2 点赞 0 评论 332 浏览 评分:10.0
海伦公式秒杀 摘要:解题思路:注意事项:参考代码:import mathnum=list(map(float,input().split()))a=math.sqrt((num[3] - num[1]) ** 2 + (…… 题解列表 2024年11月30日 0 点赞 0 评论 285 浏览 评分:0.0
注意q和p不能放在整数型里 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n; double Sn=0,q=2.0,p=1.0; scanf("%d",&n…… 题解列表 2024年11月30日 0 点赞 0 评论 188 浏览 评分:0.0