Advertisement
Rofyda_Elghadban1

Untitled

Sep 29th, 2023
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. #define ll long long
  3. #define ull unsigned long long
  4. #define pi 3.141592654
  5. #define NUM 1e18
  6. #define Mod 1'000'000'007
  7. #define fixed(n) fixed<<setprecision(n)
  8. #define cin(v) for(auto &i:v) cin >> i ;
  9. #define cout(v) for(auto &i:v) cout << i <<" ";
  10. #define vowel(x) (x=='e'||x=='a'||x=='i'||x=='o'||x=='u')
  11. #define small(x) (x>=97&&x<=122)
  12. #define capital(x) (x>=65&&x<=90)
  13. #define Tolower(s) transform(s.begin(),s.end(),s.begin(),::tolower);
  14. #define Toupper(s) transform(s.begin(),s.end(),s.begin(),::toupper);
  15. #define all(v) ((v).begin()), ((v).end())
  16. #define allr(v) ((v).rbegin()), ((v).rend())
  17. #define updmax(a,b) a=max(a,b)
  18. #define updmin(a,b) a=min(a,b)
  19. #define ceil(a,b) ((a/b)+(a%b?1:0))
  20. /* asc -> 1 2 3 ,des -> 3 2 1 */
  21. /***********************************************************************************/
  22. using namespace std;
  23. void Rofyda_Elghadban(){
  24. #ifndef ONLINE_JUDGE
  25. freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  26. #endif
  27. ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  28. }
  29.  
  30. void solve(){
  31. int n,m;
  32. cin>>n>>m;
  33. vector<string>v,x,p;
  34. while(m--){
  35. string s,t;
  36. cin>>s>>t;
  37. if(s.size()<=t.size()){
  38. v.push_back(s);
  39. x.push_back(t);
  40. }else{
  41. v.push_back(t);
  42. x.push_back(s);
  43. }
  44. }cout(v);
  45. cout<<"\n";
  46. cout(x);
  47. cout<<"\n";
  48. for(int i=0;i<n;i++){
  49. string l;
  50. cin>>l;
  51. p.push_back(l);
  52. }
  53. cout(p);
  54. }
  55.  
  56. int main(){
  57. Rofyda_Elghadban();
  58. solve();
  59.  
  60. return 0;
  61. }
  62.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement