結果
| 問題 |
No.742 にゃんにゃんにゃん 猫の挨拶
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-10-06 07:27:57 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 307 bytes |
| コンパイル時間 | 1,463 ms |
| コンパイル使用メモリ | 164,448 KB |
| 実行使用メモリ | 11,424 KB |
| 最終ジャッジ日時 | 2024-10-12 14:02:22 |
| 合計ジャッジ時間 | 5,504 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 TLE * 1 -- * 4 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> ms(n,0);
for(int i=0; i<n; ++i) cin >> ms[i];
int count = 0;
set<int> s;
for(auto m : ms){
count += distance(s.lower_bound(m), s.end());
s.insert(m);
}
cout << count << endl;
return 0;
}