|
|
вернуться в форумwhy WA 1 Послано WOVVAN 27 сен 2010 22:36 #include <iostream> #include <cstdio> #include <algorithm> using namespace std; int n; pair<int, int> a[1000001]; int main() { cin >> n; for (int i = 0;i < n; i++) scanf("%d %d", &a[i].second, &a[i].first); sort(a, a + n); for (int i = n - 1; i >= 0; i--) printf("%d %d\n", a[i].second, a[i].first); return 0; } Re: why WA 1 Послано hatred 11 авг 2011 15:07 because quick sort gives an other order for the equal numbers than bubble sort |
|
|