求教dalao为啥这只通过了98的样例

#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<algorithm>
using namespace std;
#define maxn 25

int main()
{     char ch[maxn][maxn];     int n, m,all,length,res,cnt=0;     scanf("%d%d", &n, &m);     all = n * m;     length = n + m;     for (int i = 0; i < n; i++)     {         getchar();         for (int j = 0; j < m; j++)         {             scanf("%c", &ch[i][j]);             if (ch[i][j] == '#')             {                 cnt++;             }         }     }     res = all - length - cnt;     //cout << all << length << cnt << res;     if (res % 2 == 1)     {         cout << "niumei" << endl;     }     else     {         cout << "niuniu" << endl;     }     return 0;
}


全部评论

相关推荐

凉风落木楚山秋:哈工爷200也去吗
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务