結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2017-12-23 01:30:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 208 bytes |
コンパイル時間 | 503 ms |
コンパイル使用メモリ | 64,904 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-17 14:23:21 |
合計ジャッジ時間 | 2,862 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
ソースコード
#include<iostream> using namespace std; int main() { int n, a[100000], i; cin >> n; for (i = 1; i <= n; i++) cin >> a[i]; int x = n; for (i = n; i > 0; i--) if (a[i] == x) x--; cout << x << endl; }