結果
問題 |
No.365 ジェンガソート
|
ユーザー |
👑 |
提出日時 | 2020-03-02 14:33:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 313 bytes |
コンパイル時間 | 690 ms |
コンパイル使用メモリ | 72,000 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-13 21:01:56 |
合計ジャッジ時間 | 2,676 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main(){ int n;cin>>n; vector<int> A(n); for(int i = 0; n > i; i++)cin>>A[i]; reverse(A.begin(),A.end()); int nw = n; for(int i = 0; n > i; i++){ if(A[i] == nw)nw--; } cout << nw << endl; }