結果
問題 | No.365 ジェンガソート |
ユーザー |
|
提出日時 | 2016-05-03 23:15:44 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 426 ms |
コンパイル使用メモリ | 58,832 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-12 02:14:47 |
合計ジャッジ時間 | 2,111 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> using namespace std; int a[100000+10],n,sw; char b[100000+10]; int jengasort(int a[],int n) { int b=n; for(int i=n-1;i>=0;i--) { if(a[i]==b)b--; } return b; } int main() { cin>>n; for(int i=0;i<n;i++)cin>>a[i]; cout<<jengasort(a,n)<<endl; }