답안 #1036024

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1036024 2024-07-27T02:19:32 Z mindiyak 벽 (IOI14_wall) C++14
8 / 100
3000 ms 18396 KB
#include "wall.h"
#include <bits/stdc++.h>
#include <string>
#include <iostream>
#include <cmath>
#include <numeric>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int, int> pi;
typedef pair<int, int> pl;
typedef pair<ld, ld> pd;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<vector<int>> vvi;
typedef vector<ld> vd;
typedef vector<long> vl;
typedef vector<pi> vpi;
typedef vector<pl> vpl;
#define FOR(i, a, b) for (int i = a; i < (b); i++)
#define F0R(i, a) for (int i = 0; i < (a); i++)
#define FORd(i, a, b) for (int i = (b)-1; i >= a; i--)
#define F0Rd(i, a) for (int i = (a)-1; i >= 0; i--)
#define trav(a, x) for (auto &a : x)
#define uid(a, b) uniform_int_distribution<int>(a, b)(rng)
#define len(x) (int)(x).size()
#define mp make_pair
#define pb push_back
#define fst first
#define nl endl
#define sec second
#define lb lower_bound
#define ub upper_bound
#define aint(x) x.begin(), x.end()
#define raint(x) x.rbegin(), x.rend()
#define ins insert
const int MOD = 1000000007;

void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
  vi arr(n,0);

  FOR(i,0,k){
    FOR(j,left[i],right[i]+1){
      if(op[i] == 1){
        arr[j] = max(arr[j],height[i]);
      }else{
        arr[j] = min(arr[j],height[i]);
      }
    }
  }

  FOR(i,0,n)finalHeight[i] = arr[i];
}

# 결과 실행 시간 메모리 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 11 ms 600 KB Output is correct
5 Correct 20 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 92 ms 8020 KB Output is correct
3 Correct 868 ms 7596 KB Output is correct
4 Execution timed out 3024 ms 18256 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 496 KB Output is correct
4 Correct 12 ms 604 KB Output is correct
5 Correct 23 ms 604 KB Output is correct
6 Correct 12 ms 604 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 108 ms 14000 KB Output is correct
9 Correct 905 ms 7764 KB Output is correct
10 Execution timed out 3043 ms 18268 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 396 KB Output is correct
4 Correct 14 ms 676 KB Output is correct
5 Correct 18 ms 600 KB Output is correct
6 Correct 24 ms 680 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 113 ms 13908 KB Output is correct
9 Correct 970 ms 7528 KB Output is correct
10 Execution timed out 3037 ms 18396 KB Time limit exceeded
11 Halted 0 ms 0 KB -