本文共 2481 字,大约阅读时间需要 8 分钟。
依旧想去德育基地…
R a n k Rank Rank | P e r s o n Person Person | S c o r e Score Score | A A A | B B B | C C C |
---|---|---|---|---|---|
1 1 1 | 2017 x x y 2017xxy 2017xxy | 210 210 210 | 40 40 40 | 100 100 100 | 70 70 70 |
2 2 2 | 2017 m y s e l f 2017myself 2017myself | 190 190 190 | 20 20 20 | 100 100 100 | 70 70 70 |
3 3 3 | 2017 l x f 2017lxf 2017lxf | 180 180 180 | 0 0 0 | 90 90 90 | 90 90 90 |
4 4 4 | 2017 z y c 2017zyc 2017zyc | 170 170 170 | 0 0 0 | 100 100 100 | 70 70 70 |
5 5 5 | 2017 z y x 2017zyx 2017zyx | 150 150 150 | 40 40 40 | 60 60 60 | 50 50 50 |
6 6 6 | 2017 x j q 2017xjq 2017xjq | 130 130 130 | 0 0 0 | 100 100 100 | 30 30 30 |
7 7 7 | 2017 l r z 2017lrz 2017lrz | 100 100 100 | 10 10 10 | 90 90 90 | 0 0 0 |
7 7 7 | 2013 l y k 2013lyk 2013lyk | 100 100 100 | 0 0 0 | 100 100 100 | 0 0 0 |
9 9 9 | 2015 z y f 2015zyf 2015zyf | 90 90 90 | 20 20 20 | 0 0 0 | 70 70 70 |
10 10 10 | 2013 l x h 2013lxh 2013lxh | 90 90 90 | 0 0 0 | 90 90 90 | 0 0 0 |
博客链接:
博客链接:
博客链接:
#include#include #include #define N 4000#define XJQ 19260817using namespace std;struct node{ int to,next;}a[N];int ls[N],w[N],maxs,mins,ans,n,k,tot,x,y,in[N];void addl(int x,int y){ a[++tot].to=y; a[tot].next=ls[x]; ls[x]=tot;}void dp1(){ for(int i=1;i<=n;i++) { maxs=0; mins=2147483647; for(int j=i;j<=n;j++) { maxs=max(maxs,w[j]); mins=min(mins,w[j]); if(maxs-mins==k) ans++; } } printf("%d",ans);}int main(){ scanf("%d%d",&n,&k); for(int i=1;i<=n;i++) scanf("%d",&w[i]); for(int i=1;i
#include#include #define N 100010using namespace std;struct node{ int to,w,next,from;}a[N];int ls[N],tot,x,y,w,ans,dep[N],n,m,S,dfn[N],end[N],cnt;void addl(int x,int y,int w){ a[++tot].to=y;a[tot].w=w; a[tot].next=ls[x];ls[x]=tot; a[tot].from=x;}void dfs(int x,int fa){ dfn[x]=++cnt; dep[x]=dep[fa]+1; for(int i=ls[x];i;i=a[i].next) if(i dep[a[x].to]) x++; return x;}int main(){ scanf("%d%d",&n,&m); for(int i=1;i=dfn[x]&&dfn[a[j].to]<=end[x]&& (dfn[a[j].from] end[x]) || dfn[a[j].from]>=dfn[x]&&dfn[a[j].from]<=end[x]&& (dfn[a[j].to] end[x])) ans=min(ans,a[j].w); if(ans==2147483647) printf("-1\n"); else printf("%d\n",ans); }}
话说题目又ABC。老师改题面了
转载地址:http://txzaf.baihongyu.com/