MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋
題目地址 :
http://acm.hdu.edu.cn/showproblem.php?pid=3082
題目分析:
沒什么特殊的方法, 簡單模擬就可以了 :
代碼 :
MiYu原創, 轉帖請注明 : 轉載自 ______________白白の屋
題目地址:
http://acm.hdu.edu.cn/showproblem.php?pid=1230
題目描述:
純粹的模擬題........
代碼:
代碼
題目地址:
http://acm.hdu.edu.cn/showproblem.php?pid=2526
題目描述:
1 16 111 1 110 1 101 1 100 1 011 1 010 0 001 1 000 0 0000000000000001000000000000000
0000000000000001000000000000000 0000000000000010100000000000000 0000000000000101010000000000000 0000000000001010101000000000000 0000000000010101010100000000000 0000000000101010101010000000000 0000000001010101010101000000000 0000000010101010101010100000000 0000000101010101010101010000000 0000001010101010101010101000000 0000010101010101010101010100000 0000101010101010101010101010000 0001010101010101010101010101000 0010101010101010101010101010100 0101010101010101010101010101010 1010101010101010101010101010101
題目分析 :
純水 模擬題.......... 就是 由 上面 3 個 格子的 顏色 推出下面 中間那塊的 顏色. 推出來直接輸出就可以了 .
題目開始已經給出了第一行的 顏色 , 下面的可以直接 暴力推出來 用hash很快就能判斷.
代碼如下 :
/*
Coded By : MiYu
Link : http://www.cnblogs.com/MiYu || http://www.shnenglu.com/MiYu
Author By : MiYu
Test : 1
Program : 2526
*/
//#pragma warning( disable:4789 )
#include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
char c[2][50];
int T,t,M;
int main(){
char a[3],b[9];
for(int i=0;i<2;i++) c[i][0]='0';
scanf("%d",&T);
while(T--){
scanf("%d",&M);
for(int i=1;i<=8;i++){
scanf("%s",a);
int num=(a[0]-'0')*4+(a[1]-'0')*2+a[2]-'0';
scanf("%d",&t);
b[num] = '0' + t;
}
scanf("%s",&c[0][1]);
int len=strlen(&c[0][1]);
for(int i=0;i<2;i++) c[i][len+1]='0';
for(int j=0;j<M;j++){
for(int i=0;i<len;i++){
int num=(c[j%2][i]-'0')*4+(c[j%2][i+1]-'0')*2+c[j%2][i+2]-'0';
c[(j+1)%2][i+1]=b[num];
printf("%c",c[j%2][i+1]);
}
printf("\n");
}
}
return 0;
}
4 9#23-9-12-12#19-20-5-1-12#1-20#12-5-1-19-20#15-14-5#10-5-23-5-12 1-14-4#12-5-1-22-5#20-8-5#13-21-19-5-21-13#9-14#20#13-9-14-21-20-5-19 1-6-20-5-18#20-8-5#15-16-5-14-9-14-7#15-6#20-8-5#5-24-8-9-2-9-20-9-15-14 7-15-15-4#12-21-3-11
I WILL STEAL AT LEAST ONE JEWEL AND LEAVE THE MUSEUM IN T MINUTES AFTER THE OPENING OF THE EXHIBITION GOOD LUCK