Result

WA

Duration

1229ms

Code [DL]

use std::io::*;fn main(){let mut a:[u8;999]=[0;999];stdin().read(&mut a);let mut i=51;while a[i-1]!=117{a[i]=a[i]|a[i-51]|a[i-1]&1;i+=1;}stdout().write(&a);}

stdin

                                           T      
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
   K                                              

stdout

stderr

warning: unused `std::result::Result` that must be used
 --> /tmp/code.rs:1:53
  |
1 | use std::io::*;fn main(){let mut a:[u8;999]=[0;999];stdin().read(&mut a);let mut i=51;while a[i-1]!=117{a[i]=a[i]|a[i-51]|a[i-1]&1;i+=1;}stdout().write(&a);}
  |                                                     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_must_use)] on by default
  = note: this `Result` may be an `Err` variant, which should be handled

warning: unused `std::result::Result` that must be used
 --> /tmp/code.rs:1:138
  |
1 | use std::io::*;fn main(){let mut a:[u8;999]=[0;999];stdin().read(&mut a);let mut i=51;while a[i-1]!=117{a[i]=a[i]|a[i-51]|a[i-1]&1;i+=1;}stdout().write(&a);}
  |                                                                                                                                          ^^^^^^^^^^^^^^^^^^^
  |
  = note: this `Result` may be an `Err` variant, which should be handled

thread 'main' panicked at 'index out of bounds: the len is 999 but the index is 999', /tmp/code.rs:1:110
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

strace