답안 #1062651

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1062651 2024-08-17T09:35:29 Z NemanjaSo2005 벽 (IOI14_wall) C++17
8 / 100
325 ms 262144 KB
#include<bits/stdc++.h>
#include "wall.h"
#define ll long long
using namespace std;
const int maxn=2e6+5;
int N,Q;
vector<pair<int,int>> sta[maxn];
int resavaj(vector<pair<int,int>> V){
   int h=0;
   for(auto x:V){
      if(x.first==1)
         h=max(h,x.second);
      else
         h=min(h,x.second);
   }
   return h;
}
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
   N=n;
   Q=k;
   for(int i=0;i<Q;i++){
      for(int j=left[i];j<=right[i];j++)
         sta[j].push_back({op[i],height[i]});
   }
   for(int i=0;i<N;i++)
      finalHeight[i]=resavaj(sta[i]);
}
# 결과 실행 시간 메모리 Grader output
1 Correct 18 ms 47196 KB Output is correct
2 Correct 19 ms 47452 KB Output is correct
3 Correct 26 ms 49232 KB Output is correct
4 Correct 273 ms 238440 KB Output is correct
5 Correct 276 ms 223316 KB Output is correct
6 Correct 270 ms 223568 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 47196 KB Output is correct
2 Correct 105 ms 68760 KB Output is correct
3 Runtime error 296 ms 262144 KB Execution killed with signal 9
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 20 ms 47200 KB Output is correct
2 Correct 21 ms 47452 KB Output is correct
3 Correct 25 ms 49308 KB Output is correct
4 Correct 287 ms 238200 KB Output is correct
5 Correct 267 ms 223384 KB Output is correct
6 Correct 278 ms 223828 KB Output is correct
7 Correct 23 ms 47192 KB Output is correct
8 Correct 115 ms 68840 KB Output is correct
9 Runtime error 315 ms 262144 KB Execution killed with signal 9
10 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 21 ms 47196 KB Output is correct
2 Correct 19 ms 47452 KB Output is correct
3 Correct 21 ms 49084 KB Output is correct
4 Correct 273 ms 238420 KB Output is correct
5 Correct 279 ms 223312 KB Output is correct
6 Correct 263 ms 223816 KB Output is correct
7 Correct 19 ms 47196 KB Output is correct
8 Correct 111 ms 68792 KB Output is correct
9 Runtime error 325 ms 262144 KB Execution killed with signal 9
10 Halted 0 ms 0 KB -