QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#256740#7758. Painterucup-team296#AC ✓25ms2300kbRust17.5kb2023-11-18 21:21:232023-11-18 21:21:24

Judging History

你现在查看的是最新测评结果

  • [2023-11-18 21:21:24]
  • 评测
  • 测评结果:AC
  • 用时:25ms
  • 内存:2300kb
  • [2023-11-18 21:21:23]
  • 提交

answer

pub mod solution {
//{"name":"m","group":"Manual","url":"","interactive":false,"timeLimit":2000,"tests":[{"input":"","output":""}],"testType":"single","input":{"type":"stdin","fileName":null,"pattern":null},"output":{"type":"stdout","fileName":null,"pattern":null},"languages":{"java":{"taskClass":"m"}}}

use crate::algo_lib::io::output::output;
use crate::algo_lib::io::task_io_settings::TaskIoType;
use crate::algo_lib::io::task_runner::run_task;
use crate::algo_lib::io::input::Input;
use crate::algo_lib::io::task_io_settings::TaskIoSettings;
#[allow(unused)]
use crate::dbg;
use crate::out;
use crate::out_line;

#[derive(Clone, Copy)]
enum Op {
    Circle {
        x: i64,
        y: i64,
        r: i64,
        col: u8,
    },
    Rectangle {
        x1: i64,
        y1: i64,
        x2: i64,
        y2: i64,
        col: u8,
    },
}

fn solve(input: &mut Input, _test_case: usize) {
    let n = input.usize();
    let mut ops = vec![];
    for _ in 0..n {
        let q_type = input.string_as_string();
        if q_type == "Circle" {
            let x = input.i64();
            let y = input.i64();
            let r = input.i64();
            let col = input.string()[0];
            ops.push(Op::Circle { x, y, r, col });
        } else if q_type == "Rectangle" {
            let x1 = input.i64();
            let y1 = input.i64();
            let x2 = input.i64();
            let y2 = input.i64();
            let col = input.string()[0];
            ops.push(Op::Rectangle {
                x1,
                y1,
                x2,
                y2,
                col,
            });
        } else {
            assert_eq!(q_type, "Render");
            let x1 = input.i64();
            let y1 = input.i64();
            let x2 = input.i64();
            let y2 = input.i64();
            for cy in (y1..=y2).rev() {
                for cx in x1..=x2 {
                    let mut res = b'.';
                    for op in ops.iter() {
                        match op {
                            &Op::Circle { x, y, r, col } => {
                                if (cx - x) * (cx - x) + (cy - y) * (cy - y) <= r * r {
                                    res = col;
                                }
                            }
                            &Op::Rectangle {
                                x1,
                                y1,
                                x2,
                                y2,
                                col,
                            } => {
                                if cx >= x1 && cx <= x2 && cy >= y1 && cy <= y2 {
                                    res = col;
                                }
                            }
                        }
                    }
                    out!(res as char);
                }
                out_line!()
            }
        }
    }
}

pub(crate) fn run(mut input: Input) -> bool {
    solve(&mut input, 1);
    output().flush();
    true
}

#[allow(unused)]
pub fn submit() -> bool {
    let io = TaskIoSettings {
        is_interactive: false,
        input: TaskIoType::Std,
        output: TaskIoType::Std,
    };

    run_task(io, run)
}

}
pub mod algo_lib {
pub mod io {
pub mod input {
use std::fmt::Debug;
use std::io::Read;
use std::marker::PhantomData;
use std::path::Path;
use std::str::FromStr;

pub struct Input {
    input: Box<dyn Read>,
    buf: Vec<u8>,
    at: usize,
    buf_read: usize,
}

macro_rules! read_integer_fun {
    ($t:ident) => {
        #[allow(unused)]
        pub fn $t(&mut self) -> $t {
            self.read_integer()
        }
    };
}

impl Input {
    const DEFAULT_BUF_SIZE: usize = 4096;

    ///
    /// Using with stdin:
    /// ```no_run
    /// use algo_lib::io::input::Input;
    /// let stdin = std::io::stdin();
    /// let input = Input::new(Box::new(stdin));
    /// ```
    ///
    /// For read files use ``new_file`` instead.
    ///
    ///
    pub fn new(input: Box<dyn Read>) -> Self {
        Self {
            input,
            buf: vec![0; Self::DEFAULT_BUF_SIZE],
            at: 0,
            buf_read: 0,
        }
    }

    pub fn new_file<P: AsRef<Path>>(path: P) -> Self {
        let file = std::fs::File::open(&path)
            .unwrap_or_else(|_| panic!("Can't open file: {:?}", path.as_ref().as_os_str()));
        Self::new(Box::new(file))
    }

    pub fn new_with_size(input: Box<dyn Read>, buf_size: usize) -> Self {
        Self {
            input,
            buf: vec![0; buf_size],
            at: 0,
            buf_read: 0,
        }
    }

    pub fn new_file_with_size<P: AsRef<Path>>(path: P, buf_size: usize) -> Self {
        let file = std::fs::File::open(&path)
            .unwrap_or_else(|_| panic!("Can't open file: {:?}", path.as_ref().as_os_str()));
        Self::new_with_size(Box::new(file), buf_size)
    }

    pub fn get(&mut self) -> Option<u8> {
        if self.refill_buffer() {
            let res = self.buf[self.at];
            self.at += 1;
            Some(res)
        } else {
            None
        }
    }

    pub fn peek(&mut self) -> Option<u8> {
        if self.refill_buffer() {
            Some(self.buf[self.at])
        } else {
            None
        }
    }

    pub fn skip_whitespace(&mut self) {
        while let Some(b) = self.peek() {
            if !char::from(b).is_whitespace() {
                return;
            }
            self.get();
        }
    }

    pub fn next_token(&mut self) -> Option<Vec<u8>> {
        self.skip_whitespace();
        let mut res = Vec::new();
        while let Some(c) = self.get() {
            if char::from(c).is_whitespace() {
                break;
            }
            res.push(c);
        }
        if res.is_empty() {
            None
        } else {
            Some(res)
        }
    }

    //noinspection RsSelfConvention
    pub fn is_exhausted(&mut self) -> bool {
        self.peek().is_none()
    }

    pub fn has_more_elements(&mut self) -> bool {
        !self.is_exhausted()
    }

    pub fn read<T: Readable>(&mut self) -> T {
        T::read(self)
    }

    pub fn vec<T: Readable>(&mut self, size: usize) -> Vec<T> {
        let mut res = Vec::with_capacity(size);
        for _ in 0usize..size {
            res.push(self.read());
        }
        res
    }

    pub fn string_vec(&mut self, size: usize) -> Vec<Vec<u8>> {
        let mut res = Vec::with_capacity(size);
        for _ in 0usize..size {
            res.push(self.string());
        }
        res
    }

    pub fn read_line(&mut self) -> String {
        let mut res = String::new();
        while let Some(c) = self.get() {
            if c == b'\n' {
                break;
            }
            if c == b'\r' {
                if self.peek() == Some(b'\n') {
                    self.get();
                }
                break;
            }
            res.push(c.into());
        }
        res
    }

    #[allow(clippy::should_implement_trait)]
    pub fn into_iter<T: Readable>(self) -> InputIterator<T> {
        InputIterator {
            input: self,
            phantom: Default::default(),
        }
    }

    fn read_integer<T: FromStr>(&mut self) -> T
    where
        <T as FromStr>::Err: Debug,
    {
        let res = self.read_string();
        res.parse::<T>().unwrap()
    }

    fn read_string(&mut self) -> String {
        match self.next_token() {
            None => {
                panic!("Input exhausted");
            }
            Some(res) => unsafe { String::from_utf8_unchecked(res) },
        }
    }

    pub fn string_as_string(&mut self) -> String {
        self.read_string()
    }

    pub fn string(&mut self) -> Vec<u8> {
        self.read_string().into_bytes()
    }

    fn read_char(&mut self) -> char {
        self.skip_whitespace();
        self.get().unwrap().into()
    }

    fn read_float(&mut self) -> f64 {
        self.read_string().parse().unwrap()
    }

    pub fn f64(&mut self) -> f64 {
        self.read_float()
    }

    fn refill_buffer(&mut self) -> bool {
        if self.at == self.buf_read {
            self.at = 0;
            self.buf_read = self.input.read(&mut self.buf).unwrap();
            self.buf_read != 0
        } else {
            true
        }
    }

    read_integer_fun!(i32);
    read_integer_fun!(i64);
    read_integer_fun!(i128);
    read_integer_fun!(u32);
    read_integer_fun!(u64);
    read_integer_fun!(usize);
}

pub trait Readable {
    fn read(input: &mut Input) -> Self;
}

impl Readable for String {
    fn read(input: &mut Input) -> Self {
        input.read_string()
    }
}

impl Readable for char {
    fn read(input: &mut Input) -> Self {
        input.read_char()
    }
}

impl Readable for f64 {
    fn read(input: &mut Input) -> Self {
        input.read_string().parse().unwrap()
    }
}

impl Readable for f32 {
    fn read(input: &mut Input) -> Self {
        input.read_string().parse().unwrap()
    }
}

impl<T: Readable> Readable for Vec<T> {
    fn read(input: &mut Input) -> Self {
        let size = input.read();
        input.vec(size)
    }
}

pub struct InputIterator<T: Readable> {
    input: Input,
    phantom: PhantomData<T>,
}

impl<T: Readable> Iterator for InputIterator<T> {
    type Item = T;

    fn next(&mut self) -> Option<Self::Item> {
        self.input.skip_whitespace();
        self.input.peek().map(|_| self.input.read())
    }
}

macro_rules! read_integer {
    ($t:ident) => {
        impl Readable for $t {
            fn read(input: &mut Input) -> Self {
                input.read_integer()
            }
        }
    };
}

read_integer!(i8);
read_integer!(i16);
read_integer!(i32);
read_integer!(i64);
read_integer!(i128);
read_integer!(isize);
read_integer!(u8);
read_integer!(u16);
read_integer!(u32);
read_integer!(u64);
read_integer!(u128);
read_integer!(usize);
}
pub mod output {
use std::io::Write;

pub struct Output {
    output: Box<dyn Write>,
    buf: Vec<u8>,
    at: usize,
    auto_flush: bool,
}

impl Output {
    const DEFAULT_BUF_SIZE: usize = 4096;

    pub fn new(output: Box<dyn Write>) -> Self {
        Self {
            output,
            buf: vec![0; Self::DEFAULT_BUF_SIZE],
            at: 0,
            auto_flush: false,
        }
    }

    pub fn new_with_auto_flush(output: Box<dyn Write>) -> Self {
        Self {
            output,
            buf: vec![0; Self::DEFAULT_BUF_SIZE],
            at: 0,
            auto_flush: true,
        }
    }

    pub fn flush(&mut self) {
        if self.at != 0 {
            self.output.write_all(&self.buf[..self.at]).unwrap();
            self.at = 0;
            self.output.flush().expect("Couldn't flush output");
        }
    }

    pub fn print<T: Writable>(&mut self, s: &T) {
        s.write(self);
    }

    pub fn put(&mut self, b: u8) {
        self.buf[self.at] = b;
        self.at += 1;
        if self.at == self.buf.len() {
            self.flush();
        }
    }

    pub fn maybe_flush(&mut self) {
        if self.auto_flush {
            self.flush();
        }
    }

    pub fn print_per_line<T: Writable>(&mut self, arg: &[T]) {
        for i in arg {
            i.write(self);
            self.put(b'\n');
        }
    }

    pub fn print_iter<T: Writable, I: Iterator<Item = T>>(&mut self, iter: I) {
        let mut first = true;
        for e in iter {
            if first {
                first = false;
            } else {
                self.put(b' ');
            }
            e.write(self);
        }
    }

    pub fn print_iter_ref<'a, T: 'a + Writable, I: Iterator<Item = &'a T>>(&mut self, iter: I) {
        let mut first = true;
        for e in iter {
            if first {
                first = false;
            } else {
                self.put(b' ');
            }
            e.write(self);
        }
    }
}

impl Write for Output {
    fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
        let mut start = 0usize;
        let mut rem = buf.len();
        while rem > 0 {
            let len = (self.buf.len() - self.at).min(rem);
            self.buf[self.at..self.at + len].copy_from_slice(&buf[start..start + len]);
            self.at += len;
            if self.at == self.buf.len() {
                self.flush();
            }
            start += len;
            rem -= len;
        }
        if self.auto_flush {
            self.flush();
        }
        Ok(buf.len())
    }

    fn flush(&mut self) -> std::io::Result<()> {
        self.flush();
        Ok(())
    }
}

pub trait Writable {
    fn write(&self, output: &mut Output);
}

impl Writable for &str {
    fn write(&self, output: &mut Output) {
        output.write_all(self.as_bytes()).unwrap();
    }
}

impl Writable for String {
    fn write(&self, output: &mut Output) {
        output.write_all(self.as_bytes()).unwrap();
    }
}

impl Writable for char {
    fn write(&self, output: &mut Output) {
        output.put(*self as u8);
    }
}

impl<T: Writable> Writable for [T] {
    fn write(&self, output: &mut Output) {
        output.print_iter_ref(self.iter());
    }
}

impl<T: Writable> Writable for Vec<T> {
    fn write(&self, output: &mut Output) {
        self[..].write(output);
    }
}

macro_rules! write_to_string {
    ($t:ident) => {
        impl Writable for $t {
            fn write(&self, output: &mut Output) {
                self.to_string().write(output);
            }
        }
    };
}

write_to_string!(u8);
write_to_string!(u16);
write_to_string!(u32);
write_to_string!(u64);
write_to_string!(u128);
write_to_string!(usize);
write_to_string!(i8);
write_to_string!(i16);
write_to_string!(i32);
write_to_string!(i64);
write_to_string!(i128);
write_to_string!(isize);
write_to_string!(f32);
write_to_string!(f64);

impl<T: Writable, U: Writable> Writable for (T, U) {
    fn write(&self, output: &mut Output) {
        self.0.write(output);
        output.put(b' ');
        self.1.write(output);
    }
}

impl<T: Writable, U: Writable, V: Writable> Writable for (T, U, V) {
    fn write(&self, output: &mut Output) {
        self.0.write(output);
        output.put(b' ');
        self.1.write(output);
        output.put(b' ');
        self.2.write(output);
    }
}

pub static mut OUTPUT: Option<Output> = None;

pub fn set_global_output_to_stdout() {
    unsafe {
        OUTPUT = Some(Output::new(Box::new(std::io::stdout())));
    }
}

pub fn set_global_output_to_file(path: &str) {
    unsafe {
        let out_file =
            std::fs::File::create(path).unwrap_or_else(|_| panic!("Can't create file {}", path));
        OUTPUT = Some(Output::new(Box::new(out_file)));
    }
}

pub fn set_global_output_to_none() {
    unsafe {
        match &mut OUTPUT {
            None => {}
            Some(output) => output.flush(),
        }
        OUTPUT = None;
    }
}

pub fn output() -> &'static mut Output {
    unsafe {
        match &mut OUTPUT {
            None => {
                panic!("Global output wasn't initialized");
            }
            Some(output) => output,
        }
    }
}

#[macro_export]
macro_rules! out {
    ($first: expr $(,$args:expr )*) => {
        output().print(&$first);
        $(output().put(b' ');
        output().print(&$args);
        )*
        output().maybe_flush();
    }
}

#[macro_export]
macro_rules! out_line {
    ($first: expr $(, $args:expr )* ) => {
        {
            out!($first $(,$args)*);
            output().put(b'\n');
            output().maybe_flush();
        }
    };
    () => {
        {
            output().put(b'\n');
            output().maybe_flush();
        }
    };
}
}
pub mod task_io_settings {
pub enum TaskIoType {
    Std,
    File(String),
}

pub struct TaskIoSettings {
    pub is_interactive: bool,
    pub input: TaskIoType,
    pub output: TaskIoType,
}
}
pub mod task_runner {
use std::io::Write;

use super::input::Input;
use super::output::Output;
use super::output::OUTPUT;
use super::task_io_settings::TaskIoSettings;
use super::task_io_settings::TaskIoType;

pub fn run_task<Res>(io: TaskIoSettings, run: impl FnOnce(Input) -> Res) -> Res {
    let output: Box<dyn Write> = match io.output {
        TaskIoType::Std => Box::new(std::io::stdout()),
        TaskIoType::File(file) => {
            let out_file = std::fs::File::create(file).unwrap();
            Box::new(out_file)
        }
    };

    unsafe {
        OUTPUT = Some(Output::new(output));
    }

    let input = match io.input {
        TaskIoType::Std => {
            let sin = std::io::stdin();
            Input::new(Box::new(sin))
        }
        TaskIoType::File(file) => Input::new_file(file),
    };

    run(input)
}
}
}
pub mod misc {
pub mod dbg_macro {
#[macro_export]
#[allow(unused_macros)]
macro_rules! dbg {
    ($first_val:expr, $($val:expr),+ $(,)?) => {
        eprint!("[{}:{}] {} = {:?}",
                    file!(), line!(), stringify!($first_val), &$first_val);
        ($(eprint!(", {} = {:?}", stringify!($val), &$val)),+,);
        eprintln!();
    };
    ($first_val:expr) => {
        eprintln!("[{}:{}] {} = {:?}",
                    file!(), line!(), stringify!($first_val), &$first_val)
    };
}
}
}
}
fn main() {
    crate::solution::submit();
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 2088kb

input:

7
Circle 0 0 5 *
Circle -2 2 1 @
Circle 2 2 1 @
Rectangle 0 -1 0 0 ^
Rectangle -2 -2 2 -2 _
Render -5 -5 5 5
Render -1 0 1 2

output:

.....*.....
..*******..
.**@***@**.
.*@@@*@@@*.
.**@***@**.
*****^*****
.****^****.
.**_____**.
.*********.
..*******..
.....*.....
@*@
***
*^*

result:

ok 14 lines

Test #2:

score: 0
Accepted
time: 0ms
memory: 2204kb

input:

10
Rectangle -4262 2204 3116 9357 U
Circle 7078 6883 4684 W
Rectangle 390 675 1195 1251 =
Rectangle 78 2138 3288 2570 5
Rectangle -874 797 -99 1440 3
Render 7261 -4311 7304 -4268
Render 2060 9253 2103 9296
Render -1379 -7141 -1336 -7098
Render 982 5708 1025 5751
Render 1080 -9592 1123 -9549

output:

............................................
............................................
............................................
............................................
............................................
............................................
.................................

result:

ok 220 lines

Test #3:

score: 0
Accepted
time: 0ms
memory: 2136kb

input:

10
Rectangle -10000 -10000 10000 10000 @
Rectangle 1197 -1 1198 1 y
Rectangle 3684 -1 3685 0 &
Circle 8957 0 1 Y
Rectangle -5375 0 -5373 2 <
Circle 2683 0 0 7
Rectangle 1262 -1 1263 -1 i
Circle 3238 0 0 K
Circle -3533 0 0 G
Render -1605 0 8394 0

output:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...

result:

ok single line: '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'

Test #4:

score: 0
Accepted
time: 0ms
memory: 2112kb

input:

10
Rectangle -8228 -3399 3061 5167 P
Circle 600 -5480 5406 b
Rectangle -5644 -7645 -2592 2164 &
Circle 5101 -2822 5474 ~
Rectangle -116 -2676 326 5228 X
Rectangle -3772 1494 -3354 3523 !
Rectangle 2084 -729 2467 1390 ;
Circle -786 900 658 3
Rectangle -290 514 436 662 g
Render -7140 -4510 -7140 5489

output:

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...

result:

ok 10000 lines

Test #5:

score: 0
Accepted
time: 0ms
memory: 2128kb

input:

10
Render 4431 -6882 4486 -6880
Circle -5131 -3627 3919 K
Rectangle 3708 -7820 7499 -3207 c
Render 1734 4783 1752 4818
Circle 94 4899 1950 '
Render 8154 6624 8159 6862
Circle 3837 550 356 0
Render 2230 -2196 2232 -1293
Rectangle -935 701 949 1318 ?
Render 5282 -7624 5997 -7624

output:

........................................................
........................................................
........................................................
...................
...................
...................
...................
...................
...................
............

result:

ok 1183 lines

Test #6:

score: 0
Accepted
time: 0ms
memory: 2040kb

input:

10
Render -6920 -3210 -6633 -3205
Circle 5221 3077 390 F
Render -6294 -8386 -6235 -8360
Circle 65 -687 1867 ]
Render 1017 -8804 1689 -8803
Circle 475 1359 2114 )
Rectangle 52 -1984 1779 -614 M
Rectangle 1506 -2131 2992 -871 g
Render -6910 7316 -6904 7371
Render 8670 -8136 8684 -8117

output:

................................................................................................................................................................................................................................................................................................
..............

result:

ok 111 lines

Test #7:

score: 0
Accepted
time: 0ms
memory: 2084kb

input:

10
Rectangle 310990349 810289642 815443779 836759585 ;
Rectangle 793346907 -272571666 797309793 172290221 ]
Rectangle 467935431 -439130559 544524486 229621852 3
Rectangle -224358535 -197178831 393287874 348972387 s
Rectangle -150003927 9534824 -107643143 77085794 j
Render -883072967 590805088 -88307...

output:

............................................
............................................
............................................
............................................
............................................
............................................
.................................

result:

ok 220 lines

Test #8:

score: 0
Accepted
time: 0ms
memory: 2148kb

input:

10
Rectangle -1000000000 -1000000000 1000000000 1000000000 @
Rectangle 666424716 -2 666424717 -1 6
Circle 755891297 0 0 1
Rectangle -361127769 -2 -361127769 -2 I
Circle -136039484 0 2 R
Circle 728693826 0 0 2
Circle 973790054 0 1 :
Rectangle -15797858 0 -15797857 1 n
Circle -524847486 0 1 F
Render 4...

output:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...

result:

ok single line: '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'

Test #9:

score: 0
Accepted
time: 0ms
memory: 2080kb

input:

10
Rectangle -683173625 -208545790 788455256 559774142 k
Rectangle 550039572 676387146 870043595 746454080 6
Circle -635500176 539751534 459474826 K
Circle -368169606 -50341615 54579323 [
Rectangle 178677992 549182450 250843180 554111618 W
Rectangle 285421932 292015869 444111356 330882883 D
Circle 2...

output:

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...

result:

ok 10000 lines

Test #10:

score: 0
Accepted
time: 0ms
memory: 2132kb

input:

10
Circle -327739258 108614097 471789245 i
Render 417699651 -399673115 417699665 -399672973
Circle -649877874 576490519 343765669 e
Circle 157074784 278309489 244905082 m
Circle 135451272 318059849 145847376 D
Render 967202055 190570662 967202057 190573239
Rectangle 162938176 374114635 209950022 386...

output:

...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............
...............

result:

ok 2721 lines

Test #11:

score: 0
Accepted
time: 0ms
memory: 2204kb

input:

10
Render -533535480 830670347 -533535412 830670414
Rectangle -489898220 692771916 874357297 886588824 W
Circle -10510557 -16386069 199883455 t
Circle -513183387 -375752587 463079364 4
Circle -459032851 -208111107 435256379 C
Rectangle -26958781 274273387 402439794 324886701 /
Circle -289184879 -102...

output:

.....................................................................
.....................................................................
.....................................................................
.....................................................................
.......................

result:

ok 1286 lines

Test #12:

score: 0
Accepted
time: 1ms
memory: 2260kb

input:

100
Circle -9292 5707 6876 :
Circle -1997 7154 7708 0
Rectangle -3561 -4356 2992 6119 0
Rectangle 6625 -6200 7503 6979 Q
Circle -3583 4587 1231 )
Rectangle 2366 6854 5245 8284 I
Rectangle -4972 7611 5098 8199 m
Circle -4080 3482 8184 v
Circle -5091 -5730 277 x
Rectangle -278 -7831 6513 1328 ;
Rectan...

output:

vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
vvvvvvvvvvvvvv
...

result:

ok 700 lines

Test #13:

score: 0
Accepted
time: 0ms
memory: 2148kb

input:

100
Rectangle -10000 -10000 10000 10000 @
Rectangle 8726 -1 8727 1 h
Rectangle -2236 0 -2234 1 K
Rectangle -2464 0 -2463 0 /
Circle -4336 0 1 E
Circle 2704 0 0 9
Rectangle -2149 -2 -2148 0 *
Rectangle -6259 0 -6258 1 z
Rectangle -8346 -2 -8344 -1 3
Rectangle -1337 0 -1336 0 I
Rectangle -7532 -2 -753...

output:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...

result:

ok single line: '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'

Test #14:

score: 0
Accepted
time: 0ms
memory: 2088kb

input:

100
Rectangle 6743 104 8062 894 ?
Circle 5151 3046 6460 w
Circle -1707 -9130 3298 0
Circle 2338 -7880 7032 %
Circle -7572 4672 9015 _
Circle 2655 702 3988 N
Rectangle 6020 -6897 9309 -5374 }
Circle 1939 1153 187 5
Circle -8685 8310 2114 2
Rectangle -8140 6616 -5692 6851 `
Circle -999 3851 3710 C
Cir...

output:

!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
...

result:

ok 10000 lines

Test #15:

score: 0
Accepted
time: 0ms
memory: 2140kb

input:

100
Rectangle 4761 9894 6417 9902 d
Render 3689 -8837 3697 -8818
Rectangle 8136 4352 8604 5546 b
Circle 2356 7173 9628 Q
Render -5420 7272 -5405 7288
Render -3484 9029 -3157 9029
Rectangle 6355 577 9010 5025 '
Circle -4897 -7783 8582 L
Circle 4953 -6375 5140 n
Circle -5340 -8660 1510 *
Circle 1947 -...

output:

.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
.........
QQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQQ
QQQQQQQQQQQQQQQ...

result:

ok 839 lines

Test #16:

score: 0
Accepted
time: 0ms
memory: 2044kb

input:

100
Circle 2778 -7759 7197 :
Circle -7677 5999 1048 q
Render -6745 6565 -6736 6584
Rectangle -5439 -9526 4888 3669 X
Render 355 9448 357 9558
Circle -1466 6286 1322 e
Render 9185 -9426 9187 -9418
Rectangle 7162 2249 9263 6729 x
Render 3918 -6552 3919 -6329
Rectangle -3469 -777 3179 6926 Z
Render 309...

output:

..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
..........
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...

result:

ok 1863 lines

Test #17:

score: 0
Accepted
time: 1ms
memory: 2140kb

input:

100
Rectangle 728789087 -215372148 785464569 835038500 n
Circle -340046798 -745517196 918941191 x
Rectangle 840676658 332830515 909975136 375551481 <
Circle -843859746 -695748022 240435546 &
Rectangle -323792893 701550634 891608343 851761994 \
Rectangle 479143522 520660189 634778713 845930260 W
Circ...

output:

..............
..............
..............
..............
..............
..............
..............
..............
..............
..............
..............
..............
..............
..............
++++++++++++++
++++++++++++++
++++++++++++++
++++++++++++++
++++++++++++++
++++++++++++++
...

result:

ok 700 lines

Test #18:

score: 0
Accepted
time: 1ms
memory: 2136kb

input:

100
Rectangle -1000000000 -1000000000 1000000000 1000000000 @
Rectangle -377719462 -2 -377719462 -1 E
Rectangle -128961125 -1 -128961123 -1 2
Rectangle 240657325 0 240657327 0 s
Circle -957679115 0 2 x
Circle 831438655 0 0 Y
Circle 96792701 0 1 &
Rectangle -552160546 0 -552160544 0 v
Circle 87364693...

output:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...

result:

ok single line: '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'

Test #19:

score: 0
Accepted
time: 1ms
memory: 2252kb

input:

100
Rectangle -317252389 -991117788 387932508 802479625 i
Circle -611013225 -864684163 904504874 &
Circle 165352315 677717054 34579176 e
Circle -863949643 -723145603 132269446 *
Circle 139865322 215523829 68311328 U
Rectangle 698495594 -135623513 946343610 713222584 <
Rectangle 844841285 -275911440 ...

output:

Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
Q
...

result:

ok 10000 lines

Test #20:

score: 0
Accepted
time: 0ms
memory: 2124kb

input:

100
Circle 38181977 -917047693 909738564 x
Rectangle -814354916 -853732354 -428005454 -200885336 ]
Circle 964694520 -684080694 445808372 H
Render 99735460 553902485 99735471 553902516
Render -370300256 -203811054 -370300110 -203811053
Render 911834754 497476010 911834757 497476122
Circle -683429791 ...

output:

............
............
............
............
............
............
............
............
............
............
............
............
............
............
............
............
............
............
............
............
............
............
............
....

result:

ok 1199 lines

Test #21:

score: 0
Accepted
time: 0ms
memory: 2208kb

input:

100
Render -658477996 -808391423 -658477996 -808391393
Rectangle 871054818 166965689 929079472 229504845 "
Render -305485806 234723343 -305485804 234723485
Render -949368824 566212419 -949368820 566212430
Circle 27066614 731651389 781119517 v
Circle 808808835 26224173 134074586 O
Circle -896178542 6...

output:

.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
.....

result:

ok 1230 lines

Test #22:

score: 0
Accepted
time: 12ms
memory: 2188kb

input:

2000
Rectangle 316 285 8459 4765 Z
Circle -9241 -9821 8032 ~
Rectangle 6086 -2896 7452 -769 D
Rectangle 7569 9081 8249 9651 )
Circle -2627 7402 2100 a
Circle -4712 6710 3705 O
Circle 9906 -2600 1360 .
Circle -8441 -4371 9790 3
Rectangle -3747 -5490 -371 -794 _
Circle -633 7890 6957 h
Rectangle 3070 ...

output:

&&&
&&&
&&&
RRR
RRR
RRR
hhh
hhh
hhh
]]]
]]]
]]]
"""
"""
"""
000
000
000
???
???
???
PPP
PPP
PPP
eee
eee
eee
,,,
,,,
,,,
@@@
@@@
@@@
iii
iii
iii
***
***
***
&&&
&&&
&&&
666
666
666
,,,
,,,
,,,
444
444
444
===
===
===
OOO
OOO
OOO
RRR
RRR
RRR
000
000
000
===
===
===
TTT
TTT
TTT
BBB
BBB
BBB
LLL
LLL
LLL
...

result:

ok 3000 lines

Test #23:

score: 0
Accepted
time: 22ms
memory: 2156kb

input:

2000
Rectangle -10000 -10000 10000 10000 @
Rectangle -1667 0 -1667 0 1
Rectangle -3087 0 -3085 0 H
Rectangle -8873 0 -8871 2 5
Circle -6432 0 2 ;
Rectangle -3682 -1 -3682 0 J
Circle -8149 0 0 T
Rectangle -98 0 -97 2 G
Rectangle -2862 -1 -2862 1 !
Circle -2208 0 0 a
Circle -9030 0 1 ,
Circle -2299 0 ...

output:

@@@@@@@@@@@@@@@@@@KKKKKIII@@@@@@@@@@@@@@##@@a@@@@@c@@@@@@@@@@@@@@@@@@@@@@@M@GG@@888@@@@@@@@@@yy@66666@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@6@@@@@@@@@@@@@O@@@@@@`@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ll@@@@@@@@@@@@@[@@@@@@@@@@@@@@@@@@@9\\@@@@@@@@@@@@@@@@@@@@@@@@@*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@000@@@@@...

result:

ok single line: '@@@@@@@@@@@@@@@@@@KKKKKIII@@@@...@@@@@@@"""@@@@@@O@@@@@QQQQQ@@@@'

Test #24:

score: 0
Accepted
time: 18ms
memory: 2196kb

input:

2000
Rectangle -3649 9567 7946 9788 V
Rectangle -6283 -7950 5196 1650 (
Rectangle 3570 7694 4145 9688 [
Circle 7018 -5358 8806 X
Rectangle 1103 2023 7609 9053 m
Rectangle 2231 -7141 8222 2032 ,
Rectangle -8543 2536 -2078 5317 |
Rectangle 9594 -7291 9637 4025 R
Circle 619 1625 5229 `
Rectangle -8402 ...

output:

x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
x
...

result:

ok 10000 lines

Test #25:

score: 0
Accepted
time: 6ms
memory: 2192kb

input:

2000
Circle 4666 -8087 3310 x
Render 482 5931 500 5931
Render -716 2311 -711 2313
Circle -3987 5367 6299 [
Circle -6941 -1453 4362 w
Circle -685 -8558 2743 q
Circle -2505 2784 2574 f
Render 9413 -7624 9427 -7624
Circle -2946 -4086 2546 ;
Circle -142 -128 1429 %
Rectangle -5453 9627 8948 9764 ?
Rende...

output:

...................
......
......
......
...............
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
[
;;;;;;;;;;;
;;;;;;;;;;;
.
.
w
w
w
w
\\
\\
\\
\\
ffff
ffff
hhhhhhhh
hhhhhhhh
hhhhhhhh
K
K
I
I
HHHHHHHHHHHHHHHHHHHHH
hh
hh
hh
hh
hh
hh
hh
hh
hh
hh
hh
hh
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>>>>>>>>>>
[
[
[
[
[
[
[
[
[
...

result:

ok 2525 lines

Test #26:

score: 0
Accepted
time: 6ms
memory: 2260kb

input:

2000
Rectangle 2683 -5739 9575 1356 [
Circle 5101 -4622 3291 <
Circle 5416 -1796 5693 A
Circle -3184 -7755 8464 K
Render 6416 4559 6417 4571
Render -5152 860 -5150 866
Circle -9157 -519 7742 ?
Circle 9526 -8313 2868 >
Render 5661 -7380 5661 -7375
Render 9491 -6778 9496 -6777
Circle 1346 1785 3113 w
...

output:

..
..
..
..
..
..
..
..
..
..
..
..
..
...
...
...
...
...
...
...
A
A
A
A
A
A
>>>>>>
>>>>>>
wwwwwww
wwwwwww
wwwwwww
wwwwwww
.......
?
?
?
?
?
?
?
....
....
...
...
?
?
?
EEEEEEEEEEEEEEE
?
?
?
?
?
?
?
9
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
"
2222222
2222222
2222222
QQ
QQ
QQ
KKK
%%%%
%%%%
%%%%
KKKKKK
KKKK...

result:

ok 2561 lines

Test #27:

score: 0
Accepted
time: 13ms
memory: 2052kb

input:

2000
Circle 859283318 85000142 194340558 '
Rectangle -998858605 -661170311 749746790 -517808995 C
Rectangle 378962669 -526429074 433317375 -49791192 M
Rectangle -957482775 -815109720 -494326215 690224872 *
Circle 113635999 -439240777 883266421 Y
Rectangle -581587205 325554579 -21080744 624172215 A
C...

output:

???
???
???
ddd
ddd
ddd
^^^
^^^
^^^
***
***
***
;;;
;;;
;;;
___
___
___
%%%
%%%
%%%
___
___
___
###
###
###
???
???
???
%%%
%%%
%%%
;;;
;;;
;;;
FFF
FFF
FFF
yyy
yyy
yyy
FFF
FFF
FFF
???
???
???
GGG
GGG
GGG
mmm
mmm
mmm
ppp
ppp
ppp
{{{
{{{
{{{
^^^
^^^
^^^
PPP
PPP
PPP
>>>
>>>
>>>
>>>
>>>
>>>
```
```
```
...

result:

ok 3000 lines

Test #28:

score: 0
Accepted
time: 25ms
memory: 2212kb

input:

2000
Rectangle -1000000000 -1000000000 1000000000 1000000000 @
Circle -490315023 0 1 r
Circle 871895610 0 0 4
Circle -841177075 0 2 u
Circle 336720058 0 2 2
Rectangle -349699798 -2 -349699797 0 g
Circle -80304432 0 2 >
Circle -113467414 0 0 6
Circle -803457917 0 2 v
Rectangle 425201948 0 425201950 2...

output:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...

result:

ok single line: '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'

Test #29:

score: 0
Accepted
time: 24ms
memory: 2288kb

input:

2000
Circle -134880656 771197417 229375106 %
Rectangle 871224954 -83101794 926618258 649089751 +
Circle -37168517 -305352049 996157728 s
Rectangle -436140327 650605260 597920018 831733101 ~
Rectangle 177789374 -227380176 899578749 883523913 e
Circle -60248204 -967032199 896002195 X
Rectangle -807784...

output:

=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
=
...

result:

ok 10000 lines

Test #30:

score: 0
Accepted
time: 6ms
memory: 2096kb

input:

2000
Circle 220553710 -616675403 615488599 j
Circle -363803365 -403609774 438239217 D
Rectangle -669647316 944773921 729024799 996501524 V
Circle -436315871 -425328355 618480430 f
Circle 436025441 274644315 7512790 '
Circle -41737743 77305222 867150884 1
Render -238772925 -674527453 -238772922 -6745...

output:

1111
XX
XX
XX
XX
XX
XX
XX
XX
XX
XXXXXX
XXXXXX
XXXXXX
XXXXXXXXXXXXXXX
zz
zz
zz
zz
zz
zz
zz
zz
zz
zz
zz
zz
zz
UUUU
UUUU
[
[
[
...
...
...
...
UUUU
UUUU
UUUU
UUUU
UUUU
UUUU
$$
$$
$$
$$
$$
$$
$$
$$
$$
U
dddd
''
''
''
''
''
''
''
''
''
''
''
''
k
k
k
k
ssssssss
sssssssss
EEEEE
EEEEE
E
$
$
$
JJ
JJ
JJ
JJ
J...

result:

ok 2554 lines

Test #31:

score: 0
Accepted
time: 6ms
memory: 2300kb

input:

2000
Render 386802382 -835285093 386802382 -835285089
Circle -138330335 209196288 841620723 A
Rectangle -601895561 -429232102 689793794 -194586729 4
Rectangle -479244613 621300275 -290526871 774332027 P
Rectangle 46966400 914966746 522807230 942710932 `
Circle -455631497 -215837529 264837315 .
Circl...

output:

.
.
.
.
.
....
....
....
444
444
444
444
444
444
0000000000
9999999999999
A
UUUUUUUUUUUUUUUUUUUUUUUUUUU
Z
Z
Z
Z
Z
Z
Z
Z
Z
Z
qqqqq
qqqqq
qqqqq
qqqqq
ZZZZZZZZZZZZZ
(((
(((
(((
(((
(((
(((
(((
(((
^^^^^^^^^^
^^^^^^^^^^
^
^
^
^
^
^
^
^
^
^
^
^
^
^
^
^
)
)
)
VVV
VVV
VVV
VVV
VVVVVVVVVVVVV
))
))
))
))
))
)...

result:

ok 2649 lines

Extra Test:

score: 0
Extra Test Passed