結果
| 問題 |
No.742 にゃんにゃんにゃん 猫の挨拶
|
| コンテスト | |
| ユーザー |
rhincodon66
|
| 提出日時 | 2018-10-05 23:25:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 1,699 ms / 2,500 ms |
| コード長 | 240 bytes |
| コンパイル時間 | 1,572 ms |
| コンパイル使用メモリ | 166,016 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 13:59:19 |
| 合計ジャッジ時間 | 4,201 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;cin >> n;
int a[n+1];
for(int i=0;i<n;++i) cin >> a[i];
int ans=0;
for(int i=0;i<n;++i){
for(int j=i+1;j<n;++j){
if(a[i]>=a[j]) ans++;
}
}
cout << ans << endl;
}
rhincodon66