zoukankan      html  css  js  c++  java
  • [HDOJ1000]A + B problem

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1000

    神题

    代码如下:

     1 #include <cstdio>
     2 #define _______                 int
     3 #define ________                while
     4 #define _________               return 
     5 #define ___________             if
     6 #define ____________            else
     7 #define _____________           printf
     8 #define ______________          "%d
    "
     9 #define _______________         "%d %d"
    10 #define ________________        ~scanf
    11 #define _________________       main
    12 #define __________________      ,
    13 #define ___________________     1
    14 #define $                       =
    15 #define $_$                     ==
    16 
    17 // Please input two numbers (devided with a space) while you run it.
    18 _______ _ __________________ __;
    19 
    20 _______ ______(_______ _ __________________ _______ __) {
    21     _______ ____ $ _ ^ __;
    22     _______ ___ $ _ & __;
    23     ________(___) {
    24         _______ _____ $ ____;
    25         _______ __________ $ ___ << ___________________;
    26         ____ $ _____ ^ __________;
    27         ___ $ _____ & __________;
    28     }
    29     _________ ____;
    30 }
    31 
    32 _______ ____(_______ ___) {
    33     ___________(___ $_$ _) _________ ___________________;
    34     ____________ _________ ______(____(______(___ __________________ ___________________))
    35     __________________ ___________________);
    36 }
    37 _______ _____(_______ ___) {
    38     ___________(___ $_$ __) _________ ___________________;
    39     ____________ _________ ______(_____(______(___ __________________ ___________________))
    40     __________________ ___________________);
    41 }
    42 
    43 
    44 _______ _________________() {
    45     ________(________________(_______________ __________________ &_ __________________ &__))
    46     _____________(______________ __________________ ______(____(___________________) 
    47     __________________ _____(___________________)));
    48 }

    (原版)

     1 #include <cstdio>
     2 
     3 int a, b;
     4 
     5 int C(int x, int y) {
     6     int xr = x ^ y;
     7     int nd = x & y;
     8     while(nd) {
     9         int xr1 = xr;
    10         int nd1 = nd << 1;
    11         xr = xr1 ^ nd1;
    12         nd = xr1 & nd1;
    13     }
    14     return xr;
    15 }
    16 
    17 int A(int c) {
    18     if(c == a) {
    19         return 1;
    20     }
    21     else {
    22         return C(A(C(c, 1)), 1);
    23     }
    24 }
    25 int B(int c) {
    26     if(c == b) {
    27         return 1;
    28     }
    29     else {
    30         return C(B(C(c, 1)), 1);
    31     }
    32 }
    33 
    34 
    35 int main() {
    36     while(~scanf("%d %d", &a, &b)) {
    37         printf("%d
    ", C(A(1), B(1)));
    38     }
    39 }
    View Code

    然后TLE了

  • 相关阅读:
    ORA-32004 的错误处理
    告警日志
    ORACLE 归档日志打开关闭方法
    oracle归档日志配置查询
    教你如何阅读Oracle数据库官方文档
    使用Oracle安装账户登录数据库
    poj 2186 (强连通缩点)
    poj 2516 (费用流)
    STL集合容器set按照由小到大或者由大到小的顺序存放元素
    Android项目 手机安全卫士(代码最全,注释最详细)之十二 设置中心的界面
  • 原文地址:https://www.cnblogs.com/kirai/p/4852115.html
Copyright © 2011-2022 走看看