結果
| 問題 | No.365 ジェンガソート |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2016-04-30 18:35:15 |
| 言語 | C++11(廃止可能性あり) (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 743 bytes |
| 記録 | |
| コンパイル時間 | 682 ms |
| コンパイル使用メモリ | 83,680 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-10-05 00:11:37 |
| 合計ジャッジ時間 | 2,523 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 25 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 365.cc: No.365 ジェンガソート - yukicoder
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
/* constant */
const int MAX_N = 100000;
/* typedef */
/* global variables */
/* subroutines */
/* main */
int main() {
int n;
cin >> n;
int maxa = -1, cnt = 0;
for (int i = 0; i < n; i++) {
int ai;
cin >> ai;
if (maxa > ai) cnt++;
else maxa = ai;
}
printf("%d\n", cnt);
return 0;
}
tnakao0123