• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            posts - 16,comments - 0,trackbacks - 0
            ?1?#?include?<cstdio>
            ?2?#?include?<cstring>
            ?3?#?include?<algorithm>
            ?4?using?namespace?std;
            ?5?
            ?6?#?define?B?100005
            ?7?#?define?N?100005
            ?8?
            ?9?struct?Intv?{int?s,?e;};
            10?
            11?Intv?c[N];
            12?int?n,?a[B],?r[N],?le[N];
            13?
            14?bool?cmp(const?int?x,?const?int?y)
            15?{
            16?????????????????if?(c[x].s?==?c[y].s)?return?c[x].e?>?c[y].e;
            17?????????????????return?c[x].s?<?c[y].s;
            18?}
            19?/**************************************************/
            20?int?getsum(int?x)
            21?{
            22?????????????????int?ret?=?0;
            23?????????????????while?(x?>?0)?ret?+=?a[x],?x?-=?x&(-x);
            24?????????????????return?ret;
            25?}
            26?void?inc(int?x)
            27?{
            28?????????????????while?(x?<=?B)?++a[x],?x?+=?x&(-x);
            29?}
            30?/**************************************************/
            31?int?main()
            32?{
            33?????????????????int?i,?n,?x;
            34?
            35?????????????????while?(scanf("%d",?&n),?n)
            36?????????????????{
            37?????????????????????????????????memset(a,?0,?sizeof(a));
            38?????????????????????????????????for?(i?=?0;?i?<?n;?++i)
            39?????????????????????????????????????????????????r[i]?=?i,?scanf("%d%d",?&c[i].s,?&c[i].e);
            40?????????????????????????????????sort(r,?r+n,?cmp);
            41?????????????????????????????????for?(i?=?0;?i?<?n;?++i)
            42?????????????????????????????????{
            43?????????????????????????????????????????????????x?=?c[r[i]].e?+?1,?inc(x);
            44?????????????????????????????????????????????????if?(i?&&?c[r[i]].e==c[r[i-1]].e?&&?c[r[i]].s==c[r[i-1]].s)
            45?????????????????????????????????????????????????????????????????le[r[i]]?=?le[r[i-1]];
            46?????????????????????????????????????????????????else
            47?????????????????????????????????????????????????????????????????le[r[i]]?=?i-getsum(x-1);
            48?????????????????????????????????}
            49?????????????????????????????????for?(i?=?0;?i?<?n;?++i)
            50?????????????????????????????????{
            51?????????????????????????????????????????????????if?(i)?putchar('?');
            52?????????????????????????????????????????????????printf("%d",?le[i]);
            53?????????????????????????????????}
            54?????????????????????????????????putchar('\n');
            55?????????????????}
            56?
            57?????????????????return?0;
            58?}
            59?
            posted on 2012-09-02 11:51 yajunw 閱讀(130) 評論(0)  編輯 收藏 引用
            久久免费高清视频| 久久婷婷国产综合精品| 99久久精品费精品国产 | 国产成年无码久久久久毛片| 久久AV无码精品人妻糸列| 无码精品久久久天天影视| 久久精品国产亚洲麻豆| 人妻精品久久久久中文字幕| 久久久久久亚洲Av无码精品专口 | 久久精品国产清自在天天线| 亚洲欧美日韩久久精品| 久久亚洲精品无码AV红樱桃| 久久久久九九精品影院| 欧美熟妇另类久久久久久不卡| 国产精品九九久久精品女同亚洲欧美日韩综合区 | 精品久久久久久国产| 久久久久综合网久久| 亚洲人成精品久久久久| 久久精品无码免费不卡| 粉嫩小泬无遮挡久久久久久| 久久婷婷色综合一区二区| 久久久精品一区二区三区| 亚洲国产精品久久久天堂| 久久精品?ⅴ无码中文字幕| 99久久久精品免费观看国产| 漂亮人妻被中出中文字幕久久 | 偷窥少妇久久久久久久久| 久久最新精品国产| 99久久er这里只有精品18| 亚洲精品tv久久久久久久久| 亚洲国产精品嫩草影院久久| 国产精品99久久久久久猫咪| 99国产欧美久久久精品蜜芽| 99久久无码一区人妻a黑| 亚洲午夜久久久影院伊人| 久久精品国产亚洲αv忘忧草| 久久综合九色综合久99| 99久久国产热无码精品免费久久久久| 99999久久久久久亚洲| 九九久久99综合一区二区| 97精品国产97久久久久久免费|