Submission #39708015
Source Code Expand
use proconio::input;
fn main() {
input! {
n: usize,
a: [usize; n],
};
let mut ans = vec![0_usize; n];
for i in 0..n - 1 {
if a[i] > a[i + 1] {
ans[i] ^= 1;
ans[i + 1] ^= 1;
}
}
for a in ans {
println!("{}", a);
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Gold and Silver |
| User | bouzuya |
| Language | Rust (1.42.0) |
| Score | 400 |
| Code Size | 308 Byte |
| Status | AC |
| Exec Time | 326 ms |
| Memory | 6996 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 400 / 400 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt |
| All | 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt, 01-001.txt, 01-002.txt, 01-003.txt, 01-004.txt, 01-005.txt, 01-006.txt, 01-007.txt, 01-008.txt, 01-009.txt, 01-010.txt, 01-011.txt, 01-012.txt, 01-013.txt, 01-014.txt, 01-015.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00-sample-001.txt | AC | 7 ms | 2060 KiB |
| 00-sample-002.txt | AC | 1 ms | 1976 KiB |
| 00-sample-003.txt | AC | 2 ms | 1984 KiB |
| 01-001.txt | AC | 1 ms | 2032 KiB |
| 01-002.txt | AC | 18 ms | 2248 KiB |
| 01-003.txt | AC | 123 ms | 3864 KiB |
| 01-004.txt | AC | 308 ms | 5436 KiB |
| 01-005.txt | AC | 153 ms | 3732 KiB |
| 01-006.txt | AC | 285 ms | 6476 KiB |
| 01-007.txt | AC | 323 ms | 6844 KiB |
| 01-008.txt | AC | 321 ms | 6872 KiB |
| 01-009.txt | AC | 323 ms | 6948 KiB |
| 01-010.txt | AC | 321 ms | 6996 KiB |
| 01-011.txt | AC | 323 ms | 5580 KiB |
| 01-012.txt | AC | 324 ms | 5596 KiB |
| 01-013.txt | AC | 321 ms | 6904 KiB |
| 01-014.txt | AC | 326 ms | 6964 KiB |
| 01-015.txt | AC | 319 ms | 5560 KiB |