牛客440904392号
牛客440904392号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客440904392号的博客
全部文章
(共258篇)
题解 | 格式化输出
n, m = map(int, input().split()) nums = list(map(int, input().split())) for i in range(0, n, m):print(*nums[i : i + m])
2026-01-10
0
23
题解 | 最小包围盒
t = int(input()) if t == 1: s=input() print(s,s) else: x1, y1 = map(int, input().split()) x2, y2 = map(int, input().split()) for _...
2026-01-10
0
27
题解 | 平方和一行足矣
print(sum(int(c) ** 2 for c in input()))
2026-01-10
0
22
题解 | 找最小数
nums = [list(map(int, input().split())) for _ in range(int(input()))] nums.sort() print(*nums[0])
2026-01-10
0
23
题解 | 2024_网络故障检测_2819
import java.util.*; public class Main { // 自定义设备节点类:存储设备号、类型、端口号、子节点列表 private static class Node { int id; // 设备号 int ...
2026-01-10
0
27
题解 | 2024_手机基站_1551
#include<iostream> #include<vector> #include<algorithm> using namespace std; struct Person { string phone; char seq; s...
2026-01-10
0
25
题解 | 计算字符串的编辑距离
#include<iostream> using namespace std; int min(int a, int b, int c) { if (a < b) return a < c ? a : c; else return b < c ? b...
2026-01-10
0
26
题解 | 排队打饭用小根堆每次选取最小元素
from heapq import heappush, heappop n, r = map(int, input().split()) times = list(map(int, input().split())) times.sort() heap = [0] * r res = 0 for x...
2026-01-10
0
25
题解 | 最大子段和动态规划
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n...
2026-01-10
0
29
题解 | 长方形中的正方形
l, w = map(int, input().split()) ans = 0 while l > 0 and w > 0: if l >= w: ans += l // w l %= w else: ans += ...
2026-01-10
0
27
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页