結果
| 問題 |
No.1425 Yet Another Cyclic Shifts Sorting
|
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2021-03-12 21:47:08 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 462 bytes |
| コンパイル時間 | 4,034 ms |
| コンパイル使用メモリ | 249,236 KB |
| 最終ジャッジ日時 | 2025-01-19 14:30:32 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 20 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:25:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
25 | scanf("%d",&A[i]);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000000
int op(int a,int b){
return max(a,b);
}
int e(){
return 0;
}
int main(){
int N;
cin>>N;
vector<int> A(N);
rep(i,N){
scanf("%d",&A[i]);
}
int ans = 0;
rep(i,N-1){
if(A[i] > A[i+1])ans++;
}
cout<<ans<<endl;
return 0;
}
沙耶花