悬1关
  • 板块灌水区
  • 楼主dulinfan2023
  • 当前回复6
  • 已保存回复6
  • 发布时间2024/8/13 10:08
  • 上次更新2024/8/13 11:57:04
查看原帖
悬1关
935574
dulinfan2023楼主2024/8/13 10:08

为什么CE?

#include<bits/stdc++.h>
using namespace std;
#define int long long
const int dx[]={1,2,3,4,6,12};
const int dy[]={12,6,4,3,2,1};
char c[13];
string s[7];
signed main(){
	int T;
	cin>>T;
	while(T--){
		for(int i=1;i<=12;i++){
			cin>>c[i];
		}
		int cnt=0,count=0;
		for(int i=0;i<6;i++){
			bool aa=true;
			for(int j=1;j<=dx[i];j++){
				bool hok=false;
				for(int k=1;k<=dy[i];k++){
					if(c[++cnt]=='X')hok=true;
				}
				if(!hok)aa=false;
			}
			if(aa)s[++count]=to_string(dx[i])+'x'+to_string(dy[i]);
		}
		cout<<count<<" ";
		for(int i=1;i<=count;i++)cout<<s[i]<<" ";
		cout<<'\n';
	} 
}
2024/8/13 10:08
加载中...