#include<bits/stdc++.h>
using namespace std;

int n,a,b;

int main()
{
	cin >> n >> a >> b;
	for(int i = 1; i <= n; i++)
	{
		printf("(%d,%d)",a,i);
	}
	cout << endl;
	
	for(int i = 1; i <= n; i++)
	{
		printf("(%d,%d)",i,b);
	}
	cout << endl;
	
	int my_a = a;
	int my_b = b;
	while(my_a > 1 && my_b > 1)
	{
		my_a--;
		my_b--;
	}
	for(int i = 1; i <= n; i++)
	{
		printf("(%d,%d)",my_a,my_b);
		my_a++;
		my_b++;
		if(my_a > n || my_b > n)
		{
			break;
		}
	}
	cout << endl;
	
	my_a = a;
	my_b = b;
	while(my_a < n && my_b > 1)
	{
		my_a++;
		my_b--;
	}
	for(int i = 1; i <= n; i++)
	{
		printf("(%d,%d)",my_a,my_b);
		my_a--;
		my_b++;
		if(my_a < 1 || my_b > n)
		{
			break;
		}
	}
}

1 comments

  • @ 2023-10-31 20:56:27

    存代码请移步首页右侧边栏 - 云剪贴板

    • 1