#include #include #include /* rearrange things so instead of 0 1 0 2 0 3 1 4 1 5 1 6 we just print 0 1 2 3 1 4 5 6 */ int main(void) { uint32_t dac, adc; uint32_t olddac; int first = 1; while(1) { scanf("%d %d", &dac, &adc); if (feof(stdin)) break; if (first) { printf("%ld ", dac); first = 0; } else if (dac != olddac) { printf("\n%ld ", dac); } else { printf(" "); } printf("%ld", adc); olddac = dac; } printf("\n"); return 0; }