Changed the folder structure of codeforces problemsets
This commit is contained in:
37
codeforces/problemsets/puzzlePieces/puzzlePieces.cpp
Normal file
37
codeforces/problemsets/puzzlePieces/puzzlePieces.cpp
Normal file
@@ -0,0 +1,37 @@
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cmath>
|
||||
|
||||
using namespace std;
|
||||
|
||||
void test_case(int tc){
|
||||
int n, m;
|
||||
cin >> n >> m;
|
||||
|
||||
if(n < 2 || m < 2){
|
||||
cout << "YES\n";
|
||||
} else if(n == 2 && m == 2){
|
||||
cout << "YES\n";
|
||||
} else{
|
||||
cout << "NO\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(){
|
||||
ios::sync_with_stdio(0);
|
||||
cin.tie(0);
|
||||
|
||||
int t;
|
||||
cin >> t;
|
||||
|
||||
for(int tc = 1; tc <= t; ++tc){
|
||||
test_case(tc);
|
||||
}
|
||||
|
||||
cout << flush;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user