結果
| 問題 | No.267 トランプソート |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-21 21:41:08 |
| 言語 | Kuin (KuinC++ v.2021.9.17) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 692 bytes |
| 記録 | |
| コンパイル時間 | 1,609 ms |
| コンパイル使用メモリ | 167,964 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-05 17:09:03 |
| 合計ジャッジ時間 | 2,309 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
コンパイルメッセージ
out.cpp:676:14: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'std::shared_ptr<k_ap>' [-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<k_ap>>>>::operator()<long>' requested here
688 | return newArraysRec_<T>()(std::forward<A>(a)...);
| ^
out.cpp:1636:11: note: in instantiation of function template specialization 'newArrays_<std::shared_ptr<Array_<std::shared_ptr<k_ap>>>, long>' requested here
1636 | (k_ao) = (newArrays_<type_(Array_<type_(k_ap)>)>((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.
ソースコード
const s: []char :: "DCHS"
const v: []char :: "A23456789TJQK"
func main()
var n: int :: cui@inputInt()
var a: []C :: #[n]C
for i(0, n - 1)
do a[i] :: (#C).init(cui@inputStr())
end for
do a.sort()
for i(0, n - 1)
do cui@print("\{a[i]}\{i = n - 1 ?("\n", " ")}")
end for
class C()
+var v: int
+func init(s: []char): C
for i(0, ^@s - 1)
if(@s[i] = s[0])
do me.v :+ ^@v * i
end if
end for
for i(0, ^@v - 1)
if(@v[i] = s[1])
do me.v :+ i
end if
end for
ret me
end func
+*func cmp(t: kuin@Class): int
ret me.v - (t $ C).v
end func
+*func toStr(): []char
ret "\{@s[me.v / ^@v]}\{@v[me.v % ^@v]}"
end func
end class
end func