PAT [A] 1054
来源:互联网 发布:时时彩程序源码 编辑:程序博客网 时间:2024/05/22 04:33
http://pat.zju.edu.cn/contests/pat-a-practise/1054
#include <stdio.h>int main (){ int m,n; scanf("%d%d",&m,&n); int newcolor; int i,j; int count=0; int color=-1; for(i=0;i<m;i++) for(j=0;j<n;j++) { scanf("%d",&newcolor); if(newcolor==color) count++; else{ if(count!=0) count--; else color=newcolor; } } printf("%d",color); return 0; }
0 0
- PAT [A] 1054
- PAT A A+B Format
- pat: 1016 A+B
- Pat(A) 1002
- PAT(A) 1005
- PAT(A) 1006
- PAT(A) 1007
- PAT(A) 1008
- PAT(A) 1009
- PAT(A) 1011
- PAT(A) 1012
- PAT(A) 1015
- PAT(A) 1031
- PAT(A) 1035
- PAT(A) 1013
- PAT(A) 1019
- PAT(A) 1004
- PAT(A) 1058
- DOM和SAX的XML解析
- HTTP 错误 500.19 无法访问请求的页面,因为该页的相关配置数据无效
- iostat命令
- lua sort
- 使用X-UA-Compatible来设置IE浏览器兼容模式
- PAT [A] 1054
- 杭电OJ 1087:Super Jumping! Jumping! Jumping!
- 如何在cocos2d c++代码中调用lua以及探究
- JavaBeans、EJB和POJO详解
- 在 http://aesplugins.adobe.com/aes/tooling/plugin/10.0 找不到资源库。
- Convert Sorted Array to Binary Search Tree - LeetCode
- 环境
- android Recycled bitmap error
- css如何去掉a标签带来的虚框