题解列表

筛选

调用Math.pow()幂函数平方

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main{    public static void main(String[] args)……

BFS的一道模板题

#####这题太水了```javaimportjava.util.*;publicclassL141{staticcharnum[][]=newchar[101][101];staticintflag[][]=newint[101][101];staticintxw[]={0,

史上最笨比做法

解题思路:为了达到如题排序输出格式,采用类与容器结合方式,将一个数的最高位设置为排序字段,赋值给类的order属性注意事项:参考代码:classShuSort{public:ShuSort(intnum,intorder){this->m_num=num;this->m_order=order;}in

标准 A+B for Input-Output Practice (IV)

摘要:解题思路:用数组存放每次结果,再依次输出。注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; int i=0; int……

2814: 正常血压

摘要:参考代码:n = int(input()) count = [] h = 0 for i in range(n):     x, y = map(int, input().split()) ……

C++简单粗暴解决弟弟作业问题

解题思路:直接将计算表达式当作字符串输入,读取出a,b,c的值。判断即可。在字符串中a的分界是+或者-;使用string中的find_first_of函数,找到第一个出现+、-的位置string各个函数的用法,参考:string-C++Reference(cplusplus.com)找到了分隔位置,