uva
Ru∪s.in
我的英雄主义
展开
-
uva227puzzle
#include <iostream> #include <string> #include <cstdio> #include <cstring> using namespace std; char puzzle[7][7]; int dx[]={-1,1,0,0}; int dy[]={0,0,-1,1}; int r,c; //读取并存入字符数...原创 2018-11-14 09:09:00 · 101 阅读 · 0 评论 -
【广搜】【习题汇总】
uva816 这个网址写的比较详细,建议仔细阅读 #include&lt;cstdio&gt; #include&lt;cstring&gt; #include&lt;vector&gt; #include&lt;queue&gt; using namespace std; struct Node { int r, c, dir; // 位于(r,c)朝向d原创 2019-01-25 08:21:14 · 149 阅读 · 0 评论 -
2-5 分数化小数()
输入正整数a, b, c,输出a/b的小数形式,精确到小数点后c位。a, b &amp;amp;lt;= 10^6,c &amp;amp;lt;= 100。输入包含多组数据,结束标记为a=b=c=0. 样例输入: 1 6 4 0 0 0 样例输出: Case 1:0.1667 分析: 尝试利用另一种办法分数化小数,先乘上10^c,留下 小数部分判断是否四舍五入再除以10^c,但输出结果有点问题。 #include &amp;amp;lt;std原创 2018-09-28 10:18:51 · 1005 阅读 · 0 评论 -
【模拟】【习题汇总】
uvalive3059 思路:很简单的模拟,这里设置了一个初始值吧b【0】可以把所有过程统一起来。 #include <iostream> #include <cstdio> using namespace std; int a[100],b[100]; int t; int sum; int main() { //freopen("input.txt","r",s...原创 2019-02-01 17:42:05 · 123 阅读 · 0 评论