Last active
November 5, 2019 20:02
-
-
Save sandes/81d913d9cf8664c862ee to your computer and use it in GitHub Desktop.
This file contains 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
#include <iostream> | |
#include <map> | |
using namespace std; | |
typedef map<int,int> map_p; | |
bool areinverse(map_p M1, map_p M2){ | |
if(M1.size()!=M2.size()) return false; | |
map_p::iterator p = M1.begin(); | |
while(p!=M1.end()){ | |
if(M2.find(p->second)!=M2.end()){ | |
if(M2[p->second]!=p->first) return false; | |
}else | |
return false; | |
p++; | |
} | |
return true; | |
} | |
int main(int argc, char *argv[]) { | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment