結果
| 問題 | No.250 atetubouのzetubou |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-04-04 10:42:02 |
| 言語 | Kuin (KuinC++ v.2021.9.17) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 5,000 ms |
| コード長 | 631 bytes |
| 記録 | |
| コンパイル時間 | 1,353 ms |
| コンパイル使用メモリ | 164,540 KB |
| 実行使用メモリ | 39,680 KB |
| 最終ジャッジ日時 | 2026-04-05 17:29:31 |
| 合計ジャッジ時間 | 2,820 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| 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<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:1616:11: note: in instantiation of function template specialization 'newArrays_<std::shared_ptr<Array_<std::shared_ptr<Array_<long>>>>, long long>' requested here
1616 | (k_am) = (newArrays_<type_(Array_<type_(Array_<int64_t>)>)>((3001LL)));
| ^
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 :: 3000
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 q: int :: cui@inputInt()
for(1, q)
var d: int :: cui@inputInt()
var x: int :: cui@inputInt()
var t: int :: cui@inputInt()
var ans: bool :: comb[x + d - 1][d - 1] <= t
do cui@print((ans ?("AC", "ZETUBOU")) ~ "\n")
end for
end func