Advertisement
momo2345

RDL

Aug 6th, 2020
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.13 KB | None | 0 0
  1. // ********* Assalamualaikum****** IN the name of my Almighty****:):)***
  2. #include<bits/stdc++.h>
  3. using namespace std;
  4. #define suni ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
  5. #define endl "\n"
  6. #define f(i,a,b) for(int i=a;i< b;i++)
  7. #define ff(i,a,b) for(int i= a;i>=b;i--)
  8. #define T int t; cin >>t; while(t--)
  9. #define TT int t; cin>>t; for(int i=1;i<=t;i++)
  10. #define vi  vector<int>
  11. #define vll vector<long long>
  12. #define vs vector<string>
  13. #define vp vector<pair
  14. #define pii pair<int,int>
  15. #define pb push_back
  16. #define mk make_pair
  17. #define b(a) a.begin(),a.end()
  18. #define rb(a) a.rbegin(),a.rend()
  19. #define I  int
  20. #define ll long long
  21. #define st string
  22. #define C char
  23. #define mn int main()
  24. #define w while
  25. #define fa(u,v) for(auto u:v)
  26. mn
  27. {
  28.     suni;
  29.     TT
  30.     {
  31.       I n,m;
  32.       cin>>n>>m;
  33.       map<pii,bool>p;
  34.       bool d=1;
  35.       w(m--)
  36.       {
  37.           I a,b;
  38.           cin>>a>>b;
  39.           if(p[{a,b}]) d=0;
  40.           p[{a,b}]=1;
  41.       }
  42.       if(d) cout<<"Scenario #"<<i<<": possible"<<endl;
  43.       else cout<<"Scenario #"<<i<<": impossible"<<endl;
  44.     }
  45. }
  46. //*******Happy Coding*******???******
  47.  
  48.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement