题解列表
容易理解的C语言代码
摘要:解题思路:注意事项:参考代码:#include <stdio.h>
int gcd(int a, int b)//最大公约数
{
if (b == 0)
return ……
信息学奥赛一本通T1588-数字游戏-题解(C++代码)
摘要: 数位DP板子题(本质记忆化搜索)constexpr auto Inf = 0X3F3F3F3F;
#ifndef LOCAL
#include <bits/stdc++.h>
……
朴实无华的解法,只要你懂结构体,冒泡排序,strcmp函数,就能看得懂。
摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include<string.h>struct student{ char name[101]; int age; ……
兰顿蚂蚁 Python直接思路
摘要:解题思路:注意事项:参考代码:def white(mapList, x, y, direction, steps):
mapList[x][y] = 1
if direction ……
编写题解 1018: [编程入门]有规律的数列求和
解题思路:把分子分母拉直存到一维数组中,如[1,2,2,3,3,5,5,8...],两两为一组进行计算。注意事项:找规律参考代码:n=int(input())array=[0]*n*2array[0]=1array[1]=2sum=2/1ifn==1:print('{:.2f}'.fo
1651: 蓝桥杯算法训练VIP-王、后传说(Python3)DFS
摘要:解题思路:DFS注意事项: 代码改进: 1.dfs内的赋值部分分开写可以缩短运行时间; 2.这里判断王的坐标的方法比较笨,浪费了很多空间。参考代码:def dfs(r……
不用使用数组,直接根据题意求解
摘要:#include<stdio.h>
#include<math.h>
int main()
{
int n,m;
while(~scanf("%d %d",&n,&m)){
int……