随笔分类 - BFS
摘要:题目来自“2018-2019 ICPC, NEERC, Southern Subregional Contest”,codeforces上放置了此题:Find a Number 题意:给出两个正整数d,s。找到一个最小的数 n 使得 n%d==0,并且所有的 n 所有位的数字相加和为s。 解题思路:
阅读全文
摘要:题目链接:https://www.nowcoder.com/acm/contest/96/G 思路:两遍bfs,找到p到k的情况,记录时间;找到E到k的情况,记录时间。题目超时点在于输入需要用scanf。如果不用scanf可以用cin加速挂。 AC代码:
阅读全文
摘要:C. Ice Cave time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You play a computer game. Yo
阅读全文