Submission #742311

# Submission time Handle Problem Language Result Execution time Memory
742311 2023-05-16T05:35:43 Z beepbeepsheep Gardening (RMI21_gardening) C++17
5 / 100
8 ms 852 KB
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

typedef tree<long long, null_type, less_equal<>,
        rb_tree_tag, tree_order_statistics_node_update>
        ordered_set;
#define ll long long
#define ii pair<ll,ll>

#ifndef DEBUG
#define cerr if (0) cerr
#define endl '\n'
#endif

const ll inf=1e15;
const ll maxn=1e5+5;
const ll mod=1e9+7;

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

void solve(){
	ll n,m,k;
	cin>>n>>m>>k;
	if (n==2 && m==2 && k==1){
		cout<<"YES"<<endl;
		cout<<"1 1"<<endl;
		cout<<"1 1"<<endl;
		return;
	}
	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;
		return;
	}
	if (n==2 && m==4 && k==2){
		cout<<"YES"<<endl;
		cout<<"1 1 2 2"<<endl;
		cout<<"1 1 2 2"<<endl;
		return;
	}
	if (n==4 && m==4){
		if (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;
			return;
		}
		if (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;
			return;
		}
	}
	cout<<"NO"<<endl;
}
int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	ll tc;
	cin>>tc;
	while (tc--) solve();
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 8 ms 852 KB Correct! Azusa and Laika like the garden :)
# Verdict Execution time Memory Grader output
1 Correct 8 ms 852 KB Correct! Azusa and Laika like the garden :)
2 Failed 1 ms 340 KB Incorrect output
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 852 KB Correct! Azusa and Laika like the garden :)
2 Failed 1 ms 340 KB Incorrect output
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Failed 1 ms 324 KB Incorrect output
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Failed 0 ms 212 KB Incorrect output
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 852 KB Correct! Azusa and Laika like the garden :)
2 Failed 1 ms 340 KB Incorrect output
3 Halted 0 ms 0 KB -