만드는 중입니다

아직 만드는 중이라 바뀔 수 있습니다

x

시간 제한5초메모리 제한1024 MB

요약
Window 아래의 Actor 트리에서 추가, 삭제, 속성 변경 명령을 처리합니다. 조회 명령의 결과를 출력하고 최종 화면의 색을 구합니다.
난이도

보통10점 중 4점

유형
트리, 시뮬레이션, 구현
정답자
아직 제출이 없습니다

x

x

예제5

  1. 예제 1

    입력
    4 3
    22
    New A
    New B
    New azAZ09_
    SetProperty A POSITION -1 0
    SetProperty B POSITION 2 1
    New AA
    New AB
    SetProperty AA ANCHOR_POINT 1 1
    SetProperty AA POSITION 1 1
    SetProperty AA SIZE 2 2
    SetProperty AB SIZE 2 2
    SetProperty AB COLOR 2
    Add Window A
    Add Window B
    GetProperty AB COLOR
    Add A AA
    Add A AB
    Add A AA
    Add A AB
    Add A AA
    GetProperty AB SCREEN_POSITION
    Add B A
    
    예상 출력
    2
    -1 0
    1100
    1120
    0220
    
  2. 예제 2

    입력
    3 5
    3
    New window
    Add Window window
    SetProperty window SIZE 1 1
    
    예상 출력
    100
    000
    000
    000
    000
    
  3. 예제 3

    입력
    3 3
    12
    New New
    New Add
    New SIZE
    New POSITION
    Add Window Add
    SetProperty POSITION SIZE 100000 100000
    SetProperty SIZE POSITION -100000 -100000
    GetProperty SIZE POSITION
    GetProperty POSITION SIZE
    GetProperty POSITION POSITION
    Add Add POSITION
    Add New Add
    
    예상 출력
    -100000 -100000
    100000 100000
    0 0
    000
    000
    000
    
  4. 예제 4

    입력
    5 6
    20
    New A
    Add Window A
    SetProperty A SIZE 2 3
    SetProperty A POSITION 1 2
    SetProperty A COLOR 2
    New B
    Add A B
    SetProperty B SIZE 5 4
    SetProperty B POSITION 6 -2
    SetProperty B COLOR 3
    GetProperty B SCREEN_POSITION
    SetProperty A ANCHOR_POINT 1 0
    GetProperty B SCREEN_POSITION
    SetProperty B PARENT_ORIGIN 0 1
    GetProperty B SCREEN_POSITION
    SetProperty B ANCHOR_POINT 1 1
    GetProperty B SCREEN_POSITION
    SetProperty A PARENT_ORIGIN 1 1
    GetProperty B SCREEN_POSITION
    SetProperty A PARENT_ORIGIN 0 0
    
    예상 출력
    7 0
    5 0
    5 3
    5 3
    10 9
    33333
    33333
    33333
    20000
    20000
    00000
    
  5. 예제 5

    입력
    4 6
    39
    New A1
    New A2
    New B3
    New B4
    SetProperty A1 SIZE 2 2
    SetProperty A2 SIZE 2 2
    SetProperty B3 SIZE 2 2
    SetProperty B4 SIZE 2 2
    SetProperty A1 COLOR 1
    SetProperty A2 COLOR 2
    SetProperty B3 COLOR 3
    SetProperty B4 COLOR 4
    SetProperty A1 POSITION 1 0
    SetProperty A2 POSITION -1 1
    SetProperty B3 POSITION 1 2
    SetProperty B4 POSITION 1 1
    Add A1 A2
    Add B3 B4
    Add Window A1
    Add Window B3
    GetProperty A1 SCREEN_POSITION
    GetProperty A2 SCREEN_POSITION
    GetProperty B3 SCREEN_POSITION
    GetProperty B4 SCREEN_POSITION
    Remove Window B4
    GetProperty B4 SCREEN_POSITION
    Remove Window B3
    GetProperty B3 SCREEN_POSITION
    GetProperty B4 SCREEN_POSITION
    Unparent B4
    Unparent B4
    Add Window B3
    GetProperty B3 SCREEN_POSITION
    GetProperty B4 SCREEN_POSITION
    Add A2 B4
    GetProperty B4 SCREEN_POSITION
    Add Window B4
    GetProperty B4 SCREEN_POSITION
    Add B3 B4
    
    예상 출력
    1 0
    0 1
    1 2
    2 3
    2 3
    0 0
    0 0
    1 2
    0 0
    1 2
    1 1
    0110
    2210
    2330
    0344
    0044
    0000