Submission #930660

# Submission time Handle Problem Language Result Execution time Memory
930660 2024-02-20T08:57:31 Z vjudge1 Wall (IOI14_wall) C++17
0 / 100
0 ms 348 KB
#include<bits/stdc++.h>

#include "wall.h"

using namespace std;

#define F first
#define S second
#define ll long long
#define maksim gay
// #define int ll
#define pb push_back
#define sz(s) (int)s.size()
#define pii pair<int,int>
#define all(v) v.begin(),v.end()
#define mem(a,i) memset(a,i,sizeof(a))
#define in insert
#define lb lower_bound
#define ub upper_bound
#define y1 yy
#define ppb pop_back

const int MAX=2e6+10;
const int inf=2e9;
const int N=2e5;
const int mod=998244353;

int binpow(int a,int n){
  if(n==0)return 1;
  if(n%2)return a*binpow(a,n-1)%mod;
  int k=binpow(a,n/2);
  return k*k%mod;
}

void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
  for(int i=0;i<n;i++)finalHeight[i]=0;
  for(int i=0;i<k;i++){
    for(int j=left[i];j<=right[i];j++){
      if(op[i]==1)finalHeight[j]=max(finalHeight[j],height[i]);
      if(op[i]==2)finalHeight[j]=min(finalHeight[j],height[i]);
    }
  }
  for(int i=0;i<n;i++)cout<<finalHeight[i]<<" ";
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -