UVA 12571 - Brother & Sisters! Shipu Ahamed - 01 Sep 2020 Problem PDFSolution:/************************************* ******** Team : BUBT_HIDDEN ********** ************************************** *********** Shipu Ahamed ************* *************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define sc scanf #define pf printf #define pi 2*acos(0.0) #define ft first #define se second #define r(input) freopen("input.txt","r",stdin) #define w(output) freopen("output.txt","w",stdout) #define maxall(v) *max_element(v.begin(),v.end()) #define minall(v) *min_element(v.begin(),v.end()) #define Sort(v) sort(v.begin(),v.end()) #define un(v) Sort(v), v.erase(unique(v.begin(),v.end()),v.end()) #define cover(a,d) memset(a,d,sizeof(a)) using namespace std; int main() { int t; cin>>t; while(t--) { int n,k,a[200000],b,i=0; cin>>n>>k; int p=n; for(int i=0;i=0;j--) { res=a[j]&b; if(res!=0) break; } pf("%d\n",res); } } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/12571/12571.cpp