結果
| 問題 |
No.742 にゃんにゃんにゃん 猫の挨拶
|
| コンテスト | |
| ユーザー |
poyompy
|
| 提出日時 | 2018-10-05 22:05:24 |
| 言語 | C (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 370 ms / 2,500 ms |
| コード長 | 292 bytes |
| コンパイル時間 | 169 ms |
| コンパイル使用メモリ | 29,184 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 13:56:45 |
| 合計ジャッジ時間 | 1,533 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
#include <stdio.h>
int n, a[30000];
int main(void) {
scanf("%d", &n);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
}
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
ans += a[i] > a[j];
}
}
printf("%d\n", ans);
return 0;
}
poyompy