#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;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
95 ms |
592 KB |
Correct! Azusa and Laika like the garden :) |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
95 ms |
592 KB |
Correct! Azusa and Laika like the garden :) |
2 |
Failed |
8 ms |
344 KB |
Incorrect output |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
95 ms |
592 KB |
Correct! Azusa and Laika like the garden :) |
2 |
Failed |
8 ms |
344 KB |
Incorrect output |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
1 ms |
348 KB |
Incorrect output |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Failed |
1 ms |
348 KB |
Incorrect output |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
95 ms |
592 KB |
Correct! Azusa and Laika like the garden :) |
2 |
Failed |
8 ms |
344 KB |
Incorrect output |
3 |
Halted |
0 ms |
0 KB |
- |