update
This commit is contained in:
parent
1768e7d6ef
commit
b8cf1ab56d
@ -38,3 +38,5 @@ add_executable(P2782 ${CMAKE_CURRENT_LIST_DIR}/P2782/P2782.cpp)
|
||||
add_executable(P1091 ${CMAKE_CURRENT_LIST_DIR}/P1091/P1091.cpp)
|
||||
|
||||
add_executable(P1020 ${CMAKE_CURRENT_LIST_DIR}/P1020/P1020.cpp)
|
||||
|
||||
add_executable(U206625 ${CMAKE_CURRENT_LIST_DIR}/U206625/U206625.cpp)
|
@ -21,12 +21,12 @@ int main(){
|
||||
for_each_n(len,n,[](decltype(*len) e){
|
||||
ans1 = std::max(ans1,e);
|
||||
});
|
||||
last_max = arr[0];
|
||||
for_each_n(arr+1,n,[](decltype(*arr) e){
|
||||
if(last_max < e){
|
||||
for(int i=1;i<n;i++){
|
||||
if(arr[i]>arr[i-1]){
|
||||
ans2++;
|
||||
}
|
||||
last_max = e;
|
||||
});
|
||||
}
|
||||
cout<<ans1<<'\n'<<ans2<<'\n';
|
||||
}
|
||||
|
||||
// 40 PT
|
0
U206625/U206625.cpp
Normal file
0
U206625/U206625.cpp
Normal file
Loading…
Reference in New Issue
Block a user