1312

CodeForces 1312G Autocompletion

洛谷传送门 CF 传送门 考虑直接在题目给的 Trie 上 dp,设 \(f_u\) 为打出 \(u\) 结点的串的最小代价。 首先我们有 \(f_u \gets f_{fa_u} + 1\)。 我们有 \(f_u \gets \min\limits_v f_v + t + 1\),要求 \(u\) ......
Autocompletion CodeForces 1312G 1312

1312:【例3.4】昆虫繁殖

1312:【例3.4】昆虫繁殖 时间限制: 1000 ms 内存限制: 65536 KB提交数: 41168 通过数: 20495 【题目描述】 科学家在热带森林中发现了一种特殊的昆虫,这种昆虫的繁殖能力很强。每对成虫过x�个月产y�对卵,每对卵要过两个月长成成虫。假设每个成虫不死,第一个月只有一对 ......
昆虫 1312 3.4

HDU 1312 Red and Black 题解

//注意边界判断,调了好久#include <iostream> #include <queue> using namespace std; #define check(x,y)(x<wx&&x>=0&&y<hy&&y>=0) struct node { int x, y; }; char room ......
题解 Black 1312 HDU Red

Red and Black HDU - 1312 (连通块的大小)

题意:求某点所在连通块的大小。 分析:由某点进行dfs,每次标记该点,并计数。 #include <bits/stdc++.h> using namespace std; typedef long long LL; const int N = 110, INF = 0x3f3f3f3f; strin ......
大小 Black 1312 Red HDU
共4篇  :1/1页 首页上一页1下一页尾页