#include <iostream>
#include <vector>
#include <set>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <stdio.h>
#include <cmath>
#include <queue>
#include <string>
#include <map>
#include <complex>
#include <stack>
#include <set>
#define FOR(i,n) for (int i = 0;i<n;i++)
#define FORE(i, a, b) for (int i = a;i<= b;i++)
#define ll long long int
#define ff first
#define ss second
#define ii pair<int,int>
#define pb push_back
#define mp make_pair
using namespace std;
int* arr;
int N;
// sl == sealevel
int query(int sl){
int cnt = 0;
FOR(i,N){
if(i == 0){
if(arr[i] > sl){
cnt++;
}
}else{
if(arr[i] > sl){
if(arr[i-1] <= sl)cnt++;
}
}
}
return cnt;
}
int gw(int N,int *H){
::N = N;
ii crdcmprs[N];
FOR(i,N)crdcmprs[i].ff = H[i],crdcmprs[i].ss = i;
sort(crdcmprs,crdcmprs+N);
arr = new int[N];
FOR(i,N)arr[crdcmprs[i].ss] = crdcmprs[i].ff;
int mx = 0;
FOR(i,N+5){
mx = max(mx,query(i));
}
return mx;
}
int main(){
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
376 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
2 ms |
256 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |