답안 #284147

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
284147 2020-08-26T23:17:17 Z Ozy 벽 (IOI14_wall) C++17
8 / 100
3000 ms 18172 KB
#include "wall.h"
#include <bits/stdc++.h>

#define lli long long int
#define rep(i,a,b) for (lli i = (a); i <= (b); i++)
#define MIN -100001

using namespace std;

struct x{
    lli pos;
    lli tipo;
    lli val;

    bool operator < (const x &a)
    const {
        return pos < a.pos;
    }
};

set<lli> set1,set2;
vector<x> sum,res;
lli cant1[100002],cant2[100002];
lli cont1,cont2,a,b;

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

    rep(i,0,k-1) {

        if (op[i] == 1) {

            rep(j,left[i],right[i]) if (finalHeight[j] < height[i]) finalHeight[j] = height[i];

        }
        else {

            rep(j,left[i],right[i]) if (finalHeight[j] > height[i]) finalHeight[j] = height[i];

        }

    }

    return;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 22 ms 632 KB Output is correct
5 Correct 20 ms 640 KB Output is correct
6 Correct 19 ms 640 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 169 ms 8204 KB Output is correct
3 Correct 1992 ms 3704 KB Output is correct
4 Execution timed out 3050 ms 8568 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 4 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 26 ms 640 KB Output is correct
5 Correct 20 ms 640 KB Output is correct
6 Correct 19 ms 632 KB Output is correct
7 Correct 0 ms 256 KB Output is correct
8 Correct 182 ms 13976 KB Output is correct
9 Correct 1942 ms 7484 KB Output is correct
10 Execution timed out 3064 ms 18168 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 256 KB Output is correct
2 Correct 3 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 27 ms 632 KB Output is correct
5 Correct 20 ms 640 KB Output is correct
6 Correct 24 ms 640 KB Output is correct
7 Correct 1 ms 256 KB Output is correct
8 Correct 177 ms 13944 KB Output is correct
9 Correct 1949 ms 7544 KB Output is correct
10 Execution timed out 3040 ms 18172 KB Time limit exceeded
11 Halted 0 ms 0 KB -