結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2023-03-03 07:22:19 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 514 bytes |
コンパイル時間 | 4,526 ms |
コンパイル使用メモリ | 250,064 KB |
最終ジャッジ日時 | 2025-02-11 01:20:00 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 25 |
ソースコード
#include <bits/stdc++.h> #include <atcoder/all> using namespace atcoder; using namespace std; using ll=long long; using ld=double; ld pie=3.14159265359; ll mod=998244353; long long inf=100000000000000001; int main(){ ll n; cin >> n; vector<ll>a(n); for (ll i = 0; i < n; i++) { cin >> a[i]; } ll dai=a[0]; ll ans=0; for (ll i = 1; i < n; i++) { if (dai>a[i]) { ans+=1; } dai=max(dai,a[i]); } cout << ans << endl; }