結果
| 問題 |
No.2092 Conjugation
|
| コンテスト | |
| ユーザー |
pengin_2000
|
| 提出日時 | 2022-10-07 21:27:03 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 20 ms / 2,000 ms |
| コード長 | 399 bytes |
| コンパイル時間 | 288 ms |
| コンパイル使用メモリ | 29,696 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-12 06:02:17 |
| 合計ジャッジ時間 | 1,525 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
#include<stdio.h>
int a[100005];
int cnt[100005];
int main()
{
int n;
scanf("%d", &n);
int i;
for (i = 0; i < n; i++)
scanf("%d", &a[i]);
for (i = 0; i <= a[0] + 1; i++)
cnt[i] = 0;
for (i = 0; i < n; i++)
{
cnt[1]++;
cnt[a[i] + 1]--;
}
for (i = 1; i <= a[0]; i++)
cnt[i] += cnt[i - 1];
for (i = 1; i < a[0]; i++)
printf("%d ", cnt[i]);
printf("%d\n", cnt[a[0]]);
return 0;
}
pengin_2000