hdu5319 模拟水题
来源:互联网 发布:模具设计软件 编辑:程序博客网 时间:2024/06/06 04:25
#include <iostream>#include<stdio.h>#include<string.h>#include<vector>#include<algorithm>#include<cmath>#include<map>#include<queue>using namespace std;const int N=105;const int MAXN=(1<<31)-1;int INF=0x7f7f7f7f;int T,n,m,k,tot;const int MOD=1e9+7;int cas=1;char s[55][55];int main(){#ifndef ONLINE_JUDGE freopen("aaa","r",stdin);#endif int T; scanf("%d",&T); while(T--){ scanf("%d",&n); for(int i=1;i<=n;i++) scanf("%s",s[i]+1); m=strlen(s[1]+1); int cnt=0; for(int i=1;i<=n;i++) for(int j=1;j<=m;j++){ if(s[i][j]=='R' || s[i][j]=='G'){ if( !(s[i-1][j-1]=='R' || s[i-1][j-1]=='G') ) cnt++; } if(s[i][j]=='B' || s[i][j]=='G'){ if( !(s[i-1][j+1]=='B' || s[i-1][j+1]=='G') ) cnt++; } } printf("%d\n",cnt); } return 0;}
0 0
- hdu5319 模拟水题
- hdu5319 Painter(模拟题)
- hdu5319(模拟)
- hdu5319 Painter(模拟)
- hdu5319 Painter(模拟)
- hdu5319 简单模拟
- HDU5319
- 2015 多校联赛 ——HDU5319(模拟)
- hdu5319&hdu多校集训第四题
- HDU5319.Painter
- hdu5319 Painter
- hdu5319 Painter
- HDU5319 Painter
- HDU5319 Painter(深搜DFS)
- HDU5319暴力扫加标记
- 解题报告 之 HDU5319 Painter
- hdu5319(求素数+威尔逊定理)
- 模拟水题。。。
- java基础之抽象方法
- 流程图的重要性
- 线索二叉树的遍历应用
- Color the fence
- OC中的Block,多态
- hdu5319 模拟水题
- 【项目经验】文本验证
- 开入与开出
- Linked List Cycle II
- asoc dapm相关
- hdu 3047 简单的带权并查集
- UVA - 1343 The Rotation Game
- 暑假的第一次测试(三)
- 概率论与数理统计--假设检验