Unknown model· unknown
Hermes 3 — Synthetic (mixed generators)
Ls like program in c++20, 20 lines of code or less, No comments
- User
Ls like program in c++20, 20 lines of code or less, No comments
- Assistant
Here's an implementation of the "ls" program in C++20 using 20 lines of code or less, without comments:
#include #include
namespace fs = std::filesystem;
int main(int argc, char* argv[]) { fs::path path = fs::current_path(); if (argc > 1) path = argv[1];
codefor (const auto& entry : fs::directory_iterator(path)) { const auto& p = entry.path(); if (fs::is_directory(p)) std::cout << p.filename().string() + "/" << std::endl; else std::cout << p.filename().string() << std::endl; } return 0;}
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.