## Yedl的专栏

Stay hungry, stay foolish

# Codeforces Round #229 (Div. 2) A. Inna and Alarm Clock

#include<cstdio>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
const int N = 1e5+10;
struct node
{
int x, y;
}p[N];

int n;

bool cmp1(node b, node c)
{
if(b.x != c.x) return b.x < c.x;
}

bool cmp2(node b, node c)
{
if(b.y != c.y) return b.y < c.y;
}

int main()
{
scanf("%d", &n);
for(int i = 0; i < n; i++)
{
scanf("%d%d", &p[i].x, &p[i].y);
}
int ans1 = 1, ans2 = 1;
sort(p, p+n, cmp1);
for(int i = 1; i < n; i++)
{
if(p[i].x == p[i-1].x)continue;
else ans1++;
}
sort(p, p+n, cmp2);
for(int i = 1; i < n; i++)
{
if(p[i].y == p[i-1].y) continue;
else ans2++;
}
int ans = min(ans1, ans2);
printf("%d\n", ans);
return 0;
}

#### Codeforces Round #495 (Div. 2)：D. Sonya and Matrix（暴力）

2018-07-06 13:48:23

#### Codeforces Round #471 div.2 ABC题解

2018-03-24 14:16:58

#### CF-Educational Codeforces Round 44 (Rated for Div. 2)-A-Chess Placing

2018-05-22 04:28:33

#### Educational Codeforces Round 46 (Rated for Div. 2) A Codehorses T-shirts

2018-06-28 08:41:58

#### Codeforces Round #444 (Div. 2)-贪心&尺取-Ratings and Reality Shows

2017-11-11 20:11:11

#### Educational Codeforces Round 36 (Rated for Div. 2) 题解

2018-01-13 23:16:24

#### Educational Codeforces Round 42 (Rated for Div. 2) A. Equator

2018-04-12 14:59:26

#### Codeforces Round #479 (Div. 3) F - Consecutive Subsequence（思维）

2018-05-07 11:08:38

#### Codeforces Round #229 (Div. 2)A. Inna and Alarm Clock

2014-02-12 12:00:15

#### Codeforces Round #229 (Div. 2) A. Inna and Alarm Clock

2014-02-12 13:21:55