Acd, acd cracked version

Source: Internet
Author: User

Acd, acd cracked version

A person has two attributes: S, B (1 ≤ Si, Bi ≤ 10 ^ 9 ), when the two attributes meet the requirements of S1 <S2 & B1 <B2 or S1> S2 & B1> B2, the two do not hate each other. This section describes the attributes of N people (2 ≤ N ≤ 100 000) and calculates the maximum number of people, so no one of them will hate each other.

Question link: http://acdream.info/problem? Pid = 1, 1216

--> It is easy to think of a two-dimensional LIS model ..

Two-Dimensional Reduction of one dimension, control one-dimensional increments, find the LIS for the other one .. (In sorting, the first dimension is from small to large, and the second dimension is from large to small, after sorting, the result of finding LIS on the second dimension will certainly not show that the first dimension corresponding to the elements in the first dimension is the same, because the second dimension corresponding to the same first dimension is decreasing, the second-dimension LIS is strictly incrementing ..)

#include <cstdio>#include <algorithm>#include <cstring>using std::sort;using std::lower_bound;const int MAXN = 100000 + 10;const int INF = 0x3f3f3f3f;struct PERSON{    int id;    int S;    int B;    bool operator < (const PERSON& e) const    {        return S < e.S || (S == e.S && B > e.B);    }} person[MAXN];int N;int buf[MAXN];int lis[MAXN], who[MAXN], fa[MAXN], cnt;int LIS(){    int ret = 1;    memset(lis, 0x3f, sizeof(lis));    memset(fa, -1, sizeof(fa));    who[0] = -1;    for (int i = 1; i <= N; ++i)    {        int id = lower_bound(lis + 1, lis + 1 + N, buf[i]) - lis;        lis[id] = buf[i];        who[id] = i;        fa[i] = who[id - 1];        if (id > ret)        {            ret = id;        }    }    return ret;}void Read(){    for (int i = 1; i <= N; ++i)    {        scanf("%d%d", &person[i].S, &person[i].B);        person[i].id = i;    }}void Init(){    sort(person + 1, person + 1 + N);    for (int i = 1; i <= N; ++i)    {        buf[i] = person[i].B;    }}void Output(int x){    if (fa[x] == -1)    {        printf("%d", person[x].id);        return;    }    Output(fa[x]);    printf(" %d", person[x].id);}void Solve(){    cnt = LIS();    printf("%d\n", cnt);    Output(who[cnt]);    puts("");}int main(){    while (scanf("%d", &N) == 1)    {        Read();        Init();        Solve();    }    return 0;}



What software is ACDSee?

Software name: ACDsee 7 Simplified Chinese edition
Size: 24 M
Software introduction:
ACDSee is currently the most popular digital image processing software. It can be widely used in image acquisition, management, browsing, optimization, and even sharing with others! With ACDSee, You can efficiently retrieve images from digital cameras and scanners and conveniently search, organize, and preview images. More than 50 common multimedia formats are exhausted by the internet! As the most important image-watching software, it can quickly and high-quality display of your images, coupled with a built-in audio player, we can enjoy the highlights of its slides. Acdsee can also process frequently used video files such as Mpeg. In addition, ACDSee is your most handy image editing tool that allows you to easily process digital images and provides features such as redeye removal, image cutting, sharpening, relief effects, exposure adjustment, rotation, and image editing, batch Processing is also available!
Download oak tree: www1.xiangshu.com/download/software/33.ra

What software is ACDSee?

Software name: ACDsee 7 Simplified Chinese edition
Size: 24 M
Software introduction:
ACDSee is currently the most popular digital image processing software. It can be widely used in image acquisition, management, browsing, optimization, and even sharing with others! With ACDSee, You can efficiently retrieve images from digital cameras and scanners and conveniently search, organize, and preview images. More than 50 common multimedia formats are exhausted by the internet! As the most important image-watching software, it can quickly and high-quality display of your images, coupled with a built-in audio player, we can enjoy the highlights of its slides. Acdsee can also process frequently used video files such as Mpeg. In addition, ACDSee is your most handy image editing tool that allows you to easily process digital images and provides features such as redeye removal, image cutting, sharpening, relief effects, exposure adjustment, rotation, and image editing, batch Processing is also available!
Download oak tree: www1.xiangshu.com/download/software/33.ra

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.