This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int main(){
cin.tie(0);ios::sync_with_stdio(0);
//1.
int n, m, t, k;
//2.
cin >> t;
//3.
for(int ii = 0; ii < t; ii++){
cin >> n >> m >> k;
if(n == 2 && m == 2 && k == 1){
cout << "YES" << endl;
cout << "1 1" << endl;
cout << "1 1" << endl;
continue;
}
if(n == 2 && m == 4 && k == 2){
cout << "YES" << endl;
cout << "1 1 2 2" << endl;
cout << "1 1 2 2" << endl;
continue;
}
if(n == 4 && m == 2 && k == 2){
cout << "YES" << endl;
cout << "1 1" << endl;
cout << "1 1" << endl;
cout << "2 2" << endl;
cout << "2 2" << endl;
continue;
}
if(n == 4 && m == 4 && k == 2){
cout << "YES" << endl;
cout << "1 1 1 1" << endl;
cout << "1 2 2 1" << endl;
cout << "1 2 2 1" << endl;
cout << "1 1 1 1" << endl;
continue;
}
if(n == 4 && m == 4 && k == 4){
cout << "YES" << endl;
cout << "1 1 2 2" << endl;
cout << "1 1 2 2" << endl;
cout << "3 3 4 4" << endl;
cout << "3 3 4 4" << endl;
continue;
}
cout << "NO" << endl;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |