QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#658259 | #9481. Min Nim | ucup-team296# | AC ✓ | 3ms | 2896kb | Rust | 16.0kb | 2024-10-19 16:29:48 | 2024-10-19 16:29:49 |
Judging History
answer
// https://contest.ucup.ac/contest/1812/problem/9481
pub mod solution {
//{"name":"F. Min Nim","group":"Universal Cup - The 3rd Universal Cup. Stage 13: Sendai","url":"https://contest.ucup.ac/contest/1812/problem/9481","interactive":false,"timeLimit":1000,"tests":[{"input":"2\n3\n3 1 4\n8\n3 1 4 1 5 9 2 6\n","output":"First\nSecond\n"}],"testType":"single","input":{"type":"stdin","fileName":null,"pattern":null},"output":{"type":"stdout","fileName":null,"pattern":null},"languages":{"java":{"taskClass":"FMinNim"}}}
use crate::algo_lib::collections::iter_ext::find_count::IterFindCount;
use crate::algo_lib::io::input::Input;
use crate::algo_lib::io::output::Output;
use crate::algo_lib::misc::test_type::TaskType;
use crate::algo_lib::misc::test_type::TestType;
type PreCalc = ();
fn solve(input: &mut Input, out: &mut Output, _test_case: usize, _data: &mut PreCalc) {
let n = input.read_size();
let a = input.read_size_vec(n);
let min = *a.iter().min().unwrap();
if n % 2 == 1 || a.into_iter().count_eq(&min) % 2 == 1 {
out.print_line("First");
} else {
out.print_line("Second");
}
}
pub static TEST_TYPE: TestType = TestType::MultiNumber;
pub static TASK_TYPE: TaskType = TaskType::Classic;
pub(crate) fn run(mut input: Input, mut output: Output) -> bool {
let mut pre_calc = ();
match TEST_TYPE {
TestType::Single => solve(&mut input, &mut output, 1, &mut pre_calc),
TestType::MultiNumber => {
let t = input.read();
for i in 1..=t {
solve(&mut input, &mut output, i, &mut pre_calc);
}
}
TestType::MultiEof => {
let mut i = 1;
while input.peek().is_some() {
solve(&mut input, &mut output, i, &mut pre_calc);
i += 1;
}
}
}
output.flush();
match TASK_TYPE {
TaskType::Classic => input.is_empty(),
TaskType::Interactive => true,
}
}
}
pub mod algo_lib {
pub mod collections {
pub mod iter_ext {
pub mod find_count {
pub trait IterFindCount<T: PartialEq>: Iterator<Item = T> + Sized {
fn find_eq(mut self, item: T) -> Option<usize> {
self.position(|r| r == item)
}
fn count_eq(self, item: &T) -> usize {
self.filter(|r| r == item).count()
}
}
impl<T: PartialEq, I: Iterator<Item = T>> IterFindCount<T> for I {}
}
}
pub mod vec_ext {
pub mod default {
pub fn default_vec<T: Default>(len: usize) -> Vec<T> {
let mut v = Vec::with_capacity(len);
for _ in 0..len {
v.push(T::default());
}
v
}
}
}
}
pub mod io {
pub mod input {
use crate::algo_lib::collections::vec_ext::default::default_vec;
use std::io::Read;
pub struct Input<'s> {
input: &'s mut (dyn Read + Send),
buf: Vec<u8>,
at: usize,
buf_read: usize,
}
macro_rules! read_impl {
($t: ty, $read_name: ident, $read_vec_name: ident) => {
pub fn $read_name(&mut self) -> $t {
self.read()
}
pub fn $read_vec_name(&mut self, len: usize) -> Vec<$t> {
self.read_vec(len)
}
};
($t: ty, $read_name: ident, $read_vec_name: ident, $read_pair_vec_name: ident) => {
read_impl!($t, $read_name, $read_vec_name);
pub fn $read_pair_vec_name(&mut self, len: usize) -> Vec<($t, $t)> {
self.read_vec(len)
}
};
}
impl<'s> Input<'s> {
const DEFAULT_BUF_SIZE: usize = 4096;
pub fn new(input: &'s mut (dyn Read + Send)) -> Self {
Self {
input,
buf: default_vec(Self::DEFAULT_BUF_SIZE),
at: 0,
buf_read: 0,
}
}
pub fn new_with_size(input: &'s mut (dyn Read + Send), buf_size: usize) -> Self {
Self {
input,
buf: default_vec(buf_size),
at: 0,
buf_read: 0,
}
}
pub fn get(&mut self) -> Option<u8> {
if self.refill_buffer() {
let res = self.buf[self.at];
self.at += 1;
if res == b'\r' {
if self.refill_buffer() && self.buf[self.at] == b'\n' {
self.at += 1;
}
return Some(b'\n');
}
Some(res)
} else {
None
}
}
pub fn peek(&mut self) -> Option<u8> {
if self.refill_buffer() {
let res = self.buf[self.at];
Some(if res == b'\r' { b'\n' } else { res })
} else {
None
}
}
pub fn skip_whitespace(&mut self) {
while let Some(b) = self.peek() {
if !b.is_ascii_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 c.is_ascii_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()
}
//noinspection RsSelfConvention
pub fn is_empty(&mut self) -> bool {
self.skip_whitespace();
self.is_exhausted()
}
pub fn read<T: Readable>(&mut self) -> T {
T::read(self)
}
pub fn read_vec<T: Readable>(&mut self, size: usize) -> Vec<T> {
let mut res = Vec::with_capacity(size);
for _ in 0..size {
res.push(self.read());
}
res
}
pub fn read_char(&mut self) -> u8 {
self.skip_whitespace();
self.get().unwrap()
}
read_impl!(u32, read_unsigned, read_unsigned_vec);
read_impl!(u64, read_u64, read_u64_vec);
read_impl!(usize, read_size, read_size_vec, read_size_pair_vec);
read_impl!(i32, read_int, read_int_vec, read_int_pair_vec);
read_impl!(i64, read_long, read_long_vec, read_long_pair_vec);
read_impl!(i128, read_i128, read_i128_vec);
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
}
}
}
pub trait Readable {
fn read(input: &mut Input) -> Self;
}
impl Readable for u8 {
fn read(input: &mut Input) -> Self {
input.read_char()
}
}
impl<T: Readable> Readable for Vec<T> {
fn read(input: &mut Input) -> Self {
let size = input.read();
input.read_vec(size)
}
}
macro_rules! read_integer {
($($t:ident)+) => {$(
impl Readable for $t {
fn read(input: &mut Input) -> Self {
input.skip_whitespace();
let mut c = input.get().unwrap();
let sgn = match c {
b'-' => {
c = input.get().unwrap();
true
}
b'+' => {
c = input.get().unwrap();
false
}
_ => false,
};
let mut res = 0;
loop {
assert!(c.is_ascii_digit());
res *= 10;
let d = (c - b'0') as $t;
if sgn {
res -= d;
} else {
res += d;
}
match input.get() {
None => break,
Some(ch) => {
if ch.is_ascii_whitespace() {
break;
} else {
c = ch;
}
}
}
}
res
}
}
)+};
}
read_integer!(i8 i16 i32 i64 i128 isize u16 u32 u64 u128 usize);
macro_rules! tuple_readable {
($($name:ident)+) => {
impl<$($name: Readable), +> Readable for ($($name,)+) {
fn read(input: &mut Input) -> Self {
($($name::read(input),)+)
}
}
}
}
tuple_readable! {T}
tuple_readable! {T U}
tuple_readable! {T U V}
tuple_readable! {T U V X}
tuple_readable! {T U V X Y}
tuple_readable! {T U V X Y Z}
tuple_readable! {T U V X Y Z A}
tuple_readable! {T U V X Y Z A B}
tuple_readable! {T U V X Y Z A B C}
tuple_readable! {T U V X Y Z A B C D}
tuple_readable! {T U V X Y Z A B C D E}
tuple_readable! {T U V X Y Z A B C D E F}
impl Read for Input<'_> {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
if self.at == self.buf_read {
self.input.read(buf)
} else {
let mut i = 0;
while i < buf.len() && self.at < self.buf_read {
buf[i] = self.buf[self.at];
i += 1;
self.at += 1;
}
Ok(i)
}
}
}
}
pub mod output {
use crate::algo_lib::collections::vec_ext::default::default_vec;
use std::cmp::Reverse;
use std::io::stderr;
use std::io::Stderr;
use std::io::Write;
#[derive(Copy, Clone)]
pub enum BoolOutput {
YesNo,
YesNoCaps,
PossibleImpossible,
Custom(&'static str, &'static str),
}
impl BoolOutput {
pub fn output(&self, output: &mut Output, val: bool) {
(if val { self.yes() } else { self.no() }).write(output);
}
fn yes(&self) -> &str {
match self {
BoolOutput::YesNo => "Yes",
BoolOutput::YesNoCaps => "YES",
BoolOutput::PossibleImpossible => "Possible",
BoolOutput::Custom(yes, _) => yes,
}
}
fn no(&self) -> &str {
match self {
BoolOutput::YesNo => "No",
BoolOutput::YesNoCaps => "NO",
BoolOutput::PossibleImpossible => "Impossible",
BoolOutput::Custom(_, no) => no,
}
}
}
pub struct Output<'s> {
output: &'s mut dyn Write,
buf: Vec<u8>,
at: usize,
auto_flush: bool,
bool_output: BoolOutput,
}
impl<'s> Output<'s> {
const DEFAULT_BUF_SIZE: usize = 4096;
pub fn new(output: &'s mut dyn Write) -> Self {
Self {
output,
buf: default_vec(Self::DEFAULT_BUF_SIZE),
at: 0,
auto_flush: false,
bool_output: BoolOutput::YesNoCaps,
}
}
pub fn new_with_auto_flush(output: &'s mut dyn Write) -> Self {
Self {
output,
buf: default_vec(Self::DEFAULT_BUF_SIZE),
at: 0,
auto_flush: true,
bool_output: BoolOutput::YesNoCaps,
}
}
pub fn flush(&mut self) {
if self.at != 0 {
self.output.write_all(&self.buf[..self.at]).unwrap();
self.output.flush().unwrap();
self.at = 0;
}
}
pub fn print<T: Writable>(&mut self, s: T) {
s.write(self);
self.maybe_flush();
}
pub fn print_line<T: Writable>(&mut self, s: T) {
self.print(s);
self.put(b'\n');
self.maybe_flush();
}
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]) {
self.print_per_line_iter(arg.iter());
}
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_line_iter<T: Writable, I: Iterator<Item = T>>(&mut self, iter: I) {
self.print_iter(iter);
self.put(b'\n');
}
pub fn print_per_line_iter<T: Writable, I: Iterator<Item = T>>(&mut self, iter: I) {
for e in iter {
e.write(self);
self.put(b'\n');
}
}
pub fn set_bool_output(&mut self, bool_output: BoolOutput) {
self.bool_output = bool_output;
}
}
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;
}
self.maybe_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 Writable for u8 {
fn write(&self, output: &mut Output) {
output.put(*self);
}
}
impl<T: Writable> Writable for [T] {
fn write(&self, output: &mut Output) {
output.print_iter(self.iter());
}
}
impl<T: Writable, const N: usize> Writable for [T; N] {
fn write(&self, output: &mut Output) {
output.print_iter(self.iter());
}
}
impl<T: Writable + ?Sized> Writable for &T {
fn write(&self, output: &mut Output) {
T::write(self, output)
}
}
impl<T: Writable> Writable for Vec<T> {
fn write(&self, output: &mut Output) {
self.as_slice().write(output);
}
}
impl Writable for () {
fn write(&self, _output: &mut 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!(u16 u32 u64 u128 usize i8 i16 i32 i64 i128 isize);
macro_rules! tuple_writable {
($name0:ident $($name:ident: $id:tt )*) => {
impl<$name0: Writable, $($name: Writable,)*> Writable for ($name0, $($name,)*) {
fn write(&self, out: &mut Output) {
self.0.write(out);
$(
out.put(b' ');
self.$id.write(out);
)*
}
}
}
}
tuple_writable! {T}
tuple_writable! {T U:1}
tuple_writable! {T U:1 V:2}
tuple_writable! {T U:1 V:2 X:3}
tuple_writable! {T U:1 V:2 X:3 Y:4}
tuple_writable! {T U:1 V:2 X:3 Y:4 Z:5}
tuple_writable! {T U:1 V:2 X:3 Y:4 Z:5 A:6}
tuple_writable! {T U:1 V:2 X:3 Y:4 Z:5 A:6 B:7}
tuple_writable! {T U:1 V:2 X:3 Y:4 Z:5 A:6 B:7 C:8}
impl<T: Writable> Writable for Option<T> {
fn write(&self, output: &mut Output) {
match self {
None => (-1).write(output),
Some(t) => t.write(output),
}
}
}
impl Writable for bool {
fn write(&self, output: &mut Output) {
let bool_output = output.bool_output;
bool_output.output(output, *self)
}
}
impl<T: Writable> Writable for Reverse<T> {
fn write(&self, output: &mut Output) {
self.0.write(output);
}
}
static mut ERR: Option<Stderr> = None;
pub fn err() -> Output<'static> {
unsafe {
if ERR.is_none() {
ERR = Some(stderr());
}
Output::new_with_auto_flush(ERR.as_mut().unwrap())
}
}
}
}
pub mod misc {
pub mod test_type {
pub enum TestType {
Single,
MultiNumber,
MultiEof,
}
pub enum TaskType {
Classic,
Interactive,
}
}
}
}
fn main() {
let mut sin = std::io::stdin();
let input = algo_lib::io::input::Input::new(&mut sin);
let mut stdout = std::io::stdout();
let output = algo_lib::io::output::Output::new(&mut stdout);
solution::run(input, output);
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 2060kb
input:
2 3 3 1 4 8 3 1 4 1 5 9 2 6
output:
First Second
result:
ok 2 tokens
Test #2:
score: 0
Accepted
time: 3ms
memory: 2704kb
input:
1 100000 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 825605713 8...
output:
Second
result:
ok "Second"
Test #3:
score: 0
Accepted
time: 3ms
memory: 2684kb
input:
1 99999 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 80011714 8001...
output:
First
result:
ok "First"
Test #4:
score: 0
Accepted
time: 2ms
memory: 2428kb
input:
1 78425 68217 42000 55359 54442 49297 40030 519 53351 51488 77091 60533 19838 56156 25791 74518 20632 19144 65724 72247 50453 36895 63836 10801 66715 40374 44054 3217 33986 8221 8788 13517 70202 73285 10081 70046 28329 5125 12397 35407 40647 58512 18791 65149 10893 20811 65951 42479 72915 4876 74362...
output:
First
result:
ok "First"
Test #5:
score: 0
Accepted
time: 2ms
memory: 2380kb
input:
1 69098 27088 61575 24263 46325 34362 14135 54594 9913 68664 52710 63218 53742 24588 40288 28273 48305 11086 17622 67877 36595 15036 10490 56916 51589 47589 24068 25642 32137 51847 31661 22753 11345 62378 46432 8939 29319 63388 5644 1824 26407 15890 42482 31743 24179 35707 39181 1080 44846 65762 128...
output:
First
result:
ok "First"
Test #6:
score: 0
Accepted
time: 2ms
memory: 2896kb
input:
1 89686 29385 43836 41035 40615 33516 44816 11696 6796 14120 22703 24107 15943 12712 13466 16401 41739 43020 27407 15879 30708 12915 3570 43781 38302 3346 14786 22832 28928 37937 24684 22166 10116 13094 19379 1254 17197 28815 8187 17469 6276 15169 40474 44731 15607 4231 9871 40634 36378 4223 22367 1...
output:
Second
result:
ok "Second"
Test #7:
score: 0
Accepted
time: 0ms
memory: 2136kb
input:
1 1892 441 240 207 247 245 781 609 91 589 264 198 857 203 301 774 651 51 582 251 916 341 118 460 524 627 668 528 501 235 303 320 172 820 376 918 74 880 192 724 567 872 902 114 179 575 889 844 261 853 196 784 554 595 306 319 724 740 206 421 348 51 831 727 580 276 53 585 765 326 884 872 709 311 268 93...
output:
Second
result:
ok "Second"
Test #8:
score: 0
Accepted
time: 1ms
memory: 2116kb
input:
1 29519 344655803 344655803 488700102 344655803 344655803 344655803 437875513 344655803 995261600 344655803 344655803 344655803 344655803 344655803 829085853 344655803 344655803 344655803 344655803 344655803 344655803 344655803 344655803 344655803 344655803 847109453 344655803 344655803 344655803 34...
output:
First
result:
ok "First"
Test #9:
score: 0
Accepted
time: 3ms
memory: 2672kb
input:
1 91077 737359116 841674337 737359116 737359116 737359116 737359116 771086155 737359116 737359116 737359116 737359116 737359116 737359116 855009405 737359116 737359116 737359116 762093255 737359116 789625353 737359116 737359116 794610552 737359116 737359116 737359116 792739610 737359116 737359116 81...
output:
First
result:
ok "First"
Test #10:
score: 0
Accepted
time: 0ms
memory: 2416kb
input:
1 61733 566808123 472696215 472696215 713247896 831329805 935724855 472696215 505929087 472696215 472696215 753367519 857157241 829476044 472696215 472696215 856152057 472696215 472696215 472696215 472696215 472696215 472696215 472696215 472696215 574948527 472696215 472696215 836489787 735478160 47...
output:
First
result:
ok "First"
Test #11:
score: 0
Accepted
time: 3ms
memory: 2856kb
input:
1 97224 914613953 928017814 786769828 818278999 399101777 420460874 772964649 492709788 399101777 829706284 399101777 399101777 678756434 399101777 399101777 974404214 803205678 416904341 490304284 504487476 399101777 844036508 399101777 529406511 558923506 629894844 481644246 399101777 777533620 89...
output:
Second
result:
ok "Second"
Test #12:
score: 0
Accepted
time: 0ms
memory: 2528kb
input:
1 78463 617715983 199123118 199123118 199123118 199123118 199123118 199123118 199123118 199123118 332567524 199123118 199123118 199123118 199123118 199123118 199123118 851075520 199123118 199123118 199123118 199123118 199123118 199123118 199123118 199123118 199123118 199123118 648102149 199123118 19...
output:
First
result:
ok "First"
Test #13:
score: 0
Accepted
time: 2ms
memory: 2536kb
input:
1 50394 938481058 938481058 975950090 938481058 938481058 938481058 938481058 938481058 938481058 976795174 938481058 938481058 938481058 938481058 938481058 952857082 938481058 995516241 938481058 938481058 938481058 964057473 938481058 967119221 995304010 939424769 938481058 965505732 938481058 93...
output:
First
result:
ok "First"
Test #14:
score: 0
Accepted
time: 2ms
memory: 2632kb
input:
1 52521 367840899 710851509 367840899 367840899 367840899 611838415 367840899 865818441 367840899 367840899 367840899 367840899 536183635 367840899 367840899 367840899 764139535 367840899 367840899 367840899 367840899 367840899 847885966 367840899 871182084 367840899 367840899 995251125 367840899 36...
output:
First
result:
ok "First"
Test #15:
score: 0
Accepted
time: 3ms
memory: 2436kb
input:
1 79402 920267727 844540629 844540629 881730437 955831494 844540629 844540629 844540629 844540629 844540629 913619280 862813120 983275449 844540629 844540629 991711458 896901627 844540629 982521205 848144836 844540629 872858260 844540629 844540629 844540629 844540629 851042051 844540629 844540629 84...
output:
First
result:
ok "First"
Test #16:
score: 0
Accepted
time: 3ms
memory: 2704kb
input:
1 86352 764435916 448124079 631581933 650980393 603999447 402962974 779325908 791317340 450073776 660308742 637189829 456481766 654087764 974639543 883423113 659836385 877252502 730623254 536277763 500309472 982940963 588353653 668366633 492069987 750818737 383650573 605215328 590075493 559150585 63...
output:
First
result:
ok "First"
Test #17:
score: 0
Accepted
time: 0ms
memory: 2192kb
input:
1 10470 740419959 740419959 955610063 839009125 740419959 740419959 755261979 740419959 985133372 841588182 876381293 954882860 943120392 898619632 740419959 824046831 747921545 740419959 890934229 740419959 767047662 740419959 876091677 933013291 802621538 740419959 860403243 924287768 740419959 74...
output:
First
result:
ok "First"
Test #18:
score: 0
Accepted
time: 0ms
memory: 2160kb
input:
1972 82 822141026 675100982 26855093 26855093 120204950 322165579 602625623 660891600 960259208 26855093 26855093 753455633 176682800 480633850 126440186 26855093 479890204 127459596 266525805 434798933 136908447 936845242 26855093 55347874 160886164 892096933 795675298 58849617 310882207 33833085 2...
output:
First First Second First Second First First First First First First First First First First First First Second First First First Second First First First Second First First First Second First First First First First Second First Second First First First First First Second Second First First First Fi...
result:
ok 1972 tokens
Test #19:
score: 0
Accepted
time: 3ms
memory: 2240kb
input:
1983 79 466149729 466149729 466149729 466149729 736003741 466149729 466149729 466149729 466149729 688801860 466149729 466149729 466149729 466149729 774660401 466149729 684841445 466149729 466149729 784975677 466149729 466149729 466149729 466149729 981647005 466149729 752214872 843201167 511642394 46...
output:
First Second Second First First Second First Second First First Second First Second First First First First Second Second First Second First First First First Second First First First First First First Second Second First Second First First First First First First First Second First Second First Fir...
result:
ok 1983 tokens
Test #20:
score: 0
Accepted
time: 3ms
memory: 2088kb
input:
1984 81 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 217444072 21...
output:
First Second First First First First First First First First First First First First First Second First First First First First First First Second First Second First Second First Second First First First First Second First First First Second Second First Second First Second First First First First S...
result:
ok 1984 tokens
Test #21:
score: 0
Accepted
time: 0ms
memory: 2176kb
input:
1974 43 770952908 740021488 740021488 809623066 775797885 740021488 740021488 740021488 740021488 970384474 740021488 802772847 935425043 896564919 740021488 740021488 740021488 740021488 740021488 740021488 863123021 740021488 862151459 740021488 740021488 740021488 922989800 857417643 975202349 86...
output:
First Second First First First First First Second First First First Second First First First First First First First First First First First First First First First First Second First Second First First First First First First First Second Second First First Second Second Second First First First Fi...
result:
ok 1974 tokens
Test #22:
score: 0
Accepted
time: 3ms
memory: 2128kb
input:
1973 53 918426918 842825241 779845325 922542022 815889863 932033425 878404930 862946484 853000223 908399902 961996273 814051943 849711445 965035802 935046293 803990423 775582918 865304054 985119769 998563680 866379010 862937153 912992385 917826099 998939929 761018584 931338940 810165148 816173024 84...
output:
First Second First Second Second First First First Second Second First First Second First First Second First First First First First First First First First First First First First Second First First First First Second Second First First First First First First First Second Second First First First ...
result:
ok 1973 tokens
Extra Test:
score: 0
Extra Test Passed