fork download
  1. /*
  2. وَلَا تُخْزِنِي يَوْمَ يُبْعَثُونَ•يَوْمَ لَا يَنفَعُ مَالٌ وَلَا بَنُونَ•إِلَّا مَنْ أَتَى اللَّهَ بِقَلْبٍ سَلِيم❤
  3. */
  4. #include <bits/stdc++.h>
  5. #define ll long long
  6. #define el endl
  7. using namespace std;
  8. void saf_sofa()
  9. {
  10. if (fopen("in.txt", "r"))
  11. {
  12. freopen("in.txt", "r", stdin);
  13. freopen("out.txt", "w", stdout);
  14. }
  15. ios_base::sync_with_stdio(false);
  16. cin.tie(NULL);
  17. }
  18. int dx[] = { 0, 0, 1, -1, 1, 1, -1, -1 };
  19. int dy[] = { -1, 1, 0, 0, -1, 1, 1, -1 };
  20.  
  21.  
  22. void solve()
  23. {
  24. int n, m, x, y;
  25. cin >> n >> m >> x >> y;
  26. for (int i = 0; i < n; i++)
  27. {
  28. int x;
  29. cin >> x;
  30. }
  31. for (int i = 0; i < m; i++)
  32. {
  33. int x;
  34. cin >> x;
  35. }
  36. cout << n + m << el;
  37. }
  38. int main()
  39. {
  40. saf_sofa();
  41. int t_ = 1;
  42. cin >> t_;
  43. while (t_--)
  44. {
  45. solve();
  46. }
  47. }
  48. /*
  49.  
  50. وَليتَ الذي بَيني وبينَك عامِرٌ وبَيني وبَينَ العَـٰالمينَ خرَابُ
  51.  
  52. */
Success #stdin #stdout 0.01s 5276KB
stdin
2
1 1 2 2
1
1
2 1 100000 100000
42 58
32
stdout
2
3