結果

問題 No.2092 Conjugation
ユーザー kyushu1996
提出日時 2022-10-07 21:57:12
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 457 bytes
コンパイル時間 729 ms
コンパイル使用メモリ 77,668 KB
最終ジャッジ日時 2025-02-07 23:21:02
ジャッジサーバーID
(参考情報)
judge2 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 14 TLE * 4
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:16:41: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   16 |     int A[n]; for(int i=0;i<n;i++) scanf("%d",&A[i]);
      |                                    ~~~~~^~~~~~~~~~~~

ソースコード

diff #

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <set>
#define ll long long
using namespace std;

// link : 

int main() {
	
    int n; cin>>n;
    int A[n]; for(int i=0;i<n;i++) scanf("%d",&A[i]);

    for(int i=0;i<A[0];i++){
        int tmp=0;
        for(int j=0;j<n;j++){
            if(A[j]>i) tmp+=1;
            else break;
        }
        cout<<tmp<<' ';
    }

	return 0;
}
0