主题链接:HDU 2414 Chessboard Dance 意甲冠军:鉴于地图,>,<,^,v的方向,字母相当于是箱子,箱子能够推出边界.人保证不会做出边界.以下输入指令,依照指令走,输出结束时图的状态. 强行模拟一遍,注意以下给出的案例. >t.p.p.p ...a.... ........ ...bfg.y ...c... ...d.... ...e.... ........ move 3 turn right move 3 turn left move 3 turn left m…
题目 模拟题也各种wa,我最近真的堕落了,,,,,智商越来越为负数了!!!!!!!! #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; ][]; ;//0shang,1xia,2zuo,3you int x,y;//weizhi int weizhi(int i,int j) { ;;} ;;} ;;} ;;} ; } void fangxiang() { )mp[…
题目链接: PKU:http://poj.org/problem? id=3344 HDU:http://acm.hdu.edu.cn/showproblem.php?pid=2414 Description Another boring Friday afternoon, Betty the Beetle thinks how to amuse herself. She goes out of her hiding place to take a walk around the living…
Dance 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2223 Descriptionww.co For a dance to be proper in the Altered Culture of Machinema, it must abide by the following rules: A dip…
题目描述:输入一个偶数,判断这个偶数可以由哪两个差值最小的素数相加,输出这两个素数. 题目分析:模拟题,注意的是为了提高效率,在逐个进行判断时,只要从2判断到n/2就可以了,并且最好用打表法判断素数.代码附上... #include<cstdio> #include<cstring> #include<cmath> ; bool prim[MAX]; void dabiao() { //先打素数表 memset(prim,,sizeof(prim)); ;i<=M…
解题报告: 题目描述:写一个程序给一个编程考试C++实时提交系统排名,给你的数据是题目的总数,每次错误提交罚的时间分,每位用户的姓名,然后是输入用户每题的完成情况,有一下几种情况,第一,输入只有一个正值,表示该题只有一次提价记录,且已经AC了,第二,有一个正值,并且,正值后面有一个括号,括号里面有一个数字,前面的正值表示AC该题所用的时间,后面括号里面的数表示总共有多少次错误的提交记录,第三,只有一个负数,表示该题提交了这个负数的绝对值次,但还没有AC,第四,只有一个0,表示该题没有提交记录,对…
简单DFS. /* 2414 */ #include <cstdio> #include <cstring> #include <cstdlib> ; ][]; int x, y, d; ] = "^v<>"; ][] = { -,, ,, ,-, , }; ][] = { ,,, ,,, ,,, ,, }; inline bool check(int x, int y) { || x>=n || y< || y>=n;…
解题报告:水题,直接附上代码,只是觉得这题的作者是不是吃饱了饭撑的,反素数的概念跟这题一点关系都没有. #include<cstdio> int judge1(int k) { ; ;i<=k;++i) if(!(k%i)) tot++; return tot; } int main( ) { int n,a,b; scanf("%d",&n); while(n--) { scanf("%d%d",&a,&b); int M…
解题报告:这题我觉得题目有一个没有交代清楚的地方就是关于横线的字符的宽度的问题,题目并没有说,事实上题目要求的是在保证下面的圈高度不小于上面的圈的高度的情况下,横线的宽度就是等于下面的圈的高度. #include<cstdio> void outplay1(char d,int kuan,int n) { while(kuan--) printf(" "); while(n--) printf("%c",d); puts(""); }…
人工模拟.. #include<stdio.h> #include<iostream> #include<algorithm> #include<vector> #include<cmath> #include<queue> #include<set> #include<map> using namespace std; #define N 10100 #define inf 1000000010 map<…