My Idea about this problem is given below : At first i stored 4 columns in four arrays namely A[ ] , B[ ] , C[ ] , D[ ] . Then i stored summations of all combinations of A[ ] and B[ ] array ( A*B SET ) in an Array namely mp[ ] . Again i stored summations of all combinations of C[ ] and D[ ] array ( C*D SET ) in an Array namely mp2[ ] . Then u can traverse any one of these two arrays ( mp[ ] , mp2[ ] ) and for each of the value in traversing array( suppose mp[ ]) , find out how many elements of other array(because of repeatation in the array mp2[ ] ) coincide , Be careful , you have to remember that repeatation can happen in your traversing ( mp[ ] )array also. Code is given below: #include<bits/stdc++.h> using namespace std; #define maxx 10000001 int mp[maxx],mp2[maxx]; //--------------upper bound function---------------- int upper_boundd(int n,int hi) { int lo=0,ans=0; while(lo<=hi) ...
#include<bits/stdc++.h> using namespace std; #define ll long long /* L = length of vector v D escription of states [12] = length of the number since integer contains (2^32/10^10 means )10 digit at best, [2] = number under construction already small in relation with given number or not?, [2] = number under construction already has taken its first digit or not?, [12] = number of zeroes in a number */ ll L,dp[12][2][2][12]; vector<int>v; //------DP function-------- ll DP(ll indx,int small,int started,ll zeroes) { if(indx==L) return zeroes; if(dp[indx][small][started][zeroes]!=-1) return dp[indx][small][started][zeroes]; ll till,ans=0; if(small) till=9; else ...
Select the developer provisioning profile that you use for your team members. Add your team member's iPhone UDID to your provisioning profile. Set the bundle id as per provisioning profile like below. In place of right side red rectangle, select any real device or Any iOS Device option. Only then you can see the archive menu clickable under Product menu. Click Archive button. The archive will be presented like below. Click "Distribute App". Since you are distributing app within your dev team, select Development option and click "Next". Since we are not going to deploy app as OTA, no need to check mark OTA. Click "Next". Select the previously used developer certificate and provisioning profile that you used during archiving. Click "Next". Ipa is generated. Click "Export". Put your desired location to export ipa. Ipa archive will look like below bundle. Cable connect your phone to your mac. Drag and drop the ipa over phone finder. I...
Comments
Post a Comment