include<cstdio> #include<iostream> #include<algorithm> #include<cmath> #include<cstring> #include<sstream> #include<stack> #include<map> #define INF 1e9 #define mod 100003 using namespace std; const int maxn=1000; typedef long long ll; map<int,int&g...