I think your tolerance is intolerable!

]]>I followed the indistinct path and approached the control from above.

]]>Fyi, I did not join that event. And I am sitting comfortably in front of my computer and my mind is clear enough to tell left and right now. So my solution to this situation probably was just slow down a bit when tired. In fact my orienteering speed is always walking.

]]>I am Simon.

I think algorithms are really difficult, do you know any courses that can let me learn it efficiently?

I have just made a simple trial of quick sort, typed below:

#include

#include

using namespace std;

void swap( int &a, int &b )

{

int temp;

temp = a;

a = b;

b = temp;

}

void quickSort( int *data, int left, int right )

{

if ( left >= right )

{

return;

}

int pivot = data[left];

int i = left + 1;

int j = right;

while ( true )

{

while ( i pivot )

{

break;

}

i++;

}

while ( j > left )

{

if ( data[j] j )

{

break;

}

swap( data[i], data[j] );

}

swap( data[left], data[j] );

quickSort( data, left, j-1 );

quickSort( data, j+1, right );

}

int main()

{

int n;

cin >> n;

int data[n];

srand( time(0) );

for ( int i=0; i<n; i++ )

{

data[i] = rand()%100+1;

cout << data[i] << '\t';

}

cout << endl;

quickSort( data, 0, n-1 );

for ( int i=0; i<n; i++ )

{

cout << data[i] <<'\t';

}

system("PAUSE");

return 0;

}