• hdu 6077 Time To Get Up


    一道水题而且教练讲过 一开始就没想好 这是很尴尬的 后来想了想 然后写了写 然后就这样浪费了巨大的时间 喵呜- -

    #include <iostream>
    #include <algorithm>
    #include <stdio.h>
    #include <queue>
    #include <limits.h>
    #include <string.h>
    #include <vector>
    #include <map>
    //#include <math.h>
    #define LL unsigned long long
    #define INF 2100000000
    #define fi first
    #define se second
    #define lowbit(x) (x&(-x))
    #define eps 5e-7
    using namespace std;
    const int maxn=(int)1e2 +30;
    const int MOD=(int)1e9+10;
    //const double PI=acos(-1.0) ;
    int sgn(double x){return (x>eps)-(x<-eps);}
    template<class T>inline void MAX(T &a,T b){if(a<b)a=b;}
    template<class T>inline void MIN(T &a,T b){if(a>b)a=b;}
    
    char a[8][30];
    //int x[]={0,0, 1,2, 4,5, 6,6, 5,4, 2,1, 3,3};
    //int y[]={1,2, 3,3, 3,3, 1,2, 0,0, 0,0, 1,2};
    
    int x[]={0, 1, 4, 6, 5, 2, 3};
    int y[]={1, 3, 3, 1, 0, 0, 1};
    int gethash(int n,int m){
        int ha=0;
        for(int i=0;i<7;i++){
                ha=ha<<1;
            if(a[n+x[i]][m+y[i]]=='X'){
                a[n+x[i]][m+y[i]]='Q';
    
                ha|=1;
            }
    
        }
        return ha;
    }
    int x1[]={0,0,0,0};
    int y1[]={0,5,12,17};
    int ans[5];
    int fuck[]={126,48,109,121,51,91,95,112,127,123};
    void out(int ha){
        int w[10];
        memset(w,0,sizeof w);
        int cnt=0;
        while(ha){
            w[cnt++]=ha&1;
            ha>>=1;
        }
        for(int i=0;i<7;i++)printf("%d",w[i]);printf("
    ");
    }
    int main(){
    #ifdef shuaishuai
        freopen("C:\Users\hasee\Desktop\a.txt","r",stdin);
        //freopen("C:\Users\hasee\Desktop\b.txt","w",stdout);
    #endif
        int t;
        scanf("%d
    ",&t);
        while(t--){
            for(int i=0;i<7;i++){
                gets(a[i]);
            }
    
            for(int i=0;i<4;i++){
                int ha=gethash(x1[i],y1[i]);
    //            printf("%d %d
    ",i,ha);
    //            out(ha);
                ans[i]=-1;
                for(int j=0;j<10;j++){
                    if(fuck[j]==ha) {ans[i]=j;break;}
                }
            }
    //        for(int i=0;i<7;i++)puts(a[i]);
            printf("%d%d:%d%d
    ",ans[0],ans[1],ans[2],ans[3]);
        }
    
        return 0;
    }
  • 相关阅读:
    90个常用词根,30个前缀30个后缀
    七、图形与图像处理(1)
    解决Android SDK下载和更新失败的方法(Win系统) 和离线安装
    IT技术网站汇总
    css padding和margin的百分比
    div无法跟随内容的增加而拉伸
    html元素被隐藏在后面
    cron 执行php文件
    cron 编辑器修改
    Eclipse PHP 代码无法自动提示函数
  • 原文地址:https://www.cnblogs.com/MeowMeowMeow/p/7283471.html
Copyright © 2020-2023  润新知