結果
| 問題 |
No.365 ジェンガソート
|
| コンテスト | |
| ユーザー |
wonda_t_coffee
|
| 提出日時 | 2020-02-27 22:23:02 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| コード長 | 678 bytes |
| コンパイル時間 | 561 ms |
| コンパイル使用メモリ | 80,388 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-13 16:02:48 |
| 合計ジャッジ時間 | 2,860 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 |
ソースコード
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
using namespace std;
const int MOD = 1000000007; // 10^9 + 7
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N;
cin >> N;
vector<int> a(N);
rep(i, N) cin >> a[i];
int buttom = N;
for (int i = N - 1; i >= 0; i--) {
if (a[i] == buttom) buttom--;
}
cout << buttom << endl;
}
wonda_t_coffee