結果
| 問題 | No.420 mod2漸化式 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-04 11:03:09 |
| 言語 | Kuin (KuinC++ v.2021.9.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 543 bytes |
| 記録 | |
| コンパイル時間 | 1,480 ms |
| コンパイル使用メモリ | 166,460 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-05 17:29:49 |
| 合計ジャッジ時間 | 2,763 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 32 RE * 3 |
コンパイルメッセージ
out.cpp:676:14: warning: first argument in call to 'memset' is a pointer to non-trivially copyable type 'std::shared_ptr<Array_<long>>' [-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_<long>>>>>::operator()<long long>' requested here
688 | return newArraysRec_<T>()(std::forward<A>(a)...);
| ^
out.cpp:1613:11: note: in instantiation of function template specialization 'newArrays_<std::shared_ptr<Array_<std::shared_ptr<Array_<long>>>>, long long>' requested here
1613 | (k_am) = (newArrays_<type_(Array_<type_(Array_<int64_t>)>)>((32LL)));
| ^
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()
const nMax: int :: 31
const valueMax: int :: lib@intMax / 2
var comb: [][]int :: #[nMax + 1][]int
do comb[0] :: [1]
for n(1, nMax)
do comb[n] :: #[n + 1]int
do comb[n][0] :: 1
do comb[n][n] :: 1
for r(1, n - 1)
do comb[n][r] :: comb[n - 1][r - 1] + comb[n - 1][r]
if(comb[n][r] > valueMax)
do comb[n][r] :: valueMax
end if
end for
end for
var x: int :: cui@inputInt()
var ans: int :: comb[31][x]
var sum: int :: x = 0 ?(0, (2 ^ 31 - 1) * comb[30][x - 1])
do cui@print("\{ans} \{sum}\n")
end func