2017年10月21日普及组 排名
生活随笔
收集整理的這篇文章主要介紹了
2017年10月21日普及组 排名
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
程序:
var n,i,j,x,z,w:longint; a,b,c,d,p,y:array[0..200]of longint; beginassign(input,'sort.in');reset(input);assign(output,'sort.out');rewrite(output);readln(n);for i:=1 to n dobeginreadln(x,y[i],z,d[i]);a[d[i]]:=x;b[d[i]]:=y[i];c[d[i]]:=z;end;for i:=1 to n-1 dofor j:=i+1 to n doif d[i]<d[j] thenbeginw:=d[i];d[i]:=d[j];d[j]:=w;end;for i:=1 to n-1 dofor j:=i+1 to n doif y[i]<y[j] thenbeginw:=y[i];y[i]:=y[j];y[j]:=w;end;p[y[1]]:=1;for i:=2 to n doif y[i]<>y[i-1] then p[y[i]]:=i else p[y[i]]:=p[y[i-1]];for i:=1 to n dowriteln(a[d[i]],' ',b[d[i]],' ',c[d[i]],' ',d[i],' ',i,' ',p[b[d[i]]]);close(input);close(output); end.轉(zhuǎn)載于:https://www.cnblogs.com/YYC-0304/p/9500032.html
總結(jié)
以上是生活随笔為你收集整理的2017年10月21日普及组 排名的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2017年10月18日普及组 文件名排序
- 下一篇: 2017年10月21日普及组 简单单词