結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
tsuchinaga
|
| 提出日時 | 2019-03-15 14:25:50 |
| 言語 | Go (1.23.4) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 676 bytes |
| コンパイル時間 | 14,007 ms |
| コンパイル使用メモリ | 218,272 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-01 19:41:17 |
| 合計ジャッジ時間 | 14,730 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 26 |
ソースコード
package main
import (
"fmt"
"math"
)
func main() {
var d int
_, _ = fmt.Scan(&d)
c := make([]int, 0)
for i := 0; i < 2; i++ {
line := ""
_, _ = fmt.Scan(&line)
for _, s := range line {
if string(s) == "x" {
c = append(c, 0)
} else {
c = append(c, 1)
}
}
}
max := 0
for i := 0; i < 14; i++ {
if c[i] == 0 {
tmp := make([]int, 14)
copy(tmp, c)
for j := i; j < int(math.Min(float64(i+d), 14)); j++ {
tmp[j] = 1
}
// fmt.Println(tmp)
cnt := 0
for j := 0; j < 14; j++ {
cnt += tmp[j]
if tmp[j] == 0 || j == 13 {
if max < cnt {
max = cnt
}
cnt = 0
}
}
}
}
fmt.Println(max)
}
tsuchinaga