답안 #1043338

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1043338 2024-08-04T08:33:59 Z Malix 벽 (IOI14_wall) C++14
8 / 100
3000 ms 18068 KB
#include "wall.h"
#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
typedef pair<int,int> pi;
typedef vector<pi> pii;
typedef tuple<int,int,int> tii;
typedef vector<ll> li;
typedef vector<li> lii;
 
#define REP(i,a,b) for(int i=a;i<b;i++)
#define F first
#define S second
#define PB push_back
#define MP make_pair
#define LSOne(s) ((s)&(-s))
 
ll INF=1e18+10;
int inf=1e9+10;
ll M=1e9+7;

void buildWall(int n, int k, int t[], int l[], int r[], int h[], int finalHeight[]){
  vi ans(n,0);
  REP(i,0,k){
    if(t[i]==1){
      REP(j,l[i],r[i]+1)ans[j]=max(ans[j],h[i]);
    }
    else{
      REP(j,l[i],r[i]+1)ans[j]=min(ans[j],h[i]);
    }
  }
  REP(i,0,n)finalHeight[i]=ans[i];
  return;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 11 ms 632 KB Output is correct
5 Correct 11 ms 604 KB Output is correct
6 Correct 12 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 68 ms 14000 KB Output is correct
3 Correct 732 ms 7508 KB Output is correct
4 Execution timed out 3029 ms 18000 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 10 ms 672 KB Output is correct
5 Correct 11 ms 676 KB Output is correct
6 Correct 13 ms 600 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 70 ms 14040 KB Output is correct
9 Correct 757 ms 7592 KB Output is correct
10 Execution timed out 3073 ms 18068 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 448 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 10 ms 604 KB Output is correct
5 Correct 11 ms 704 KB Output is correct
6 Correct 11 ms 604 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 71 ms 13952 KB Output is correct
9 Correct 775 ms 7428 KB Output is correct
10 Execution timed out 3055 ms 18008 KB Time limit exceeded
11 Halted 0 ms 0 KB -