390A. Inna and Alarm Clock
来源:互联网 发布:淘宝店铺导航条制作 编辑:程序博客网 时间:2024/05/22 01:36
一道水题。。结果自己没注意范围。。。WA一次。。RE2次。。CE1次- - 这尼玛。。。然后就果断GG了
在闹钟响的时候 可以将一条直线上的闹钟全关。线可以是横的或竖的,但是只能用一种模式。
所以记录在同一行 和同一列的情况各有多少。
#include <cstdio>#include <cstring>#include <iostream>using namespace std;int const M = 10010;int main(){ int n; scanf("%d",&n); int hashx[M],hashy[M]; memset(hashy,0,sizeof(hashx)); memset(hashx,0,sizeof(hashy)); for(int i = 0;i < n;i++){ int x,y; scanf("%d%d",&x,&y); hashx[x] = 1; hashy[y] = 1; } int xx = 0,yy = 0; for(int i = 0;i < 101;i++){ if(hashx[i]) xx++; if(hashy[i]) yy++; } printf("%d\n",xx>yy?yy:xx); return 0;};
0 0
- 390A. Inna and Alarm Clock
- CF 390A:Inna and Alarm Clock
- codeforces 390A Inna and Alarm Clock
- A. Inna and Alarm Clock
- Codeforces 390A Inna and Alarm Clock(水题)
- Inna and Alarm Clock
- codeforces Inna and Alarm Clock
- Codeforces Round #229 (Div. 2)A. Inna and Alarm Clock
- Codeforces Round #229 (Div. 2) A. Inna and Alarm Clock
- Codeforces Round #229 (Div. 2) A. Inna and Alarm Clock
- Codeforces Round #229 (Div. 2) Inna and Alarm Clock
- Gym 100531A Alarm Clock 【水题】【暴力】
- A. Inna and Choose Options
- A. Inna and Choose Options
- A - Inna and Choose Options
- CodeForces 374 A. Inna and Pink Pony
- CodeForces 374A Inna and Pink Pony
- (CF)A. Inna and Choose Options
- DELPHI盒子FTP登录地址及用户密码
- Crafting an Effective Writer:: Unit2 :: Journal 1
- C语言复习I
- 论文阅读方式(paper reading)
- Android抽象布局——include、merge 、ViewStub
- 390A. Inna and Alarm Clock
- working
- Java发送HTTP的POST请求
- PopupWindow位置
- C语言调用C++函数
- 《淘宝技术这十年》读书笔记 (含思维导图)
- 一切成功源于积累——20140212 曾经不止一次地告诫自己 打死也不能做
- Winform下创建组件失败,未能加载文件或程序集,提示filenotfound
- java多线程(1):基础