結果
| 問題 | No.565 回転拡大 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-18 20:12:31 |
| 言語 | Kuin (KuinC++ v.2021.9.17) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 724 bytes |
| 記録 | |
| コンパイル時間 | 1,322 ms |
| コンパイル使用メモリ | 162,776 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-05 17:00:12 |
| 合計ジャッジ時間 | 2,395 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 30 |
コンパイルメッセージ
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:1631:11: note: in instantiation of function template specialization 'newArrays_<std::shared_ptr<Array_<std::shared_ptr<Array_<char16_t>>>>, long>' requested here
1631 | (k_ar) = (newArrays_<type_(Array_<type_(Array_<char16_t>)>)>((k_ap)));
| ^
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 r: int :: cui@inputInt()
var k: int :: cui@inputInt()
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 ww: int :: r % 180 = 0 ?(w, h)
var hh: int :: r % 180 = 0 ?(h, w)
for y(0, hh - 1)
var ans: []char :: #[ww]char
for x(0, ww - 1)
switch(r)
case 0
do ans[x] :: s[y][x]
case 90
do ans[x] :: s[ww - 1 - x][y]
case 180
do ans[x] :: s[hh - 1 - y][ww - 1 - x]
case 270
do ans[x] :: s[x][hh - 1 - y]
end switch
end for
for(1, k)
for i(0, ww - 1)
for(1, k)
do cui@print("\{ans[i]}")
end for
end for
do cui@print("\n")
end for
end for
end func