結果
| 問題 |
No.365 ジェンガソート
|
| コンテスト | |
| ユーザー |
nahcnuj
|
| 提出日時 | 2016-04-30 00:29:33 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 31 ms / 2,000 ms |
| コード長 | 275 bytes |
| コンパイル時間 | 955 ms |
| コンパイル使用メモリ | 59,352 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-12 01:50:02 |
| 合計ジャッジ時間 | 2,412 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 |
ソースコード
#include <iostream>
#include <vector>
using namespace std;
int main()
{
int N;
vector<int> a;
cin >> N;
for (int i = 0, x; i < N; ++i) {
cin >> x;
a.push_back(x);
}
for (int i = N-1; i >= 0; --i) {
if (a[i] == N) --N;
}
cout << N << endl;
return 0;
}
nahcnuj