buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <algorithm> #include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; cout << min(x, y) << max(x, y) << endl; } return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; cout << min(x, y) << " " << max(x, y) << endl; } return 0; }
[["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
64
#include <iostream> using namespace std; int main() { int x, y; while (cin >> x >> y) { if (x == 0 && y == 0) break; if (x < y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } return 0; } }
#include <iostream> using namespace std; int main() { int x, y; while (cin >> x >> y) { if (x == 0 && y == 0) break; if (x < y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } } return 0; }
[["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
1
77
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) { break; } if (x < y) { cout << x << " " << y << "\n"; } else if (x > y) { cout << y << " " << x << "\n"; } } }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) { break; } if (x <= y) { cout << x << " " << y << "\n"; } else if (x > y) { cout << y << " " << x << "\n"; } } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
88
#include <iostream> using namespace std; int main() { int x[3000]; int y[3000]; int i; for (i = 0; i < 3000; i++) { cin >> x[i]; cin >> y[i]; if (x[i] == 0 && y[i] == 0) break; } for (int a = 0; a < i; a++) { if (x[i] < y[i]) cout << x[i] << " " << y[i] << endl; else ...
#include <iostream> using namespace std; int main() { int x[3000]; int y[3000]; int i; for (i = 0; i < 3000; i++) { cin >> x[i]; cin >> y[i]; if (x[i] == 0 && y[i] == 0) break; } for (int a = 0; a < i; a++) { if (x[a] < y[a]) cout << x[a] << " " << y[a] << endl; else ...
[["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["-", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22], ["-", 31, 16, 31, 16, 12, 69, 341, 342, 0, 22], ["+", 31, 16, 31, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 16, 31, 16, 12, 69...
1
139
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { int x[3000], y[3000], i = 0, c, temp; while (1) { scanf("%d %d", &x[i], &y[i]); if (0 == x[i] || 0 == y[i]) { c = i; break; } if (x[i] > y[i]) { temp = x[i]; x[i] = y[i]; y[i] = temp; } i++; } ...
#define _CRT_SECURE_NO_WARNINGS #include <stdio.h> int main() { int x[3000], y[3000], i = 0, c, temp; while (1) { scanf("%d %d", &x[i], &y[i]); if (0 == x[i] && 0 == y[i]) { c = i; break; } if (x[i] > y[i]) { temp = x[i]; x[i] = y[i]; y[i] = temp; } i++; } ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
152
#include <iostream> using namespace std; int main() { int x, y, t; while (1) { cin >> x >> y; if (x == y && x == 0) break; if (x > y) { t = y; y = x; x = t; } cout << x << " " << y; } return 0; }
#include <iostream> using namespace std; int main() { int x, y, t; while (1) { cin >> x >> y; if (x == y && x == 0) break; if (x > y) { t = y; y = x; x = t; } cout << x << " " << y << endl; } return 0; }
[["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]]
1
76
#include <iostream> using namespace std; int main() { int x, y; while (cin >> x >> y) { if (x == 0 && y == 0) return 0; if (x <= y) cout << y << " " << x << endl; else if (y <= x) cout << x << " " << y << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (cin >> x >> y) { if (x == 0 && y == 0) return 0; if (x <= y) cout << x << " " << y << endl; else if (y <= x) cout << y << " " << x << endl; } return 0; }
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 57, 64, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 57, 64, 1, 0, 16, 31, 16, 12, 22]]
1
80
#include <iostream> int main() { for (int x, y;;) { std::cin >> x >> y; if (x == y == 0) break; if (x < y) std::cout << x << ' ' << y << '\n'; else std::cout << y << ' ' << x << '\n'; } }
#include <iostream> int main() { for (int x, y;;) { std::cin >> x >> y; if (x == 0 && y == 0) break; if (x < y) std::cout << x << ' ' << y << '\n'; else std::cout << y << ' ' << x << '\n'; } }
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
76
#include <algorithm> #include <cstdio> #include <utility> using namespace std; int main() { int x, y; int count = 0; pair<int, int> data[3000]; while (1) { scanf("%d", &x); scanf("%d", &y); if (x == 0 && y == 0) { break; } data[count].first = max(x, y); data[count].second = min(x,...
#include <algorithm> #include <cstdio> #include <utility> using namespace std; int main() { int x, y; int count = 0; pair<int, int> data[3000]; while (1) { scanf("%d", &x); scanf("%d", &y); if (x == 0 && y == 0) { break; } data[count].first = min(x, y); data[count].second = max(x,...
[["-", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 37, 0, 35]]
1
146
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x; cin >> y; if ((x == 0) && (y == 0)) break; if (x > y) { cout << y << ' ' << x << endl; } else if (x < y) { cout << x << ' ' << y << endl; } } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x; cin >> y; if ((x == 0) && (y == 0)) { break; } if (x >= y) { cout << y << ' ' << x << endl; } else if (x < y) { cout << x << ' ' << y << endl; } } return 0; }
[["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 52, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
91
#include <stdio.h> int main() { int i; int x[10000], y[10000]; // input dataset for (i = 0; i < 10000; i++) { scanf("%d %d", &x[i], &y[i]); if (!(x[i] || y[i])) break; } // outputs for (i = 0; i < 10000 && (x[i] || y[i]); i++) { if (x > y) printf("%d %d\n", y[i], x[i]); else...
#include <stdio.h> int main() { int i; int x[10000], y[10000]; // input dataset for (i = 0; i < 10000; i++) { scanf("%d %d", &x[i], &y[i]); if (!(x[i] || y[i])) break; } // outputs for (i = 0; i < 10000 && (x[i] || y[i]); i++) { if (x[i] > y[i]) printf("%d %d\n", y[i], x[i]); ...
[["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 70], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 70], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 12, 69, 341, 342, 0, 73]]
1
148
#include <algorithm> #include <iostream> using namespace std; int main() { int a, b; while (cin >> a >> b && a != 0 && b != 0) { if (a > b) swap(a, b); cout << a << " " << b << endl; } }
#include <algorithm> #include <iostream> using namespace std; int main() { int a, b; while (cin >> a >> b && (a != 0 || b != 0)) { if (a > b) swap(a, b); cout << a << " " << b << endl; } }
[["+", 0, 52, 15, 339, 51, 16, 12, 23, 0, 24], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 17, 106], ["+", 0, 52, 15, 339, 51, 16, 12, 23, 0, 25]]
1
62
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) { return 0; } if (x <= y) { cout << x << " " << y << "\n"; } if (y < x) { cout << y << " " << x << "\n"; } break; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) { return 0; } if (x <= y) { cout << x << " " << y << "\n"; } if (x > y) { cout << y << " " << x << "\n"; } } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["-", 8, 9, 0, 52, 8, 9, 0, 93, 0, 94], ["-", 8, 9, 0, 52, 8, 9, 0, 93, 0, 35]]
1
93
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; while (x != 0 && y != 0) { if (x < y) cout << x << " " << y << endl; else cout << y << " " << x << endl; cin >> x >> y; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; while (x != 0 || y != 0) { if (x < y) cout << x << " " << y << endl; else cout << y << " " << x << endl; cin >> x >> y; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
75
#include <iostream> using namespace std; int main() { int in1, in2; cin >> in1 >> in2; while ((in1 != 0) && (in2 != 0)) { if (in1 < in2) cout << in1 << ' ' << in2 << endl; else cout << in2 << ' ' << in1 << endl; cin >> in1, in2; } return 0; }
#include <iostream> using namespace std; int main() { int in1, in2; cin >> in1 >> in2; while ((in1 != 0) || (in2 != 0)) { if (in1 < in2) cout << in1 << ' ' << in2 << endl; else cout << in2 << ' ' << in1 << endl; cin >> in1 >> in2; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106], ["-", 0, 52, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 152]]
1
79
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; while (x != 0 && y != 0) { if (x >= y) cout << y << " " << x << "\n"; else cout << x << " " << y << "\n"; cin >> x >> y; } }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; while (x != 0 || y != 0) { if (x >= y) cout << y << " " << x << "\n"; else cout << x << " " << y << "\n"; cin >> x >> y; } }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
76
#include <stdio.h> #include <utility> using std::swap; int main() { int x, y; scanf("%d %d", &x, &y); while (!(x == 0 && y == 0)) { swap(x, y); printf("%d %d\n", x, y); scanf("%d %d", &x, &y); } return 0; }
#include <stdio.h> #include <utility> using std::swap; int main() { int x, y; scanf("%d %d", &x, &y); while (!(x == 0 && y == 0)) { if (y < x) swap(x, y); printf("%d %d\n", x, y); scanf("%d %d", &x, &y); } return 0; }
[["+", 8, 9, 0, 52, 8, 9, 0, 57, 0, 121], ["+", 0, 52, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 0, 52, 8, 9, 0, 57, 15, 339, 0, 25]]
1
83
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> #define REP(i, a) for (int i = 0; i < (int)a; ++i) typedef long long ll; typedef long double ld; using namespace std; int x, y; void solver() { while (cin >> x >> y) { if (x != 0 && y != 0) { if (x < y) co...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> #define REP(i, a) for (int i = 0; i < (int)a; ++i) typedef long long ll; typedef long double ld; using namespace std; int x, y; void solver() { while (cin >> x >> y) { if (x != 0 || y != 0) { if (x < y) co...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]]
1
112
#include <stdio.h> int main() { int x, y, d, i = 0; while (1) { i++; if (i == 3001) break; scanf("%d %d", &x, &y); if (x == 0 && y == 0) break; if (x > y) { d = x; x = y; y = d; } printf("%d %d", x, y); } return 0; }
#include <stdio.h> int main() { int x, y, d, i = 0; while (1) { i++; if (i == 3001) break; scanf("%d %d", &x, &y); if (x == 0 && y == 0) break; if (x > y) { d = x; x = y; y = d; } printf("%d %d\n", x, y); } return 0; }
[["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]]
1
95
#include <stdio.h> int change(int *a, int *b) { int temp; if (*a > *b) { temp = *a; *a = *b; *b = temp; } return 0; } int main(void) { int i, j, x, y; int a[3000][2]; for (i = 0;; i++) { scanf("%d %d", &x, &y); if (x == 0 && y == 0) { break; } a[i][0] = x; a[i]...
#include <stdio.h> int change(int *a, int *b) { int temp; if (*a > *b) { temp = *a; *a = *b; *b = temp; } return 0; } int main(void) { int i, j, x, y; int a[3000][2]; for (i = 0;; i++) { scanf("%d %d", &x, &y); if (x == 0 && y == 0) { break; } a[i][0] = x; a[i]...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
190
#include <stdio.h> int main() { int a, b, t; while (1) { scanf("%d %d\n", &a, &b); if (a == 0) return 0; if (a > b) { t = a; a = b; b = t; } printf("%d %d\n", a, b); } }
#include <stdio.h> int main() { int a, b, t; while (1) { scanf("%d %d\n", &a, &b); if (a == 0 && b == 0) return 0; if (a > b) { t = a; a = b; b = t; } printf("%d %d\n", a, b); } }
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
76
#include <iostream> using namespace std; int main() { int x = 1, y = 1; while (1) { cin >> x >> y; if (x == 0 && y == 0) { break; } else { continue; } if (x >= y) { cout << y << " " << x << "\n"; } else { cout << x << " " << y << "\n"; } } return 0; }
#include <iostream> using namespace std; int main() { int x = 1, y = 1; while (1) { cin >> x >> y; if (x == 0 && y == 0) { break; } else { if (x >= y) { cout << y << " " << x << "\n"; } else { cout << x << " " << y << "\n"; } } } return 0; }
[["-", 0, 57, 75, 76, 0, 9, 0, 116, 0, 117], ["-", 0, 57, 75, 76, 0, 9, 0, 116, 0, 35], ["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46], ["+", 0, 9, 0, 57, 75, 76, 0, 9, 0, 46]]
1
94
#include <iostream> int main() { int a, b, buf; std::cin >> a >> b; while (a != 0 || a != 0) { if (a > b) { buf = a; a = b; b = buf; } std::cout << a << ' ' << b << std::endl; std::cin >> a >> b; } return 0; }
#include <iostream> int main() { int a, b, buf; std::cin >> a >> b; while (a != 0 || b != 0) { if (a > b) { buf = a; a = b; b = buf; } std::cout << a << ' ' << b << std::endl; std::cin >> a >> b; } return 0; }
[["-", 0, 52, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 31, 22]]
1
82
#include <cstdio> int main() { int a, b; while (scanf("%d%d", &a, &b) != EOF) { if (a == 0 && b == 0) break; if (b > a) printf("%d %d\n", b, a); else printf("%d %d\n", a, b); } }
#include <cstdio> int main() { int a, b; while (scanf("%d%d", &a, &b) != EOF) { if (a == 0 && b == 0) break; if (b < a) printf("%d %d\n", b, a); else printf("%d %d\n", a, b); } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]]
1
75
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; while (x != 0 && y != 0) { if (x > y) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } cin >> x >> y; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; while (x != 0 || y != 0) { if (x > y) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } cin >> x >> y; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
79
#include <stdio.h> int main(void) { int y, x; while (1) { scanf("%d%d", &x, &y); if (!x && !y) break; printf("%d %d\n", x > y ? x : y, x < y ? x : y); } return 0; }
#include <stdio.h> int main(void) { int y, x; while (1) { scanf("%d%d", &x, &y); if (!x && !y) break; printf("%d %d\n", x < y ? x : y, x > y ? x : y); } return 0; }
[["-", 0, 2, 3, 4, 0, 41, 15, 16, 17, 47], ["+", 0, 2, 3, 4, 0, 41, 15, 16, 17, 18], ["-", 0, 2, 3, 4, 0, 41, 15, 16, 17, 18], ["+", 0, 2, 3, 4, 0, 41, 15, 16, 17, 47]]
1
70
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; while (a != 0 and b != 0) { if (b < a) { swap(a, b); cout << a << " " << b << endl; cin >> a >> b; } else { cout << a << " " << b << endl; cin >> a >> b; } } return 0; }
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; while (a != 0 or b != 0) { if (b < a) { swap(a, b); cout << a << " " << b << endl; cin >> a >> b; } else { cout << a << " " << b << endl; cin >> a >> b; } } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 355], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 354]]
1
92
#include <iostream> using namespace std; int main() { int x, y, z; cin >> x >> y; while (x != 0 && y != 0) { if (x > y) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } cin >> x >> y; } }
#include <iostream> using namespace std; int main() { int x, y, z; cin >> x >> y; while (x != 0 || y != 0) { if (x > y) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } cin >> x >> y; } }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
78
#include <stdio.h> int main(void) { int a, b; for (scanf("%d %d", &a, &b); a != 0 && b != 0; scanf("%d %d", &a, &b)) { printf("%d %d\n", (a < b) ? a : b, (b < a) ? a : b); } return 0; }
#include <stdio.h> int main(void) { int a, b; for (scanf("%d %d", &a, &b); a != 0 || b != 0; scanf("%d %d", &a, &b)) { printf("%d %d\n", (a < b) ? a : b, (b < a) ? a : b); } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 98], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 106]]
1
83
#include <iostream> using namespace std; int main() { int x = 1; int y = 1; cin >> x >> y; while (x != 0 && y != 0) { if (x < y) { cout << x << ' ' << y << '\n'; } else { cout << y << ' ' << x << '\n'; } cin >> x >> y; } return 0; }
#include <iostream> using namespace std; int main() { int x = 1; int y = 1; cin >> x >> y; while (x != 0 || y != 0) { if (x < y) { cout << x << ' ' << y << '\n'; } else { cout << y << ' ' << x << '\n'; } cin >> x >> y; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
88
#include <iostream> using namespace std; int main() { int x = -1, y = -1; while ((x != 0) && (y != 0)) { cin >> x >> y; if ((x == 0) && (y == 0)) { break; } else if (x <= y) { cout << x << ' ' << y << endl; } else { cout << y << ' ' << x << endl; } } }
#include <iostream> using namespace std; int main() { int x = -1, y = -1; while ((x != 10001) && (y != 10001)) { cin >> x >> y; if ((x == 0) && (y == 0)) { break; } else if (x <= y) { cout << x << ' ' << y << endl; } else { cout << y << ' ' << x << endl; } } }
[["-", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 23, 0, 16, 12, 13], ["-", 15, 339, 51, 16, 12, 23, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 12, 13]]
1
97
#include <bits/stdc++.h> using namespace std; int main() { int a, b; a = b = 1; while (a != 0 || b != 0) { cin >> a >> b; if (b < a) swap(a, b); if (a != 0 && b != 0) cout << a << " " << b << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int a, b; a = b = 1; while (a != 0 || b != 0) { cin >> a >> b; if (b < a) swap(a, b); if (a != 0 || b != 0) cout << a << " " << b << endl; } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]]
1
76
#include <cmath> #include <iostream> using namespace std; int main() { int x[3001]; int y[3001]; int cnum = 0; while (1) { cnum += 1; cin >> x[cnum] >> y[cnum]; if (x[cnum] == 0 && y[cnum] == 0) break; } for (int i = 1; i <= cnum; i++) { if (x[i] > y[i]) { cout << y[i] << " " <<...
#include <cmath> #include <iostream> using namespace std; int main() { int x[3001]; int y[3001]; int cnum = 0; while (1) { cnum += 1; cin >> x[cnum] >> y[cnum]; if (x[cnum] == 0 && y[cnum] == 0) break; } for (int i = 1; i < cnum; i++) { if (x[i] > y[i]) { cout << y[i] << " " << ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
140
#include <iostream> using namespace std; #define MAX_DATA_NUM 3001 // Contain last zero typedef struct t_num_set { int num1; int num2; } t_NUM_SET; void swap(t_NUM_SET *t_inValue); int main() { int dataNum = 0, i = 0; t_NUM_SET t_inValue[MAX_DATA_NUM]; for (i = 0; i < MAX_DATA_NUM; i++) { cin >> t_i...
#include <iostream> using namespace std; #define MAX_DATA_NUM 3001 // Contain last zero typedef struct t_num_set { int num1; int num2; } t_NUM_SET; void swap(t_NUM_SET *t_inValue); int main() { int dataNum = 0, i = 0; t_NUM_SET t_inValue[MAX_DATA_NUM]; for (i = 0; i < MAX_DATA_NUM; i++) { cin >> t_i...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
215
#include <iostream> using namespace std; int main() { int x, y; for (int i = 1; i < 10001; i++) { cin >> x >> y; if (x == 0) { return 0; } else { if (y < x) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } } } }
#include <iostream> using namespace std; int main() { int x, y; for (int i = 1; i < 10001; i++) { cin >> x >> y; if (x == 0 && y == 0) { return 0; } else { if (y < x) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } } } }
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
88
#include <iostream> using namespace std; int main() { int i = 0, y = 0; cin >> i >> y; while (i != 0 && y != 0) { if (i > y) cout << y << " " << i << endl; else cout << i << " " << y << endl; cin >> i >> y; } return 0; }
#include <iostream> using namespace std; int main() { int i = 0, y = 0; cin >> i >> y; while (i != 0 || y != 0) { if (i > y) cout << y << " " << i << endl; else cout << i << " " << y << endl; cin >> i >> y; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
79
#include <iostream> #include <string> using namespace std; int main() { int A; int B; while (cin >> A >> B, A && B) { if (A <= B) { cout << A << " " << B << endl; } if (A > B) { cout << B << " " << A << endl; } } return 0; }
#include <iostream> #include <string> using namespace std; int main() { int A; int B; while (cin >> A >> B, A || B) { if (A <= B) { cout << A << " " << B << endl; } if (A > B) { cout << B << " " << A << endl; } } return 0; }
[["-", 0, 52, 15, 339, 51, 34, 12, 16, 17, 98], ["+", 0, 52, 15, 339, 51, 34, 12, 16, 17, 106]]
1
77
#include <iostream> using namespace std; int main(void) { int a, b; cin >> a >> b; while (a != 0 && b != 0) { if (a < b) cout << a << " " << b << "\n"; else cout << b << " " << a << "\n"; cin >> a >> b; } return 0; }
#include <iostream> using namespace std; int main(void) { int a, b; cin >> a >> b; while (a != 0 || b != 0) { if (a < b) cout << a << " " << b << "\n"; else cout << b << " " << a << "\n"; cin >> a >> b; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
80
#include <iostream> using namespace std; int main() { int i, x, y; cin >> x >> y; i = 0; while (x != 0 && y != 0) { i++; if (x < y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } cin >> x >> y; } }
#include <iostream> using namespace std; int main() { int i, x, y; cin >> x >> y; i = 0; while (x != 0 || y != 0) { i++; if (x < y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } cin >> x >> y; } }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
85
#include <bits/stdc++.h> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) swap(x, y); cout << x << y << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) swap(x, y); cout << x << " " << y << endl; } return 0; }
[["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
65
#include <bits/stdc++.h> using namespace std; int main() { int x, y; while (true) { cin >> x >> y; if (x == 0 && y == 0) { break; } if (x > y) { swap(x, y); } } cout << x << " " << y << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; while (true) { cin >> x >> y; if (x == 0 && y == 0) { break; } if (x > y) { swap(x, y); } cout << x << " " << y << endl; } return 0; }
[["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
1
73
#include <iostream> using namespace std; int main() { for (int i = 1;; i++) { int x, y; cin >> x >> y; if (x == 0) break; if (x > y) { swap(x, y); } cout << x << " " << y << endl; } return 0; }
#include <iostream> using namespace std; int main() { for (int i = 1;; i++) { int x, y; cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) { swap(x, y); } cout << x << " " << y << endl; } return 0; }
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
74
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x < y) { swap(x, y); } cout << x << " " << y << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x < y) { swap(x, y); } cout << y << " " << x << endl; } return 0; }
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
71
#include <bits/stdc++.h> using namespace std; int main() { while (1) { int x, y; cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) swap(x, y); cout << x << "" << y << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { while (1) { int x, y; cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) swap(x, y); cout << x << " " << y << endl; } return 0; }
[["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6]]
1
68
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x; cin >> y; if (x == 0 | y == 0) break; if (x >= y) { cout << y << " " << x << endl; } if (x < y) { cout << x << " " << y << endl; } } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x >= y) { cout << y << " " << x << endl; } if (x < y) { cout << x << " " << y << endl; } } return 0; }
[["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 139], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
86
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; } if (x > y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x <= y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } } return 0; }
[["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]]
1
79
#include <cstdio> int main(void) { int a, b; scanf("%d %d", &a, &b); while (a != 0 || b != 0) { if (a > b) printf("%d %d\n", b, a); else printf("%d %d\n", b, a); scanf("%d %d", &a, &b); } return 0; }
#include <cstdio> int main(void) { int a, b; scanf("%d %d", &a, &b); while (a != 0 || b != 0) { if (a > b) printf("%d %d\n", b, a); else printf("%d %d\n", a, b); scanf("%d %d", &a, &b); } return 0; }
[["-", 75, 76, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 75, 76, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 75, 76, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 75, 76, 0, 1, 0, 2, 3, 4, 0, 22]]
1
86
#include <iostream> using namespace std; int main() { int x, y, a; cin >> x >> y; while (x != 0 && y != 0) { if (x > y) { a = x; x = y; y = a; } cout << x << " " << y << endl; cin >> x >> y; } return 0; }
#include <iostream> using namespace std; int main() { int x, y, a; cin >> x >> y; while (x != 0 || y != 0) { if (x > y) { a = x; x = y; y = a; } cout << x << " " << y << endl; cin >> x >> y; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
78
#include <iostream> #include <string> using namespace std; int main() { while (true) { int n1, n2; cin >> n1 >> n2; if (n1 > 0 && n2 > 0) { if (n1 < n2) cout << n1 << " " << n2 << endl; else cout << n2 << " " << n1 << endl; } else break; } }
#include <iostream> #include <string> using namespace std; int main() { while (true) { int n1, n2; cin >> n1 >> n2; if (n1 > 0 || n2 > 0) { if (n1 < n2) cout << n1 << " " << n2 << endl; else cout << n2 << " " << n1 << endl; } else break; } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]]
1
77
#include <bits/stdc++.h> using namespace std; int main() { int x, y, i = 0; int result[6000]; while (true) { scanf("%d %d", &x, &y); if (x == 0 || y == 0) { break; } else if (x < y) { result[i] = x; result[i + 1] = y; i += 2; } else { result[i] = y; result[i ...
#include <bits/stdc++.h> using namespace std; int main() { int x, y, i = 0; int result[6000]; while (true) { scanf("%d %d", &x, &y); if (x == 0 && y == 0) { break; } else if (x < y) { result[i] = x; result[i + 1] = y; i += 2; } else { result[i] = y; result[i ...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
152
#include <bits/stdc++.h> using namespace std; int main() { while (1) { int x, y; cin >> x >> y; if (x == y) break; if (x > y) swap(x, y); cout << x << " " << y << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { while (1) { int x, y; cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) swap(x, y); cout << x << " " << y << endl; } return 0; }
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
65
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x < y) { cout << x << " " << y << endl; } else if (x > y) { cout << y << " " << x << endl; } } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x <= y) { cout << x << " " << y << endl; } else if (x > y) { cout << y << " " << x << endl; } } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
85
#include <iostream> using namespace std; int main() { int x, y, i; i = 1; while (i = 1) { cin >> x >> y; if (x == 0 && y == 0) break; else if (x > y) { cout << y << x << endl; } else { cout << x << " " << y << endl; } } return 0; }
#include <iostream> using namespace std; int main() { int x, y, i; i = 1; while (i = 1) { cin >> x >> y; if (x == 0 && y == 0) break; else if (x > y) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } } return 0; }
[["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
84
#include <iostream> using namespace std; int main() { int x, y, z = 1; while (z = 1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x >= y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } } return 0; }
#include <iostream> using namespace std; int main() { int x, y, z = 1; while (z = 1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x >= y) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } } return 0; }
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
85
#include <iostream> using namespace std; int main() { int x, y; for (;;) { cin >> x >> y; if (x == 0 && y == 0) break; else if (x < y) cout << x << " " << y << endl; else if (x > y) cout << y << " " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; for (;;) { cin >> x >> y; if (x == 0 && y == 0) break; else if (x <= y) cout << x << " " << y << endl; else if (x > y) cout << y << " " << x << endl; } return 0; }
[["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 19]]
1
83
#include <iostream> using namespace std; int main() { int x, y; for (;;) { cin >> x >> y; if (x == 0 && y == 0) break; else if (x < y) cout << x << " " << y << endl; else if (x > y) cout << y << " " << x << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (true) { cin >> x >> y; if (x == 0 && y == 0) break; else if (x <= y) cout << x << " " << y << endl; else if (x > y) cout << y << " " << x << endl; } return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 88], ["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 51, 146], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 19]]
1
83
#include <iostream> using namespace std; int main(void) { int x, y, i; for (int i = 1; i <= 3001; i++) { cin >> x >> y; if (x == 0 && y == 0) { break; } else if (x < y, x == y) { cout << x << " " << y << endl; } else if (x > y) { cout << y << " " << x << endl; } } ret...
#include <iostream> using namespace std; int main(void) { int x, y, i; for (int i = 1; i <= 3000; i++) { cin >> x >> y; if (x == 0 && y == 0) { break; } else if (x < y || x == y) { cout << x << " " << y << endl; } else if (x > y) { cout << y << " " << x << endl; } } r...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 75, 76, 0, 57, 15, 339, 51, 34, 0, 21], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106]]
1
105
#include <iostream> using namespace std; int main() { int x, y, tmp; for (;;) { cin >> x >> y; if (x == 0 && y == 0) { return 0; } if (x < y) { tmp = x; x = y; y = tmp; } cout << x << " " << y << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, y, tmp; for (;;) { cin >> x >> y; if (x == 0 && y == 0) { return 0; } if (x > y) { tmp = x; x = y; y = tmp; } cout << x << " " << y << endl; } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]]
1
82
#include <stdio.h> int main(void) { int i, x, y; for (i = 1; i <= 3000; i++) { scanf("%d %d", &x, &y); if (x == 0 && y == 0) { break; } if (x > y) { printf("%d %d\n", x, y); } else { printf("%d %d\n", y, x); } } return 0; }
#include <stdio.h> int main(void) { int i, x, y; for (i = 1; i <= 3000; i++) { scanf("%d %d", &x, &y); if (x == 0 && y == 0) { break; } if (x < y) { printf("%d %d\n", x, y); } else { printf("%d %d\n", y, x); } } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]]
1
96
#include <bits/stdc++.h> using namespace std; int main() { int x, y; scanf("%d %d", &x, &y); while (x && y) { x <= y ? printf("%d %d\n", x, y) : printf("%d %d\n", y, x); scanf("%d %d", &x, &y); } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; scanf("%d %d", &x, &y); while (x || y) { x <= y ? printf("%d %d\n", x, y) : printf("%d %d\n", y, x); scanf("%d %d", &x, &y); } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
82
#include <iostream> using namespace std; int main() { int x, y; int i = 0; while (i < 3000) { cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } i++; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; int i = 0; while (i < 3000) { cin >> x >> y; if (x == 0 && y == 0) break; if (x < y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } i++; } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]]
1
89
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x > y) { swap(x, y); } if (x == 0 || y == 0) break; cout << x << ' ' << y << endl; } }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x > y) { swap(x, y); } if (x == 0 && y == 0) break; cout << x << ' ' << y << endl; } }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
68
#include <iostream> using namespace std; int main() { while (true) { int x, y, xa; cin >> x >> y; if (x == 0 && y == 0) { break; } if (x > y) { xa = x; x = y; y = xa; } cout << x << y << endl; } }
#include <iostream> using namespace std; int main() { while (true) { int x, y, xa; cin >> x >> y; if (x == 0 && y == 0) { break; } if (x > y) { xa = x; x = y; y = xa; } cout << x << " " << y << endl; } }
[["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
73
#include <iostream> using namespace std; int main() { for (int x, y, i = 0;; i++) { cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) cout << y << " " << x << endl; if (x < y) cout << x << " " << y << endl; } return 0; }
#include <iostream> using namespace std; int main() { for (int x, y, i = 0;; i++) { cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) cout << y << " " << x << endl; else cout << x << " " << y << endl; } return 0; }
[["-", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["-", 0, 7, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["-", 0, 7, 8, 9, 0, 57, 15, 339, 0, 25], ["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95]]
1
86
#include <iostream> using namespace std; int main() { int x, y, k; while (1) { cin >> x >> y; if (x * y == 0) { break; } if (x > y) { k = y; y = x; x = k; } cout << x << " " << y << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, y, k; while (1) { cin >> x >> y; if (x == 0 && y == 0) { break; } if (x > y) { k = y; y = x; x = k; } cout << x << " " << y << endl; } return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
78
#include <iostream> using namespace std; int main() { // insert code here... int a, b; while (1) { cin >> a >> b; if (a == 0 && b == 0) break; if (a < b) { cout << a << ' ' << b << endl; } else { cout << b << ' ' << a << endl; } cout << endl; } return 0; }
#include <iostream> using namespace std; int main() { // insert code here... int a, b; while (1) { cin >> a >> b; if (a == 0 && b == 0) break; if (a < b) { cout << a << ' ' << b << endl; } else { cout << b << ' ' << a << endl; } } return 0; }
[["-", 0, 52, 8, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]]
1
84
#include <iostream> using namespace std; int main() { int a, b; while (true) { cin >> a >> b; if (a == 0 && b == 0) break; if (a != b) cout << b << " " << a << endl; else cout << a << " " << b << endl; } return 0; }
#include <iostream> using namespace std; int main() { int a, b; while (true) { cin >> a >> b; if (a == 0 && b == 0) break; if (a > b) cout << b << " " << a << endl; else cout << a << " " << b << endl; } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]]
1
75
#include <iostream> using namespace std; int main() { int x, y; for (int i = 1;; i++) { cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) { cout << y << x << endl; } else { cout << x << " " << y << endl; } } }
#include <iostream> using namespace std; int main() { int x, y; for (int i = 1;; i++) { cin >> x >> y; if (x == 0 && y == 0) break; if (x > y) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } } }
[["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
79
#include <bits/stdc++.h> using namespace std; int main() { int n, m; while (true) { cin >> n >> m; if (n == 0 && m == 0) { break; } else if (n <= m) { cout << m << " " << n << endl; } else { cout << n << " " << m << endl; } } }
#include <bits/stdc++.h> using namespace std; int main() { int n, m; while (true) { cin >> n >> m; if (n == 0 && m == 0) { break; } else if (n <= m) { cout << n << " " << m << endl; } else { cout << m << " " << n << endl; } } }
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 12, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 12, 22]]
1
79
#include <iostream> using namespace std; int main() { int x, y; int buf; for (int i = 0; i < 3000; i++) { cin >> x >> y; if (x == 0 && y == 0) { break; } if (x < y) { buf = x; x = y; y = buf; } cout << x << ' ' << y << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; int buf; for (int i = 0; i < 3000; i++) { cin >> x >> y; if (x == 0 && y == 0) { break; } if (x > y) { buf = x; x = y; y = buf; } cout << x << ' ' << y << endl; } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]]
1
91
#include <cstdio> int main() { int x, y; for (;;) { scanf("%d %d", &x, &y); if (x != 0 && y != 0) { if (x <= y) { printf("%d %d\n", x, y); } else { printf("%d %d\n", y, x); } } else { break; } } return 0; }
#include <cstdio> int main() { int x, y; for (;;) { scanf("%d %d", &x, &y); if (x != 0 || y != 0) { if (x <= y) { printf("%d %d\n", x, y); } else { printf("%d %d\n", y, x); } } else { break; } } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]]
1
88
#include <algorithm> #include <iostream> using namespace std; int main() { int a = 1, b = 1; while (a != 0 && b != 0) { cin >> a >> b; if (a != 0 && b != 0) { if (a > b) swap(a, b); cout << a << " " << b << endl; } } return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { int a = 1, b = 1; while (a != 0 || b != 0) { cin >> a >> b; if (a != 0 || b != 0) { if (a > b) swap(a, b); cout << a << " " << b << endl; } } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]]
1
81
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0) break; if (x < y) { } else { swap(x, y); } printf("%d %d\n", x, y); } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if (x == 0 && y == 0) break; if (x < y) { } else { swap(x, y); } printf("%d %d\n", x, y); } return 0; }
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
70
#include <algorithm> #include <iostream> #include <stdio.h> using namespace std; int main() { int a[] = {-1, -1}; int i = 1; while (true) { scanf("%d %d", &a[0], &a[1]); if (a[0] == 0 && a[0] == 0) break; sort(a, a + 2); cout << a[0] << " " << a[1] << endl; i++; } }
#include <algorithm> #include <iostream> #include <stdio.h> using namespace std; int main() { int a[] = {-1, -1}; int i = 1; while (true) { scanf("%d %d", &a[0], &a[1]); if (a[0] == 0 && a[1] == 0) break; sort(a, a + 2); cout << a[0] << " " << a[1] << endl; i++; } }
[["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13]]
1
105
#include <cstdio> int main() { int a, b; while (true) { scanf("%d %d", &a, &b); if ((a == 0) && (b == 0)) break; if (a < b) printf("%d %d\n", a, b); if (a > b) printf("%d %d\n", b, a); } return 0; }
#include <cstdio> int main() { int a, b; while (true) { scanf("%d %d", &a, &b); if ((a == 0) && (b == 0)) break; if (a <= b) printf("%d %d\n", a, b); if (a > b) printf("%d %d\n", b, a); } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
87
#include <iostream> using namespace std; int main() { int x, y, tmp; cin >> x >> y; while ((x != 0) && (y != 0)) { if (x > y) { tmp = x; x = y; y = tmp; } cout << x << " " << y << endl; cin >> x >> y; } return 0; }
#include <iostream> using namespace std; int main() { int x, y, tmp; cin >> x >> y; while ((x != 0) || (y != 0)) { if (x > y) { tmp = x; x = y; y = tmp; } cout << x << ' ' << y << endl; cin >> x >> y; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106], ["-", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 103, 0, 104]]
1
82
#include <iostream> int main() { int x, y; while (1) { std::cin >> x >> y; if (!x && !y) break; if (x < y) std::cout << y << ' ' << x << std::endl; else std::cout << x << ' ' << y << std::endl; } return 0; }
#include <iostream> int main() { int x, y; while (1) { std::cin >> x >> y; if (!x && !y) break; if (x > y) std::cout << y << ' ' << x << std::endl; else std::cout << x << ' ' << y << std::endl; } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]]
1
79
#include <iostream> using namespace std; int main() { int a, b; while (cin >> a >> b, a && b) { if (a > b) swap(a, b); cout << a << " " << b << endl; } return 0; }
#include <iostream> using namespace std; int main() { int a, b; while (cin >> a >> b, a || b) { if (a > b) swap(a, b); cout << a << " " << b << endl; } return 0; }
[["-", 0, 52, 15, 339, 51, 34, 12, 16, 17, 98], ["+", 0, 52, 15, 339, 51, 34, 12, 16, 17, 106]]
1
59
#include <cstdio> int main() { int x, y; while (1) { scanf("%d %d", &x, &y); if (x == 0 && y == 0) break; if (x < y) { printf("%d %d\n", x, y); } else { printf("%d %d\n", y, x); } return 0; } }
#include <cstdio> int main() { int x, y; while (1) { scanf("%d %d", &x, &y); if (x == 0 && y == 0) break; if (x < y) { printf("%d %d\n", x, y); } else { printf("%d %d\n", y, x); } } return 0; }
[["+", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46], ["-", 0, 14, 8, 9, 0, 52, 8, 9, 0, 46]]
1
82
#include <iostream> using namespace std; int main() { int x, y; while (cin >> x) { cin >> y; if (x == 0 && y == 0) break; if (x < y) { cout << x << y << endl; } else { cout << y << " " << x << endl; } } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (cin >> x) { cin >> y; if (x == 0 && y == 0) break; if (x < y) { cout << x << " " << y << endl; } else { cout << y << " " << x << endl; } } return 0; }
[["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 17, 151]]
1
75
#include <iostream> int main() { int x, y; while (std::cin >> x >> y, x && y) { std::cout << ((x < y) ? x : y) << " " << ((x < y) ? y : x) << std::endl; } }
#include <iostream> int main() { int x, y; while (std::cin >> x >> y, x || y) { std::cout << ((x < y) ? x : y) << " " << ((x < y) ? y : x) << std::endl; } }
[["-", 0, 52, 15, 339, 51, 34, 12, 16, 17, 98], ["+", 0, 52, 15, 339, 51, 34, 12, 16, 17, 106]]
1
65
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; while (x != 0 && y != 0) { if (x > y) cout << y << " " << x << endl; else cout << x << " " << y << endl; cin >> x >> y; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; while (x != 0 || y != 0) { if (x > y) cout << y << " " << x << endl; else cout << x << " " << y << endl; cin >> x >> y; } return 0; }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
75
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if ((x != 0) && (y != 0)) { if (y < x) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } } else break; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; while (1) { cin >> x >> y; if ((x != 0) || (y != 0)) { if (y < x) { cout << y << " " << x << endl; } else { cout << x << " " << y << endl; } } else break; } return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]]
1
86
#include <iostream> using namespace std; int x, y; int main() { cin >> x >> y; while (x != 0 && y != 0) { if (x < y) cout << x << " " << y << endl; else cout << y << " " << x << endl; cin >> x >> y; } }
#include <iostream> using namespace std; int x, y; int main() { cin >> x >> y; while (x != 0 || y != 0) { if (x < y) cout << x << " " << y << endl; else cout << y << " " << x << endl; cin >> x >> y; } }
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]]
1
72
while a = gets do b = a.split if b[0].to_i == 0 && b[1].to_i; break end x = [b[0].to_i, b[1].to_i].sort puts x[0].to_s + " " + x[1].to_s end
while a = gets b = a.split if b[0].to_i == 0 && b[1].to_i == 0; break end x = [b[0].to_i, b[1].to_i].sort puts x[0].to_s + " " + x[1].to_s end
[["-", 36, 36, 0, 493, 0, 89, 8, 170, 0, 170], ["+", 8, 170, 0, 121, 15, 738, 12, 738, 17, 60], ["+", 8, 170, 0, 121, 15, 738, 12, 738, 12, 612]]
4
67
loop { x = gets.split.map(&:to_i) break if a == [0,0] puts x.sort.join(" ") }
loop { x = gets.split.map(&:to_i) break if x == [0, 0] puts x.sort.join(" ") }
[["-", 196, 196, 8, 734, 0, 751, 15, 738, 31, 22], ["+", 196, 196, 8, 734, 0, 751, 15, 738, 31, 22]]
4
34
while true nums = STDIN.gets.split(" ").map(&:to_i) break if (nums[0]==3001&&nums[1]==3001) puts nums.sort.join(" ") end
while true nums = STDIN.gets.split(" ").map(&:to_i) break if (nums[0]==0&&nums[1]==0) puts nums.sort.join(" ") end
[["-", 0, 751, 15, 739, 0, 738, 31, 738, 12, 612], ["+", 0, 751, 15, 739, 0, 738, 31, 738, 12, 612], ["-", 0, 751, 15, 739, 0, 738, 12, 738, 12, 612], ["+", 0, 751, 15, 739, 0, 738, 12, 738, 12, 612]]
4
49
loop do x,y = gets.split.map(&:to_i) if x == 0 && y ==0 then break end if x < y s = y y = x x = s end puts "#{x} #{y}" end
loop do x,y = gets.split.map(&:to_i) if x == 0 && y ==0 then break end if x > y s = y y = x x = s end puts "#{x} #{y}" end
[["-", 196, 737, 8, 736, 0, 121, 15, 738, 17, 18], ["+", 196, 737, 8, 736, 0, 121, 15, 738, 17, 47]]
4
51
a = Array.new { Array.new(2) } loop do a << gets.split().map(&:to_i).sort break if a.last == [0,0] end a.each do |v| puts "#{v[0]} #{v[1]}" end
a = Array.new { Array.new(2) } loop do a << gets.split().map(&:to_i).sort break if a.last == [0,0] end a.pop a.each do |v| puts "#{v[0]} #{v[1]}" end
[["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 486, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 17, 131]]
4
66
loop do x, y = gets.chomp.split.map(&:to_i) break if x.zero? and y.zero? if x < y puts "#{x} < #{y}" else puts "#{y} < #{x}" end end
loop do x, y = gets.chomp.split.map(&:to_i) break if x.zero? and y.zero? if x < y puts "#{x} #{y}" else puts "#{y} #{x}" end end
[["-", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["-", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 75, 95, 0, 652, 3, 4, 0, 557, 0, 6]]
4
53
loop do array = gets.split.map(&:to_i) break if array == [0, 0] ...
loop do array = gets.split.map(&:to_i) break if array == [0, 0] ...
[["-", 3, 4, 0, 557, 0, 284, 0, 742, 0, 612], ["+", 3, 4, 0, 557, 0, 284, 0, 742, 0, 612]]
4
43
while 1 do x = gets.chomp.split.map(&:to_i).sort if x[0] == 0 && x[0] == 0 break else puts x.join(" ") end end
while 1 do x = gets.chomp.split.map(&:to_i).sort if x[0] == 0 && x[1] == 0 break else puts x.join(" ") end end
[["-", 0, 121, 15, 738, 12, 738, 31, 742, 0, 612], ["+", 0, 121, 15, 738, 12, 738, 31, 742, 0, 612]]
4
45
y = [[false]] a = true b = gets.split(" ").map(&:to_i) while a begin a = y[b[0]][b[1]] rescue puts b.sort.join(" ") b = gets.split(" ").map(&:to_i) end end
y = [[[false]]] a = true b = gets.split(" ").map(&:to_i) while a begin a = y[b[0]][b[1]][0] rescue puts b.sort.join(" ") b = gets.split(" ").map(&:to_i) end end
[["+", 0, 662, 12, 516, 0, 516, 0, 516, 0, 70], ["+", 0, 662, 12, 516, 0, 516, 0, 516, 0, 73], ["+", 0, 756, 0, 662, 12, 742, 500, 742, 0, 73], ["+", 8, 170, 0, 756, 0, 662, 12, 742, 0, 70], ["+", 8, 170, 0, 756, 0, 662, 12, 742, 0, 612]]
4
74
while (a = gets.chomp.split.map &:to_s) != ['0']*2 puts a.sort.join(" ") end
while (a = gets.chomp.split.map &:to_i) != [0]*2 puts a.sort.join(" ") end
[["-", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["+", 0, 662, 12, 652, 3, 4, 0, 752, 0, 753], ["-", 15, 738, 12, 738, 31, 516, 0, 557, 0, 62]]
4
34
loop do x,y = gets.split.map(&:to_i) break if (x==0&&y==0) if x < y then puts "#{x} #{y}" else puts "#{x} #{y}" end end
loop do x,y = gets.split.map(&:to_i) break if (x==0&&y==0) if x < y then puts "#{x} #{y}" else puts "#{y} #{x}" end end
[["-", 0, 652, 3, 4, 0, 557, 0, 284, 0, 22], ["+", 0, 652, 3, 4, 0, 557, 0, 284, 0, 22]]
4
54
loop do x, y = gets.chomp.split.sort.map(&:to_i) if x == 0 && y == 0 break end puts "#{x} #{y}" end
loop do x, y = gets.chomp.split.map(&:to_i).sort if x == 0 && y == 0 break else puts "#{x} #{y}" end end
[["-", 8, 736, 0, 662, 12, 652, 486, 652, 735, 22], ["-", 196, 737, 8, 736, 0, 662, 12, 652, 17, 131], ["+", 196, 737, 8, 736, 0, 662, 12, 652, 17, 131], ["+", 196, 737, 8, 736, 0, 662, 12, 652, 735, 22], ["-", 0, 652, 196, 737, 8, 736, 0, 121, 0, 444], ["+", 196, 737, 8, 736, 0, 121, 75, 95, 0, 95], ["+", 0, 652, 196,...
4
40
while (x, y = gets.split.map(&:to_i)) != [0, 0] puts [x, y] * (" ") end
while (x, y = gets.split.map(&:to_i)) != [0, 0] puts [x, y].sort * (" ") end
[["+", 0, 652, 3, 4, 0, 738, 31, 652, 17, 131], ["+", 0, 652, 3, 4, 0, 738, 31, 652, 735, 22]]
4
35
while line = gets do a, b = line.split.map(&:to_i) a == 0 && b == 0 ? break : (a > b ? puts("#{a} #{b}") : puts("#{b} #{a}")) end
while line = gets do a, b = line.split.map(&:to_i) a == 0 && b == 0 ? break : (a > b ? puts("#{b} #{a}") : puts("#{a} #{b}")) end
[["-", 64, 652, 3, 4, 0, 557, 0, 284, 0, 22], ["+", 64, 652, 3, 4, 0, 557, 0, 284, 0, 22], ["-", 75, 652, 3, 4, 0, 557, 0, 284, 0, 22], ["+", 75, 652, 3, 4, 0, 557, 0, 284, 0, 22]]
4
60
while line = gets do break if line == "0 0" puts line.split(" ").map(&:to_i).sort.join(" ") end
while line = gets.chomp do break if line == "0 0" puts line.split(" ").map(&:to_i).sort.join(" ") end
[["+", 0, 493, 0, 89, 15, 662, 12, 652, 17, 131], ["+", 0, 493, 0, 89, 15, 662, 12, 652, 735, 22]]
4
37
begin a = gets().split.map { |e| e.to_i}.sort if a[0] != 0 && a[1] != 0 printf("#{a[0]} #{a[1]}\n") end end while a[0] != 0 && a[1] != 0
begin a = gets().split.map { |e| e.to_i}.sort if a[0] != 0 || a[1] != 0 printf("#{a[0]} #{a[1]}\n") end end while a[0] != 0 || a[1] != 0
[["-", 0, 740, 8, 756, 0, 121, 15, 738, 17, 98], ["+", 0, 740, 8, 756, 0, 121, 15, 738, 17, 106], ["-", 36, 36, 0, 493, 0, 740, 15, 738, 17, 98], ["+", 36, 36, 0, 493, 0, 740, 15, 738, 17, 106]]
4
69