func_code_string: #include <bits/stdc++.h>   using namespace std;   struct Point {     long long x, y;     int id;     Point() {}     Point(long long a, long long b, int c) : x(a), y(b), id(c) {}     Point operator-(Point b) { return Point(x - b.x, y - b.y, 0); }     bool operator<(const Point &b) const {       return (x != b.x) ? x < b.x : y < b.y;     }   };   long long cross(Point x, Point y) { return x.x * y.y - x.y * y.x; }   bool in[2005];   int gethull(Point *p, int n, int s, bool v) {     static Point st[2005], hull[2005];     int top = 0, cnt = 0;     for (int i = 1; i <= n; i++) {       while (top > 1 && cross(p[i] - st[top], st[top] - st[top - 1]) >= 0) top--;       st[++top] = p[i];     }     for (int i = 1; i < top; i++) hull[++cnt] = st[i];     top = 0;     for (int i = 1; i <= n; i++) {       while (top > 1 && cross(p[i] - st[top], st[top] - st[top - 1]) <= 0) top--;       st[++top] = p[i];     }     for (int i = top; i > 1; i--) hull[++cnt] = st[i];     for (int i = 1; i <= cnt; i++)       if (hull[i].id == s) {         in[hull[i].id] = 1;         return (v) ? hull[(i - 1 + cnt - 1) % cnt + 1].id : hull[i % cnt + 1].id;       }   }   Point p[2005], q[2005];   char str[2005];   int main() {     int n;     scanf( %d , &n);     for (int i = 1; i <= n; i++) {       int x, y;       scanf( %d%d , &x, &y);       p[i] = Point(x, y, i);     }     scanf( %s , str + 1);     str[n - 1] =  L ;     sort(p + 1, p + n + 1);     int cur = p[1].id;     for (int i = 1; i < n; i++) {       int cnt = 0;       for (int j = 1; j <= n; j++)         if (!in[p[j].id]) q[++cnt] = p[j];       printf( %d  , cur);       cur = gethull(q, cnt, cur, (str[i] ==  R ));     }     printf( %d n , cur);     return 0;   }   