結果
| 問題 | No.1264 010 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-14 22:11:05 |
| 言語 | Rust (1.99.0 + proconio + num + itertools + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 423 bytes |
| 記録 | |
| コンパイル時間 | 835 ms |
| コンパイル使用メモリ | 185,672 KB |
| 実行使用メモリ | 9,928 KB |
| 最終ジャッジ日時 | 2026-10-14 22:11:15 |
| 合計ジャッジ時間 | 3,098 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 1 WA * 8 |
コンパイルメッセージ
warning: unused import: `std::collections::HashMap`
--> src/main.rs:2:5
|
2 | use std::collections::HashMap;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default
warning: unused import: `std::collections::BTreeSet`
--> src/main.rs:3:5
|
3 | use std::collections::BTreeSet;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: unnecessary parentheses around `for` iterator expression
--> src/main.rs:15:18
|
15 | for i in (0..n){
| ^ ^
|
= note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
|
15 - for i in (0..n){
15 + for i in 0..n {
|
warning: unused variable: `i`
--> src/main.rs:15:13
|
15 | for i in (0..n){
| ^ help: if this is intentional, prefix it with an underscore: `_i`
|
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
ソースコード
use proconio::input;
use std::collections::HashMap;
use std::collections::BTreeSet;
fn main(){
input!{
mut n:usize,
}
if n==0{
print!("{}",1);
} else {
let mut vec=vec!['0','1','0'];
n-=1;
let x=['0','1'];
let mut c=0;
for i in (0..n){
vec.push(x[c]);c^=1;
}
for i in vec{
print!("{}",i);
}
}
}