답안 #122061

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
122061 2019-06-27T13:33:10 Z Gustav 벽 (IOI14_wall) C++14
8 / 100
3000 ms 18200 KB
#include <bits/stdc++.h>
#include "wall.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<pi> vpi;
typedef vector<vi> vvi;
const int inf = 0x3f3f3f3f;
const ll linf = 123456789012345678;
const ll mod = 998244353;
#pragma GCC optimize("Ofast")
#define all(x) x.begin(), x.end()
#define debug(x) cerr << #x << " = " << x << endl

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]);
            }
            else{
                finalHeight[j] = min(finalHeight[j], height[i]);
            }
        }
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 3 ms 512 KB Output is correct
3 Correct 3 ms 384 KB Output is correct
4 Correct 21 ms 560 KB Output is correct
5 Correct 21 ms 632 KB Output is correct
6 Correct 21 ms 560 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 141 ms 13944 KB Output is correct
3 Correct 1308 ms 7476 KB Output is correct
4 Execution timed out 3095 ms 18200 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 3 ms 512 KB Output is correct
3 Correct 3 ms 384 KB Output is correct
4 Correct 21 ms 512 KB Output is correct
5 Correct 21 ms 640 KB Output is correct
6 Correct 21 ms 632 KB Output is correct
7 Correct 2 ms 400 KB Output is correct
8 Correct 143 ms 13944 KB Output is correct
9 Correct 1317 ms 7508 KB Output is correct
10 Execution timed out 3029 ms 18168 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 3 ms 512 KB Output is correct
3 Correct 3 ms 384 KB Output is correct
4 Correct 21 ms 612 KB Output is correct
5 Correct 21 ms 504 KB Output is correct
6 Correct 21 ms 512 KB Output is correct
7 Correct 2 ms 384 KB Output is correct
8 Correct 143 ms 13944 KB Output is correct
9 Correct 1324 ms 7456 KB Output is correct
10 Execution timed out 3042 ms 18132 KB Time limit exceeded
11 Halted 0 ms 0 KB -