最长上升子序列
  • 板块灌水区
  • 楼主Hinazuki_Kayo
  • 当前回复11
  • 已保存回复11
  • 发布时间2020/8/6 11:02
  • 上次更新2023/11/6 21:09:56
查看原帖
最长上升子序列
123321
Hinazuki_Kayo楼主2020/8/6 11:02

当年我无聊写了一份奇怪的代码,现在有点没搞懂QAQ,谁来帮忙解释一下:

#include<stdio.h>
#include<ctype.h>
#include<algorithm>
#define __ *(_-1)
#define ___ lower_bound
using std::___;
int r(){
    char c=48;int X=0;
    while(X=(X<<3)+(X<<1)+(c^48),isdigit(c=getchar()));
    return X;
}
int _[100001],n=r();
int main(){
    while(_[(__=r())>*(_+*_)?++*_:___(_+1,_+*_+1,__)-_]=__,--n);
    printf("%d",*_);
}
2020/8/6 11:02
加载中...