
模拟
文章平均质量分 69
Terry__J
这个作者很懒,什么都没留下…
展开
-
usaco Transformations
<br />Transformations<br />方块转换<br />译 by TinyTony<br />一块N x N(1<=N<=10)正方形的黑白瓦片的图案要被转换成新的正方形图案。写一个程序来找出将原始<br />图案按照以下列转换方法转换成新图案的最小方式:<br />#1:转90度:图案按顺时针转90度。<br />#2:转180度:图案按顺时针转180度。<br />#3:转270度:图案按顺时针转270度。<br />#4:反射:图案在水平方向翻转(形成原图案的镜像)。<br />#原创 2011-05-26 19:44:00 · 1284 阅读 · 0 评论 -
poj 1281 MANAGER
<br />题意:进程管理,这里提供几种操作<br /> a x - add to the queue the process with the cost x; r - remove a process, if possible, from the queue according to the current manager policy; p i - enforce the policy i of the manager, where i is 1 or 2. The default manager po原创 2011-05-27 11:38:00 · 1083 阅读 · 0 评论 -
poj 3751时间日期格式转换
<br /> 时间日期格式转换Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4974 Accepted: 2284<br />Description世界各地有多种格式来表示日期和时间。对于日期的常用格式,在中国常采用格式的是“年年年年/月月/日日”或写为英语缩略表示的”yyyy/mm/dd”,此次编程大赛的启动日期“2009/11/07”就是符合这种格式的一个日期,而北美所用的日期格式则为“月月/日日/年年年年”或”mm/dd/yyyy”原创 2011-05-30 01:04:00 · 1035 阅读 · 0 评论 -
poj 2894 Ancient Keyboard
<br />题意:一个键盘含'A'-'Z'26个键,每个键上都有一个状态转化功能,默认为off,根据on状态的键的数量输出字符。 If there are i LEDs on, the ith letter of the English alphabet is written on the tape. For example, if three LEDs are on at a time step, a letter 'C' is written on the tape.(不重复)。<br />代码:<br原创 2011-05-29 16:32:00 · 949 阅读 · 0 评论 -
poj 3752字母旋转游戏
Description给定两个整数M,N,生成一个M*N的矩阵,矩阵中元素取值为A至Z的26个字母中的一个,A在左上角,其余各数按顺时针方向旋转前进,依次递增放置,当超过26时又从A开始填充。例如,当M=5,N=8时,矩阵中的内容如下: A B C D E F G H V W X Y Z A B I U J原创 2011-06-15 13:46:00 · 988 阅读 · 0 评论 -
poj 1107W's Cipher
题意:给定字符串可分为三个部分:Encrypting a message requires three integer keys, k1, k2, and k3. The letters [a-i] form one group, [j-r] a second group,原创 2011-08-27 16:54:01 · 843 阅读 · 0 评论 -
hdoj 3209 Jumping Hands
思路:模拟。以钟表中心建立直角坐标系,根据每根针权重计算出重心,确定长度,并根据当前时间确定每根针的角度,计算出相应的x,y坐标,这样每一秒的距离都计算出来了#include #include #include #include #include using namespace std;const double PI = acos(-1.0);int l1, l2, l3, m原创 2012-03-31 12:15:16 · 660 阅读 · 0 评论 -
hdoj 3711 Binary Number
来源:2010 Asia Chengdu Regional Contest思路:简单题,计算最小不同位的个数。#include #include #include #include using namespace std;const int MAX = 110;const int INF = 1000001;int a[MAX], b[MAX];int n, m;原创 2012-03-31 16:06:57 · 748 阅读 · 0 评论 -
hdoj 1361 Parencodings 2001 Asia Regional Teheran
思路:模拟,根据序列P可以构造出S,然后再根据S,推出序列W。#include #include #include #include #include using namespace std;char str[50];int w[25];int main(){ int t, n, num; scanf("%d", &t); while (t--) { scan原创 2012-03-23 12:50:06 · 729 阅读 · 0 评论