coderforce 551A - GukiZ and Contest
来源:互联网 发布:wince5.0 盘点软件 编辑:程序博客网 时间:2024/06/05 05:53
题意:按照得分高低
排名
#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;const int maxm=1e4+10;int a[maxm];int b[maxm];int c[maxm];int main(){ int n; while(scanf("%d",&n)!=EOF) { for(int i=0;i<n;i++) { scanf("%d",&a[i]); b[i]=a[i]; } sort(a,a+n); int m=unique(a,a+n)-a; int sum=1; int x=0; for(int i=m-1;i>=0;i--) { int cnt=0; for(int j=0;j<n;j++) { if(a[i]==b[j]) { c[a[i]]=sum; cnt++; } } sum+=cnt; } for(int i=0;i<n;i++) { if(i==0) { printf("%d",c[b[i]]); } else { printf(" %d",c[b[i]]); } } printf("\n"); } return 0;}
排名
0 0
- coderforce 551A - GukiZ and Contest
- A. GukiZ and Contest
- CodeForces-551A GukiZ and Contest
- 【74.89%】【codeforces 551A】GukiZ and Contest
- codeforces 551A GukiZ and Contest
- CodeForces 551A GukiZ and Contest(模拟)
- Codeforces551A:GukiZ and Contest
- GukiZ and Contest
- GukiZ and Contest
- 【CoderForce A】Contest
- [水题]Codeforces Round #307 (Div. 2) A.GukiZ and Contest
- Codeforces Round #307 (Div. 2) A. GukiZ and Contest
- contest: Codeforces Round #307 (Div. 2), problem: (A) GukiZ and Contest
- Codeforces Round #307 (Div. 2) A. GukiZ and Contest (暴力)
- A. GukiZ and Contest-Codeforces Round #307 (Div. 2)-简单水题
- coderforce A.Ilya and Diplomas
- coderforce 296A Yaroslav and Permutations
- coderforce 580A Kefa and First Steps
- xsl解读xml之谜
- nodejs加密模块crypto
- Candies(差数约分系统-最短路)
- Scipy教程 - 统计函数库scipy.stats
- JDK内置工具使用介绍推荐
- coderforce 551A - GukiZ and Contest
- gurobi安装
- Redis简介和简单应用
- 乐动力 步数上传 核心分析
- 1062. Talent and Virtue
- cocos2dx java调用c++
- CF 466C Number of Ways
- 拼装当前网页的相对路径
- 构建乘积数组(利用辅助空间+剑指offer)