結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-12 17:31:13 |
| 言語 | Rust (1.97.1 + proconio + num + itertools + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 0 ms / 5,000 ms |
| + 801µs | |
| コード長 | 392 bytes |
| 記録 | |
| コンパイル時間 | 2,731 ms |
| コンパイル使用メモリ | 179,940 KB |
| 実行使用メモリ | 9,804 KB |
| 最終ジャッジ日時 | 2026-10-12 17:31:21 |
| 合計ジャッジ時間 | 2,218 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
warning: unnecessary parentheses around `for` iterator expression
--> src/main.rs:8:14
|
8 | for i in (0..n){
| ^ ^
|
= note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default
help: remove these parentheses
|
8 - for i in (0..n){
8 + for i in 0..n {
|
warning: unused variable: `i`
--> src/main.rs:8:9
|
8 | 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;
fn main() {
let mut a=[0;11];
input!{
n:usize,
}
let mut ans=0;
for i in (0..n){
input!{
b: [usize;3],
}
for j in b{
if a[j]==1{
ans+=1;
}
a[j]^=1;
}
}
let mut c=0;
for i in a{
c+=i;
}
ans+=c/4;
print!("{}",ans);
}