该题第一个py代码AC 解题思路:注意事项:最后一个用例是1到1需要特判一下,不特判的话输出是负值。一道简单的dijkstra板子题参考代码:n,m=map(int,input().split())t=[0]+list(map(int,input().split()))st=[False]*(n+1)gra=[[float( 题解列表 2023年03月27日 0 点赞 0 评论 667 浏览 评分:8.0
C语言的密码破译通解 摘要:解题思路:利用ASCII码来计算注意事项:参考代码:#include<stdio.h>#include<string.h>#include<ctype.h>int main(){ char* s…… 题解列表 2023年03月28日 0 点赞 0 评论 537 浏览 评分:8.0
字符個數統計c語言 摘要:解题思路:需要調用函數,而且此函數還需給出4個統計值,故需要使用指針,函數只能返回0個或一個值注意事项:参考代码:#include<stdio.h> void cnt_fun(char total[]…… 题解列表 2023年03月29日 0 点赞 0 评论 536 浏览 评分:8.0
给用Java的开一下荒土 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String[] a…… 题解列表 2023年03月31日 0 点赞 0 评论 773 浏览 评分:8.0
一种可借鉴的麻烦方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int a,int b){ return a>b?a:b;}int fun(int *a,int *b,int c…… 题解列表 2023年04月01日 0 点赞 0 评论 884 浏览 评分:8.0
一种可借鉴的麻烦方法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int t, n, m, i, j, x, y; scanf("%d",&t); for(…… 题解列表 2023年04月01日 1 点赞 0 评论 668 浏览 评分:8.0
[编程入门]宏定义练习之三角形面积_C++超简单版!!! 摘要:C++输出三位有效数字需要```cpp #include ```头文件 //其基本格式为 cout b >> c; cout …… 题解列表 2023年04月05日 0 点赞 0 评论 620 浏览 评分:8.0
简单数组算法 摘要:解题思路:注意事项:参考代码:int main() { int m, n; while (scanf("%d%d", &n, &m) != EOF) { int a[100]; …… 题解列表 2023年04月06日 0 点赞 0 评论 531 浏览 评分:8.0
开关灯 (比较小白) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int arr[5001];//存编号的数组 int arr1[500…… 题解列表 2023年04月06日 0 点赞 0 评论 678 浏览 评分:8.0
前驱 后驱数组 + 优先队列 #思路##如何动态维护这个序列对于这题我们需要维护一个前驱数组和后驱数组,当选中下标i作为被删除点时候进行如下操作```cpp//找到index的前驱sucs, 题解列表 2023年04月10日 0 点赞 0 评论 1073 浏览 评分:8.0