답안 #930661

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
930661 2024-02-20T08:58:13 Z vjudge1 벽 (IOI14_wall) C++17
8 / 100
3000 ms 16640 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]<<" ";
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 1 ms 500 KB Output is correct
4 Correct 18 ms 604 KB Output is correct
5 Correct 19 ms 444 KB Output is correct
6 Correct 18 ms 600 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 110 ms 8012 KB Output is correct
3 Correct 1382 ms 6276 KB Output is correct
4 Execution timed out 3022 ms 16360 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 18 ms 604 KB Output is correct
5 Correct 18 ms 600 KB Output is correct
6 Correct 19 ms 600 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 114 ms 13008 KB Output is correct
9 Correct 1378 ms 7076 KB Output is correct
10 Execution timed out 3095 ms 16640 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 2 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 19 ms 604 KB Output is correct
5 Correct 18 ms 632 KB Output is correct
6 Correct 19 ms 600 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 111 ms 12924 KB Output is correct
9 Correct 1418 ms 7072 KB Output is correct
10 Execution timed out 3083 ms 16468 KB Time limit exceeded
11 Halted 0 ms 0 KB -