模板题,可以用Dijkstra以及堆优化的还有spfa 摘要:解题思路:只需算出各点到起点的距离,求出最大值,如果出现正无穷,则说明传送不到,输出-1,否则更新ans注意事项:参考代码: #include<iostream> #include<cstring…… 题解列表 2023年07月09日 0 点赞 0 评论 343 浏览 评分:9.9
1002: [编程入门]三个数最大值 (python代码) 摘要:方法一 a, b, c = map(int, input().strip().split()) sum=[a, b, c] sum.sort() print(sum[2]) …… 题解列表 2023年07月09日 0 点赞 0 评论 657 浏览 评分:0.0
[python] 1001: [编程入门]第一个HelloWorld程序 摘要:方法一: print("**************************") print("Hello World!") print("**********************…… 题解列表 2023年07月09日 0 点赞 0 评论 465 浏览 评分:0.0
1000: [竞赛入门]简单的a+b (python代码) 摘要: while True: #while True 语句中一定要有结束该循环的break语句,否则会一直循环下去的 try: #Python 中,用try except语句块捕获…… 题解列表 2023年07月09日 3 点赞 0 评论 1135 浏览 评分:8.0
奖学金(利用结构体和sort) 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <algorithm>//利用sort排序 using namespace std; struct St…… 题解列表 2023年07月09日 0 点赞 0 评论 269 浏览 评分:0.0
1118: Tom数,简洁易懂 摘要:##1118: Tom数,简洁易懂 ```cpp #include using namespace std; int main(){ long long a;//注意,这里要用long l…… 题解列表 2023年07月08日 0 点赞 0 评论 410 浏览 评分:0.0
回文日期(c++) 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int main(){ char arr[8]; scanf("…… 题解列表 2023年07月08日 0 点赞 0 评论 403 浏览 评分:0.0
2814: 正常血压(C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int a[n][2]; int i,j; for(i=0;i<n…… 题解列表 2023年07月08日 0 点赞 0 评论 411 浏览 评分:9.9
人口增长问题 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double x; int n; cin…… 题解列表 2023年07月08日 0 点赞 0 评论 419 浏览 评分:6.0
三目运算符闰年判断 摘要:代码:#include <stdio.h>#define LEAP_YEAR(y) (y%400 ==0 ? printf("L") : ((y%4 ==0 && y%100 != 0) ? prin…… 题解列表 2023年07月08日 0 点赞 0 评论 260 浏览 评分:0.0