Last active
October 30, 2016 01:52
-
-
Save hamzahasbi/ec078a4421272972f46308e263ed3d31 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| map<int,bool>mark; | |
| for(int i=0;i<n;i++) | |
| { | |
| for(int j=0;j<m;j++) | |
| { | |
| if(abs(a[i]-b[j])<=1) | |
| { | |
| if(!mark[j] ) | |
| { | |
| c++;mark[j]=true; | |
| break; | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment