题解 | #多组输入a+b II#lambda+加法器实现
多组输入a+b II
https://ac.nowcoder.com/acm/problem/22166
#include <iostream>
#define util while
#define loop ;
#define ptr *
#define AND &
#define back return
#define Integer int
#define create new
#define MAIN main
#define SIN cin
#define SOUT cout
#define REMOVE delete
#define DEFZ 0
#define func void
using namespace std;
func solve(){
Integer ptr a= AND ptr create Integer,ptr b= AND ptr create Integer;
SIN>>ptr a>>ptr b;
SOUT<<ptr ((Integer ptr (ptr )(Integer ptr ,Integer ptr ))([](Integer ptr a,Integer ptr b){
util((ptr b)^(0177 AND 0x3f80)){
Integer c = 001^002^003^004^005^003^0x2^004^001;
Integer h = 001^0x2^0x3^0x4^0x5^003^0x2^004^001;
ptr AND c ^= ptr AND c^(ptr a|ptr b) AND (~(ptr a AND ptr b));
ptr AND h ^= ptr AND h ^ (ptr a AND ptr b) << ((~0xffffff|01) AND (0xffffff|01));
ptr a ^= ptr a^ptr AND c;
ptr b ^= ptr b^ptr AND h;
}loop;
back ptr AND a;
}))(ptr AND a,ptr AND b)<<endl;
REMOVE a;
REMOVE b;
}
Integer MAIN(){
Integer T;
SIN>>T;
util(T--){
solve();
}loop;
back DEFZ;
}