답안 #163432

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
163432 2019-11-13T09:50:18 Z davitmarg 벽 (IOI14_wall) C++17
8 / 100
3000 ms 18280 KB
/*DavitMarg*/
#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <queue>
#include <iomanip>
#include <bitset>
#include <stack>
#include <cassert>
#include <iterator>
#include <fstream>
#define mod 1000000007ll
#define LL long long
#define LD long double
#define MP make_pair
#define PB push_back
#define all(v) v.begin(), v.end()
using namespace std;

#ifndef death
#include "wall.h"
#endif

const int N = 2000006;

void buildWall(int n, int k, int op[], int L[], int R[], int H[], int fin[])
{
    for (int i = 0; i < n; i++)
        fin[i] = 0;
    for (int j = 0; j < k; j++)
    {
        for (int i = L[j]; i <= R[j]; i++)
            if (op[j] == 1)
            {
                if (fin[i] < H[j])
                    fin[i] = H[j];
            }
            else
            {
                if (fin[i] > H[j])
                    fin[i] = H[j];
            }
    }
}

#ifdef death

int main()
{
    int N, K, L[102], R[102], OP[102], H[102], A[102];
    cin >> N >> K;
    for (int i = 0; i < K; i++)
        cin >> OP[i] >> L[i] >> R[i] >> H[i];
    buildWall(N, K, OP, L, R, H, A);
    for (int i = 0; i < N; i++)
        cout << A[i] << endl;

    return 0;
}

#endif

/*
 
10 3
1 3 4 91220
1 5 9 48623
2 3 5 39412
 
*/
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 4 ms 508 KB Output is correct
3 Correct 4 ms 504 KB Output is correct
4 Correct 25 ms 636 KB Output is correct
5 Correct 27 ms 632 KB Output is correct
6 Correct 27 ms 632 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 185 ms 8732 KB Output is correct
3 Correct 1761 ms 4268 KB Output is correct
4 Execution timed out 3036 ms 9212 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 404 KB Output is correct
2 Correct 4 ms 504 KB Output is correct
3 Correct 3 ms 376 KB Output is correct
4 Correct 24 ms 592 KB Output is correct
5 Correct 27 ms 632 KB Output is correct
6 Correct 27 ms 632 KB Output is correct
7 Correct 2 ms 256 KB Output is correct
8 Correct 176 ms 13944 KB Output is correct
9 Correct 1715 ms 7516 KB Output is correct
10 Execution timed out 3052 ms 18180 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 252 KB Output is correct
2 Correct 4 ms 504 KB Output is correct
3 Correct 3 ms 376 KB Output is correct
4 Correct 25 ms 564 KB Output is correct
5 Correct 27 ms 600 KB Output is correct
6 Correct 27 ms 632 KB Output is correct
7 Correct 2 ms 256 KB Output is correct
8 Correct 177 ms 14152 KB Output is correct
9 Correct 1710 ms 7516 KB Output is correct
10 Execution timed out 3024 ms 18280 KB Time limit exceeded
11 Halted 0 ms 0 KB -