Under construction

Still being built. Things may change

Solving Problems

Time limit3sMemory limit512 MB

Summary
Five separate problems (Dequery, 박승원, Mini Album, Juryeonggu, Incorrectly Implemented Euler Circuit) each read their own input and print one answer, in order.
Level

Medium6 of 10

Topics
Implementation, Queue, Graph, Probability
Solved
No attempts yet

Problems

This problem consists of five different problems. When the input for each problem is given in order, write a program that prints the output for each problem in order.

  • Problem 1: Dequery
  • Problem 2: 박승원
  • Problem 3: Mini Album
  • Problem 4: Juryeonggu
  • Problem 5: Incorrectly Implemented Euler Circuit

Time limit is 3000 ms and memory limit is 512 MB.

Input

The input for each problem is given in order.

Output

Print the answer to each problem in order.

Examples1

  1. Example 1

    Input
    5
    2 2 3
    1 3 2
    5 2
    3 1
    5 2
    5
    2 1 2 0 0
    5 3 1 1 1
    2 4 2 1 0
    4 4 1 1 1
    10 10 4 3 3
    10 3 8 2 9 3
    QR 퍼즐헌트
    (L)5R
    7 8
    1 4
    1 6
    4 2
    6 2
    2 5
    2 7
    5 3
    7 3
    
    Expected output
    3
    2
    4
    21
    305
    36
    6910035
    5137799
    대결!
    6
    1 3 4 5 6 7