結果
| 問題 | No.3677 Global Checksum |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2026-09-04 23:26:50 |
| 言語 | Rust (1.97.1 + proconio + num + itertools) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 1,110 bytes |
| 記録 | |
| コンパイル時間 | 1,911 ms |
| コンパイル使用メモリ | 198,220 KB |
| 実行使用メモリ | 75,376 KB |
| 最終ジャッジ日時 | 2026-09-04 23:26:57 |
| 合計ジャッジ時間 | 5,678 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 TLE * 1 -- * 7 |
コンパイルメッセージ
warning: unused variable: `w`
--> src/main.rs:4:17
|
4 | let (h, w): (usize, usize) = {
| ^ help: if this is intentional, prefix it with an underscore: `_w`
|
= note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default
warning: variable `A` should have a snake case name
--> src/main.rs:18:13
|
18 | let A: Vec<i64> = {
| ^ help: convert the identifier to snake case: `a`
|
= note: `#[warn(non_snake_case)]` (part of `#[warn(nonstandard_style)]`) on by default
ソースコード
const MAX:u64 =4294967295;
fn main() {
let (h, w): (usize, usize) = {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
let mut iter = line.split_whitespace();
(
iter.next().unwrap().parse().unwrap(),
iter.next().unwrap().parse().unwrap(),
)
};
let mut c: Vec<u64> = vec![0; h];
let mut s:u64=0;
for i in 0..h{
let A: Vec<i64> = {
let mut line: String = String::new();
std::io::stdin().read_line(&mut line).unwrap();
line.split_whitespace()
.map(|x| x.parse().unwrap())
.collect()
};
let mut x: u64 = 0;
for &a in &A {
x += a as u64;
x &= MAX;
}
c[i] = x;
s=(s + x) & MAX;
}
for i in 0..h{
c[i] = (s + c[i]) & MAX;
}
// 配列を出力
println!(
"{}",
c.iter()
.map(std::string::ToString::to_string)
.collect::<Vec<_>>()
.join("\n")
);
}
titia