⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 4616350_ac_79ms_240k.cpp

📁 部分PKU上的源码
💻 CPP
字号:
#include<iostream>
#include<string>
using namespace std;
//bool f[4][4];
//bool now[4][4];
int jdo[4][4];
int tmin;
bool ok;
void push(int i,int j)
{
	for(int count=0;count<4;count++)
	{
		jdo[i][count]++;
		jdo[count][j]++;
	}
	jdo[i][j]--;
}
int main()
{
	string ss;
	while(cin>>ss)
	{
		ok=false;
		tmin=100;
		memset(jdo,0,sizeof(jdo));
		for(int count=0;count<4;count++)
		{
			if(ss[count]=='+') push(0,count);
		}
		int i,j;
		for(i=1;i<4;i++)
		{
			cin>>ss;
			for(j=0;j<4;j++)
			{
				if(ss[j]=='+') push(i,j);
			}
		}
		tmin=0;
		for(i=0;i<4;i++)
		{
			for(j=0;j<4;j++)
			{
				if(jdo[i][j]%2==1) tmin++;
			}
		}
		cout<<tmin<<endl;
		for(i=0;i<4;i++)
		{
			for(j=0;j<4;j++)
			{
				if(jdo[i][j]%2==1) cout<<i+1<<" "<<j+1<<endl;
			}
		}
	}
	return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -