#include using namespace std; #define int long long int32_t main() { ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0); int n,mod;cin>>n>>mod;int a[n]; int po[n+1]={1};for(int i=1;i<=n;++i) {po[i]=(2*po[i-1])%mod;} for(int i=0;i>a[i];} set h;int res[n+1]={0};int res2[n+1]={0}; for(int i=0;i