#include #include #include #include #include #include #include #include using namespace DB; void NO_INLINE write(ReadBuffer & in, WriteBuffer & out, size_t size) { for (size_t i = 0; i < size; ++i) { writeIntText(i, out); writeChar(' ', out); int tmp; readIntText(tmp, in); if (in.eof() || *in.position() != '\t') return; } } int main(int, char **) { std::string str = "0\t1\t2\t3\t4\t5\t6\t7\t8\t9\t10\ta\n"; ReadBufferFromString in(str); WriteBufferFromFileDescriptor out(STDOUT_FILENO); write(in, out, 12); return 0; }