Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <map>
- using namespace std;
- map<int,int> compressed;
- int main(){
- int n;
- // read input here
- compressed[-123] = 0;
- compressed[-123123123] = 0;
- compressed[321321] = 0;
- compressed[32132112] = 0;
- compressed[0] = 0;
- // end read input
- int cnt = 0;
- for(map<int,int>::iterator it = compressed.begin(); it != compressed.end(); ++it) it->second = cnt++;
- compressed[-123123123] => 0
- compressed[-123] => 1
- compressed[0] => 2
- compressed[321321] => 3
- compressed[32132112] => 4
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement