Codeforces Round 865 (Div. 2) 1816A Ian Visits Mary Solution


 

Problem Link  : https://codeforces.com/contest/1816/problem/A

Solution in C++:

  1. /// Author : AH_Tonmoy
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4. int32_t main() {
  5. ios_base::sync_with_stdio(0);
  6. cin.tie(0);
  7. int t;
  8. cin >> t;
  9. while (t--) {
  10. int a, b;
  11. cin >> a >> b;
  12. cout << "2" << endl;
  13. cout << a - 1 << " "
  14. << "1" << endl;
  15. cout << a << " " << b << endl;
  16. }
  17. return 0;
  18. }

No comments

Most View Post

Recent post

Codeforces Round 925 (Div. 3) 1931D. Divisible Pairs Solution

    Problem Link  :   https://codeforces.com/contest/1931/problem/D S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. ...

Powered by Blogger.