![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
模拟
chaojiaini
这个作者很懒,什么都没留下…
展开
-
PC/UVa 110102/10041 Minesweeper
这个题不难,但是最后最后会栽倒PE 手里,犯了经验主义错误注意“There must be an empty line between field outputs. ”只在每两个输出矩阵之间有空行,最后不输出空行(所有数据都是一次输入,只要在两个输出矩阵之间含有空行就行,不要求空行的位置一定得在下一次输入之前) 代码: #include using namespace std; #def原创 2012-02-24 11:10:18 · 477 阅读 · 0 评论 -
PC/UVa 题号: 110201/10037 Jolly Jumper
这道题是个非常简单的题,数量也不大,但是我居然会犯这种低级错误,最后输出把小写搞成大写,悲剧的我一直找不到问题在哪,郁闷 代码: #include #include using namespace std; #define maxnum 3005 int a[maxnum]; int sign[maxnum]; int main() { int n=0; int原创 2012-02-24 14:23:13 · 453 阅读 · 0 评论 -
poj 3673 Cow Multiplication(水题)
求A的各位数与B的各位数的成绩之和 直接算 #include #include using namespace std; #define maxnum 15 char stra[maxnum],strb[maxnum]; int a[maxnum],b[maxnum]; int main() { int i,sum,la,lb; while(cin>>stra>>st原创 2012-02-26 11:14:03 · 341 阅读 · 0 评论 -
poj 1835 宇航员
注意 当宇航员面相z轴时,如果向上是头所对的方向,例如,如果宇航员现在面相z轴的正半轴(2)向上,则是x 的负半轴(3);如果打表的话要注意,宇航员的头可能会倒过来 有一个公式 坐标轴的方向 0,1,2,3,4,5,; 可得到(n+3)%6 即为 n 的反方向,只需设三个参数,dir,(脸所对方向) lfdir(左脸说对方想),h(头所对方向) 一开始 dir=0,h=2 lfdir=4 注原创 2012-02-26 11:35:29 · 861 阅读 · 0 评论 -
PC/UVa 110104/706 LC-Display
模拟题: 观察 将这些“-”和“|”都写到数组里,令s=1 注意1当数字为“1”的时候要讲“|”写到最后一个也就是第s+2个, 2 每个数字之间隔一个空格 3 每个整数之后有一个空行 #include #include #include using namespace std; int s; char str[15]; int n[15]; in原创 2012-04-06 13:26:29 · 682 阅读 · 0 评论