⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 saratov133.cpp

📁 My solutions to Saratov Online Judge Problems(SGU), not all, but many of them...
💻 CPP
字号:
/*
Alfonso Alfonso Peterssen
11 - 2 - 2008
Saratov #133 "Border"
*/
#include <cstdio>
#include <algorithm>

using namespace std;

const int MAXN = 20000;

int N, i, max_y, sol;
pair< int, int > ls[MAXN];

int main() {

    scanf( "%d", &N );
    for ( i = 0; i < N; i++ )
        scanf( "%d %d",
            &ls[i].first,
            &ls[i].second );

    sort( ls, ls + N );

    for ( i = 0; i < N;
          max_y >?= ls[i].second, i++ )
        if ( max_y > ls[i].second )
            sol++;

    printf( "%d\n", sol );

    return 0;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -