- //time:34.220s
- #include<cstring>
- #include<iostream>
- #include<fstream>
- #include<algorithm>
- using namespace std;
- class MY{
- int a;
- //public:
- friend ostream& operator <<(ostream& os,const MY &my){
- os<<my.a;return os;
- }
- friend istream& operator >>(istream& is,MY& my){
- is>>my.a;return is;
- }
- public:
- bool operator<(const MY& another){
- return this->a<another.a;
- }
- };
- template<class T>
- void bubble(T A[],int n)
- {
- for(int i=n-1;i>=1;i--)
- for(int j=0;j<i;j++)
- if