Submission #991623

# Submission time Handle Problem Language Result Execution time Memory
991623 2024-06-02T17:11:26 Z De3b0o Gardening (RMI21_gardening) C++14
0 / 100
10 ms 860 KB
#include <bits/stdc++.h>
#define ll long long
#define no cout << "NO\n"
#define yes cout << "YES\n"
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);

using namespace std;

//ll check(ll n , ll m , ll k)
//{
//	if()
//}

int main()
{
	d3
	ll t;
	cin >> t;
	while(t--)
	{
		ll n , m , k;
		cin >> n >> m >> k;
		if(n==2)
		{
			if(k==m/2)
			{
				yes;
				for(int i = 0 ; n>i ; i++)
				{
					for(int j = 0 ; m>j ; j++)
					{
						cout << j/2 +1 << " ";
					}
					cout << "\n";
				}
			}
			else
				no;
		}
		else if(n==4)
		{
			if(k-1==m/2-1)
			{
				yes;
				for(int i = 0 ; n>i ; i++)
				{
					for(int j = 0 ; m>j ; j++)
					{
						if(i==0||j==0||i==n-1||j==m-1)
							cout << 1 << " ";
						else
							cout << (j-1)/2 +2 << " ";
					}
					cout << "\n";
				}
			}
			else if(k==m)
			{
				yes;
				for(int i = 0 ; 2>i ; i++)
				{
					for(int j = 0 ; m>j ; j++)
					{
						cout << j/2 +1 << " ";
					}
					cout << "\n";
				}
				for(int i = 0 ; 2>i ; i++)
				{
					for(int j = 0 ; m>j ; j++)
					{
						cout << j/2 +1 +m/2 << " ";
					}
					cout << "\n";
				}
			}
			else
				no;
		}
		else if(n==6)
		{
			
		}
		else
			no;
	}
}
# Verdict Execution time Memory Grader output
1 Failed 10 ms 860 KB Incorrect output
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Failed 10 ms 860 KB Incorrect output
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Failed 10 ms 860 KB Incorrect output
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Failed 1 ms 348 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 Failed 10 ms 860 KB Incorrect output
2 Halted 0 ms 0 KB -