Codeforces 1366A - Shovels and Swords Solution
Solution in C++:
///**********ALLAH IS ALMIGHTY************///
///AH Tonmoy
///Department of CSE,23rd batch
///Islamic University,Bangladesh
- #include<bits/stdc++.h>
 - using namespace std;
 - int main()
 - {
 - int t,a,b;
 - cin>>t;
 - while(t--)
 - {
 - cin>>a>>b;
 - cout<<min(min(a,b),(a+b)/3)<<endl;
 - }
 - }
 

No comments