답안 #480021

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
480021 2021-10-14T10:49:08 Z David_M Po (COCI21_po) C++14
10 / 70
34 ms 25504 KB
#include <bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define all(x) (x).begin(), (x).end()
#define pii pair<int, int>
#define FF first.first
#define FS first.second
#define pb push_back
using namespace std;
const ll N=1000006, INF=1e18, P=998244353;

ll q=1, n, m, x, y, z, l, r, k, a[N], b[N], f[N], ans, o, u, Ans[N];
vector <pii> v[N], V;
string s,t;
map <string, bool> M;

main(){ios_base::sync_with_stdio(false), cin.tie(0);

	cin>>n;
	for(int i=1; i<=n; i++){
		cin>>a[i];
		ans+=(a[i]>a[i-1]);
	}
	cout<<ans;

}

Compilation message

Main.cpp:18:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   18 | main(){ios_base::sync_with_stdio(false), cin.tie(0);
      | ^~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 14 ms 23772 KB Output isn't correct
2 Incorrect 16 ms 23800 KB Output isn't correct
3 Incorrect 15 ms 23928 KB Output isn't correct
4 Incorrect 23 ms 24276 KB Output isn't correct
5 Incorrect 21 ms 24540 KB Output isn't correct
6 Correct 32 ms 25468 KB Output is correct
7 Incorrect 34 ms 25504 KB Output isn't correct