結果
問題 | No.504 ゲーム大会(ランキング) |
ユーザー | kurarrr |
提出日時 | 2017-04-21 22:31:02 |
言語 | C++11 (gcc 11.4.0) |
結果 |
AC
|
実行時間 | 171 ms / 2,000 ms |
コード長 | 724 bytes |
コンパイル時間 | 545 ms |
コンパイル使用メモリ | 80,648 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-27 11:19:31 |
合計ジャッジ時間 | 3,097 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,380 KB |
testcase_03 | AC | 2 ms
4,376 KB |
testcase_04 | AC | 2 ms
4,376 KB |
testcase_05 | AC | 2 ms
4,376 KB |
testcase_06 | AC | 1 ms
4,376 KB |
testcase_07 | AC | 170 ms
4,380 KB |
testcase_08 | AC | 171 ms
4,376 KB |
testcase_09 | AC | 171 ms
4,376 KB |
testcase_10 | AC | 170 ms
4,376 KB |
testcase_11 | AC | 171 ms
4,376 KB |
testcase_12 | AC | 159 ms
4,380 KB |
testcase_13 | AC | 158 ms
4,376 KB |
testcase_14 | AC | 169 ms
4,376 KB |
ソースコード
#include<stdio.h> #include<iostream> #include<string> #include<vector> #include<map> #include<list> #include<queue> #include<deque> #include<algorithm> #include<utility> #include<memory> #include<cmath> #define ALL(g) (g).begin(),(g).end() #define REP(i, x, n) for(int i = x; i < n; i++) #define rep(i,n) REP(i,0,n) #define EXIST(s,e) ((s).find(e)!=(s).end()) #define pb push_back using namespace std; typedef long long ll; typedef pair<int,int> P; const int mod=1e9+7; const int INF=1<<30; const int MAX_N=100001; int main(){ int N,rank=1; cin >> N ; ll a,b; cin >> a ; cout << rank << endl; rep(i,N-1){ cin >> b ; if(a>=b) cout << rank << endl; else cout << ++rank << endl; } return 0; }