結果
| 問題 | No.179 塗り分け |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-21 00:46:40 |
| 言語 | Kuin (KuinC++ v.2021.9.17) |
| 結果 |
AC
|
| 実行時間 | 16 ms / 3,000 ms |
| コード長 | 826 bytes |
| 記録 | |
| コンパイル時間 | 1,371 ms |
| コンパイル使用メモリ | 165,824 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-05 17:05:54 |
| 合計ジャッジ時間 | 2,565 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 40 |
コンパイルメッセージ
out.cpp:676:14: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'std::shared_ptr<Array_<char16_t>>' [-Wnontrivial-memcall]
676 | memset(r->B, 0, sizeof(T) * static_cast<std::size_t>(h + bufLen_<T>()));
| ^
out.cpp:688:9: note: in instantiation of function template specialization 'newArraysRec_<std::shared_ptr<Array_<std::shared_ptr<Array_<char16_t>>>>>::operator()<long>' requested here
688 | return newArraysRec_<T>()(std::forward<A>(a)...);
| ^
out.cpp:1629:11: note: in instantiation of function template specialization 'newArrays_<std::shared_ptr<Array_<std::shared_ptr<Array_<char16_t>>>>, long>' requested here
1629 | (k_ap) = (newArrays_<type_(Array_<type_(Array_<char16_t>)>)>((k_am)));
| ^
out.cpp:676:14: note: explicitly cast the pointer to silence this warning
676 | memset(r->B, 0, sizeof(T) * static_cast<std::size_t>(h + bufLen_<T>()));
| ^
| (void*)
1 warning generated.
ソースコード
func main()
var h: int :: cui@inputInt()
var w: int :: cui@inputInt()
var s: [][]char :: #[h][]char
for i(0, h - 1)
do s[i] :: cui@input()
end for
var cnt: int :: 0
for y(0, h - 1)
for x(0, w - 1)
if(s[y][x] = '#')
do cnt :+ 1
end if
end for
end for
var ans: bool :: false
if(cnt <> 0)
for dy(0, h - 1)
for dx(-w + 1, w - 1)
if(dy = 0 & dx = 0)
skip dx
end if
var ss: [][]char :: ##s
for y(0, h - 1)
for x(0, w - 1)
if(ss[y][x] = '#')
var ny: int :: y + dy
var nx: int :: x + dx
if(ny < 0 | ny >= h | nx < 0 | nx >= w | ss[ny][nx] = '.')
skip dx
end if
do ss[ny][nx] :: '.'
end if
end for
end for
do ans :: true
break dy
end for
end for
end if
do cui@print(ans ?("YES\n", "NO\n"))
end func