結果
| 問題 | No.504 ゲーム大会(ランキング) | 
| コンテスト | |
| ユーザー |  Haijinn | 
| 提出日時 | 2017-04-23 17:29:23 | 
| 言語 | C90 (gcc 12.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 25 ms / 2,000 ms | 
| コード長 | 304 bytes | 
| コンパイル時間 | 694 ms | 
| コンパイル使用メモリ | 20,992 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-22 07:50:18 | 
| 合計ジャッジ時間 | 1,917 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 13 | 
コンパイルメッセージ
main.c: In function ‘main’:
main.c:28:10: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long int’ [-Wformat=]
   28 | printf("%d\n",x);
      |         ~^    ~
      |          |    |
      |          int  long int
      |         %ld
main.c:11:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 | scanf("%d",&n);
      | ^~~~~~~~~~~~~~
main.c:12:1: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   12 | scanf("%ld",&p[0]);
      | ^~~~~~~~~~~~~~~~~~
main.c:14:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |         scanf("%ld",&p[i]);
      |         ^~~~~~~~~~~~~~~~~~
            
            ソースコード
#include<stdio.h>
#include<string.h>
int main(){
	int i;
	int z=0;
	int n;
	long p[100000];
	long x=1;
	int temp;
scanf("%d",&n);
scanf("%ld",&p[0]);
for(i=1;i<n;i++){
	scanf("%ld",&p[i]);
	
	
	
}
for(i=1;i<n;i++){
	printf("%ld\n",x);
		if(p[0]<p[i]){
		
		x++;
	}
	
}
printf("%d\n",x);
	
	return 0;
}
            
            
            
        