結果

問題 No.8010 Print inside /bin
コンテスト
ユーザー tatt61880
提出日時 2020-04-17 20:30:20
言語 Kuin
(KuinC++ v.2021.9.17)
コンパイル:
kuinc -i _filename_ -o out.cpp -s /kuin/sys/ -e cpp -r -q
実行:
./a.out
結果
WA  
実行時間 -
コード長 426 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,590 ms
コンパイル使用メモリ 167,268 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-04-05 15:27:22
合計ジャッジ時間 1,996 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 long>' requested here
  688 |         return newArraysRec_<T>()(std::forward<A>(a)...);
      |                ^
out.cpp:1620:11: note: in instantiation of function template specialization 'newArrays_<std::shared_ptr<Array_<std::shared_ptr<Array_<char16_t>>>>, long long>' requested here
 1620 | (k_aq) = (newArrays_<type_(Array_<type_(Array_<char16_t>)>)>((0LL)));
      |           ^
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.

ソースコード

diff #
raw source code

var ans: [][]char
func main()
	do @ans :: #[0][]char
	do file@forEach("./bin/", true, callback, null)
	do @ans.sort()
	for i(0, ^@ans - 1)
		var s: []char :: @ans[i]
		if(s[^s - 1] = '/')
			do s :: s.sub(0, ^s - 1)
		end if
		do cui@print(s ~ "\n")
	end for
	
	func callback(path: []char, isDir: bool, data: kuin@Class): bool
		if(^path <> 6)
			do @ans :~ ["\{path.sub(6, ^path - 6)}"]
		end if
		ret true
	end func
end func
0