Submission #991638

# Submission time Handle Problem Language Result Execution time Memory
991638 2024-06-02T17:26:05 Z Abito Gardening (RMI21_gardening) C++17
5 / 100
4 ms 688 KB
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define ppb pop_back
#define ep insert
#define endl '\n'
#define elif else if
#define pow pwr
#define sqrt sqrtt
#define int long long
#define y1 YONE
typedef unsigned long long ull;
using namespace std;
int32_t main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    int t;cin>>t;
    while (t--){
        int n,m,k;
        cin>>n>>m>>k;
        if ((n&1)||(m&1)){
            cout<<"NO"<<endl;
            continue;
        }
        if (n==2 && m==2){
            if (k==1){
                cout<<"YES\n1 1\n1 1"<<endl;
                continue;
            }
            cout<<"NO"<<endl;
            continue;
        }
        if (n==2 && m==4){
            if (k==2) cout<<"YES\n1 1 2 2\n1 1 2 2\n";
            else cout<<"NO\n";
            continue;
        }
        if (n==4 && m==2){
            if (k==2) cout<<"YES\n1 1\n1 1\n2 2\n2 2\n";
            else cout<<"NO\n";
            continue;
        }
        if (k!=2 && k!=4) cout<<"NO"<<endl;
        elif (k==2){
            cout<<"YES\n1 1 1 1\n1 2 2 1\n1 2 2 1\n1 1 1 1\n";
        }
        elif (k==4){
            cout<<"YES\n1 1 2 2\n1 1 2 2\n3 3 4 4\n3 3 4 4\n";
        }
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 688 KB Correct! Azusa and Laika like the garden :)
# Verdict Execution time Memory Grader output
1 Correct 4 ms 688 KB Correct! Azusa and Laika like the garden :)
2 Failed 1 ms 348 KB Incorrect output
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 688 KB Correct! Azusa and Laika like the garden :)
2 Failed 1 ms 348 KB Incorrect output
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Failed 1 ms 344 KB Incorrect output
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Failed 0 ms 348 KB Incorrect output
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 4 ms 688 KB Correct! Azusa and Laika like the garden :)
2 Failed 1 ms 348 KB Incorrect output
3 Halted 0 ms 0 KB -