F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_20613431_7793.cpp:13:5: error: expected unqualified-id before '=' token
     = 0; i--)            {                int co = p[i].b, a, b;                if(p[i].op[0] == 'R')                {                    co = p[i].c;                    if(k < p[i].x || k >= p[i].x + p[i].a) continue;                    a = p[i].y;                    b = p[i].y + p[i].b - 1;                }                else if(p[i].op[0] == 'C')                {                    if(abs(k - p[i].x) > p[i].a) continue;                    int tmp = p[i].a * p[i].a - (k - p[i].x) * (k - p[i].x);                    int tp = (int)(sqrt(tmp));                    a = p[i].y - tp;                    b = p[i].y + tp;                }                else if(p[i].op[0] == 'D')                {                    if(abs(k - p[i].x) > p[i].a) continue;                    int tmp = p[i].a - abs(k - p[i].x);                    a = p[i].y - tmp;                    b = p[i].y + tmp;                }                else if(p[i].op[0] == 'T')                {                    if(k - p[i].x >= (p[i].a + 1) / 2 || k < p[i].x) continue;                    int tmp = (p[i].a - 1) / 2 - (k - p[i].x);                    a = p[i].y - tmp;                    b = p[i].y + tmp;                }                a = max(a, 0);                b = min(m - 1, b);                int fx = find(a), fy;                for(int j = b; j >= a; j = fy - 1)                {                    fy = find(j);                    if(!vis[fy]) ans[co]++;                    vis[fy] = 1;                    if(fx != fy) fa[fy] = fx;                }            }        }        for(int i = 1; i < 9; i++) printf("%d ", ans[i]);        printf("%d\n", ans[9]);    }    return 0;}
     ^
0_0_20613431_7793.cpp:13:10: error: 'i' does not name a type
     = 0; i--)            {                int co = p[i].b, a, b;                if(p[i].op[0] == 'R')                {                    co = p[i].c;                    if(k < p[i].x || k >= p[i].x + p[i].a) continue;                    a = p[i].y;                    b = p[i].y + p[i].b - 1;                }                else if(p[i].op[0] == 'C')                {                    if(abs(k - p[i].x) > p[i].a) continue;                    int tmp = p[i].a * p[i].a - (k - p[i].x) * (k - p[i].x);                    int tp = (int)(sqrt(tmp));                    a = p[i].y - tp;                    b = p[i].y + tp;                }                else if(p[i].op[0] == 'D')                {                    if(abs(k - p[i].x) > p[i].a) continue;                    int tmp = p[i].a - abs(k - p[i].x);                    a = p[i].y - tmp;                    b = p[i].y + tmp;                }                else if(p[i].op[0] == 'T')                {                    if(k - p[i].x >= (p[i].a + 1) / 2 || k < p[i].x) continue;                    int tmp = (p[i].a - 1) / 2 - (k - p[i].x);                    a = p[i].y - tmp;                    b = p[i].y + tmp;                }                a = max(a, 0);                b = min(m - 1, b);                int fx = find(a), fy;                for(int j = b; j >= a; j = fy - 1)                {                    fy = find(j);                    if(!vis[fy]) ans[co]++;                    vis[fy] = 1;                    if(fx != fy) fa[fy] = fx;                }            }        }        for(int i = 1; i < 9; i++) printf("%d ", ans[i]);        printf("%d\n", ans[9]);    }    return 0;}
          ^
0_0_20613431_7793.cpp:13:1551: error: expected declaration before '}' token
     = 0; i--)            {                int co = p[i].b, a, b;                if(p[i].op[0] == 'R')                {                    co = p[i].c;                    if(k < p[i].x || k >= p[i].x + p[i].a) continue;                    a = p[i].y;                    b = p[i].y + p[i].b - 1;                }                else if(p[i].op[0] == 'C')                {                    if(abs(k - p[i].x) > p[i].a) continue;                    int tmp = p[i].a * p[i].a - (k - p[i].x) * (k - p[i].x);                    int tp = (int)(sqrt(tmp));                    a = p[i].y - tp;                    b = p[i].y + tp;                }                else if(p[i].op[0] == 'D')                {                    if(abs(k - p[i].x) > p[i].a) continue;                    int tmp = p[i].a - abs(k - p[i].x);                    a = p[i].y - tmp;                    b = p[i].y + tmp;                }                else if(p[i].op[0] == 'T')                {                    if(k - p[i].x >= (p[i].a + 1) / 2 || k < p[i].x) continue;                    int tmp = (p[i].a - 1) / 2 - (k - p[i].x);                    a = p[i].y - tmp;                    b = p[i].y + tmp;                }                a = max(a, 0);                b = min(m - 1, b);                int fx = find(a), fy;                for(int j = b; j >= a; j = fy - 1)                {                    fy = find(j);                    if(!vis[fy]) ans[co]++;                    vis[fy] = 1;                    if(fx != fy) fa[fy] = fx;                }            }        }        for(int i = 1; i < 9; i++) printf("%d ", ans[i]);        printf("%d\n", ans[9]);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-26 07:41:20, Gzip enabled