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_20614646_2253.cpp:13:79: error: stray '#' in program
     using namespace std; typedef long long ll;typedef unsigned long long ull; #define ff(i, n) for(int i=0,END=(n);i<END;i++)#define fff(i, n, m) for(int i=(n),END=(m);i<=END;i++)#define dff(i, n, m) for(int i=(n),END=(m);i>=END;i--)#define travel(e, u) for(int e=first[u], v=vv[first[u]]; ~e; e=nxt[e])#define mid ((l+r)/2)#define bit(n) (1ll<<(n))#define clr(a, b) memset(a, b, sizeof(a))#define debug(x) cout << #x << " = " << x << endl; #define ls (rt << 1)#define rs (ls | 1)#define lson l, m, ls#define rson m + 1, r, rs void work(); int main() {    work();    return 0;}const int maxn = 222;const int maxv = 5e4 + 5 + maxn;const int inf = 0x3f3f3f3f; int n, m, p;int dp[maxv]; void zero_one_pack(int v, int c, int V) {    dff(i, V, v) {        dp[i] = min(dp[i], dp[i - v] + c);    }} void zero_one_pack2(int v, int c, int V) {    dff(i, V, v) {        dp[i] = max(dp[i], dp[i - v] + c);    }} void multi_pack(int v, int c, int num, int V, bool flag = true) {    int k = 1;    while (num) {        if (flag)            zero_one_pack(v * k, c * k, V);        else            zero_one_pack2(v * k, c * k, V);        num -= k;        k += k;        if (k > num) k = num;    }} void input() {    scanf("%d%d%d", &n, &m, &p);     clr(dp, inf); dp[0] = 0;    ff (i, n) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);        multi_pack(v, c, num, p + 100);    }    int V = *min_element(dp + p, dp + p + 100);     clr(dp, 0);    ff (i, m) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);         multi_pack(c, v, num, 50000, false);    }     int ans = inf;    dff(i, 50000, 0) if (dp[i] >= V) {        ans = min(ans, i);    }    if (ans == inf) {        puts("TAT");    } else {        printf("%d\n", ans);    }} void work() {    int T; scanf("%d", &T);    fff(cas, 1, T) {        input();    }}
                                                                               ^
0_0_20614646_2253.cpp:13:126: error: stray '#' in program
     using namespace std; typedef long long ll;typedef unsigned long long ull; #define ff(i, n) for(int i=0,END=(n);i<END;i++)#define fff(i, n, m) for(int i=(n),END=(m);i<=END;i++)#define dff(i, n, m) for(int i=(n),END=(m);i>=END;i--)#define travel(e, u) for(int e=first[u], v=vv[first[u]]; ~e; e=nxt[e])#define mid ((l+r)/2)#define bit(n) (1ll<<(n))#define clr(a, b) memset(a, b, sizeof(a))#define debug(x) cout << #x << " = " << x << endl; #define ls (rt << 1)#define rs (ls | 1)#define lson l, m, ls#define rson m + 1, r, rs void work(); int main() {    work();    return 0;}const int maxn = 222;const int maxv = 5e4 + 5 + maxn;const int inf = 0x3f3f3f3f; int n, m, p;int dp[maxv]; void zero_one_pack(int v, int c, int V) {    dff(i, V, v) {        dp[i] = min(dp[i], dp[i - v] + c);    }} void zero_one_pack2(int v, int c, int V) {    dff(i, V, v) {        dp[i] = max(dp[i], dp[i - v] + c);    }} void multi_pack(int v, int c, int num, int V, bool flag = true) {    int k = 1;    while (num) {        if (flag)            zero_one_pack(v * k, c * k, V);        else            zero_one_pack2(v * k, c * k, V);        num -= k;        k += k;        if (k > num) k = num;    }} void input() {    scanf("%d%d%d", &n, &m, &p);     clr(dp, inf); dp[0] = 0;    ff (i, n) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);        multi_pack(v, c, num, p + 100);    }    int V = *min_element(dp + p, dp + p + 100);     clr(dp, 0);    ff (i, m) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);         multi_pack(c, v, num, 50000, false);    }     int ans = inf;    dff(i, 50000, 0) if (dp[i] >= V) {        ans = min(ans, i);    }    if (ans == inf) {        puts("TAT");    } else {        printf("%d\n", ans);    }} void work() {    int T; scanf("%d", &T);    fff(cas, 1, T) {        input();    }}
                                                                                                                              ^
0_0_20614646_2253.cpp:13:180: error: stray '#' in program
     using namespace std; typedef long long ll;typedef unsigned long long ull; #define ff(i, n) for(int i=0,END=(n);i<END;i++)#define fff(i, n, m) for(int i=(n),END=(m);i<=END;i++)#define dff(i, n, m) for(int i=(n),END=(m);i>=END;i--)#define travel(e, u) for(int e=first[u], v=vv[first[u]]; ~e; e=nxt[e])#define mid ((l+r)/2)#define bit(n) (1ll<<(n))#define clr(a, b) memset(a, b, sizeof(a))#define debug(x) cout << #x << " = " << x << endl; #define ls (rt << 1)#define rs (ls | 1)#define lson l, m, ls#define rson m + 1, r, rs void work(); int main() {    work();    return 0;}const int maxn = 222;const int maxv = 5e4 + 5 + maxn;const int inf = 0x3f3f3f3f; int n, m, p;int dp[maxv]; void zero_one_pack(int v, int c, int V) {    dff(i, V, v) {        dp[i] = min(dp[i], dp[i - v] + c);    }} void zero_one_pack2(int v, int c, int V) {    dff(i, V, v) {        dp[i] = max(dp[i], dp[i - v] + c);    }} void multi_pack(int v, int c, int num, int V, bool flag = true) {    int k = 1;    while (num) {        if (flag)            zero_one_pack(v * k, c * k, V);        else            zero_one_pack2(v * k, c * k, V);        num -= k;        k += k;        if (k > num) k = num;    }} void input() {    scanf("%d%d%d", &n, &m, &p);     clr(dp, inf); dp[0] = 0;    ff (i, n) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);        multi_pack(v, c, num, p + 100);    }    int V = *min_element(dp + p, dp + p + 100);     clr(dp, 0);    ff (i, m) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);         multi_pack(c, v, num, 50000, false);    }     int ans = inf;    dff(i, 50000, 0) if (dp[i] >= V) {        ans = min(ans, i);    }    if (ans == inf) {        puts("TAT");    } else {        printf("%d\n", ans);    }} void work() {    int T; scanf("%d", &T);    fff(cas, 1, T) {        input();    }}
                                                                                                                                                                                    ^
0_0_20614646_2253.cpp:13:234: error: stray '#' in program
     using namespace std; typedef long long ll;typedef unsigned long long ull; #define ff(i, n) for(int i=0,END=(n);i<END;i++)#define fff(i, n, m) for(int i=(n),END=(m);i<=END;i++)#define dff(i, n, m) for(int i=(n),END=(m);i>=END;i--)#define travel(e, u) for(int e=first[u], v=vv[first[u]]; ~e; e=nxt[e])#define mid ((l+r)/2)#define bit(n) (1ll<<(n))#define clr(a, b) memset(a, b, sizeof(a))#define debug(x) cout << #x << " = " << x << endl; #define ls (rt << 1)#define rs (ls | 1)#define lson l, m, ls#define rson m + 1, r, rs void work(); int main() {    work();    return 0;}const int maxn = 222;const int maxv = 5e4 + 5 + maxn;const int inf = 0x3f3f3f3f; int n, m, p;int dp[maxv]; void zero_one_pack(int v, int c, int V) {    dff(i, V, v) {        dp[i] = min(dp[i], dp[i - v] + c);    }} void zero_one_pack2(int v, int c, int V) {    dff(i, V, v) {        dp[i] = max(dp[i], dp[i - v] + c);    }} void multi_pack(int v, int c, int num, int V, bool flag = true) {    int k = 1;    while (num) {        if (flag)            zero_one_pack(v * k, c * k, V);        else            zero_one_pack2(v * k, c * k, V);        num -= k;        k += k;        if (k > num) k = num;    }} void input() {    scanf("%d%d%d", &n, &m, &p);     clr(dp, inf); dp[0] = 0;    ff (i, n) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);        multi_pack(v, c, num, p + 100);    }    int V = *min_element(dp + p, dp + p + 100);     clr(dp, 0);    ff (i, m) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);         multi_pack(c, v, num, 50000, false);    }     int ans = inf;    dff(i, 50000, 0) if (dp[i] >= V) {        ans = min(ans, i);    }    if (ans == inf) {        puts("TAT");    } else {        printf("%d\n", ans);    }} void work() {    int T; scanf("%d", &T);    fff(cas, 1, T) {        input();    }}
                                                                                                                                                                                                                                          ^
0_0_20614646_2253.cpp:13:304: error: stray '#' in program
     using namespace std; typedef long long ll;typedef unsigned long long ull; #define ff(i, n) for(int i=0,END=(n);i<END;i++)#define fff(i, n, m) for(int i=(n),END=(m);i<=END;i++)#define dff(i, n, m) for(int i=(n),END=(m);i>=END;i--)#define travel(e, u) for(int e=first[u], v=vv[first[u]]; ~e; e=nxt[e])#define mid ((l+r)/2)#define bit(n) (1ll<<(n))#define clr(a, b) memset(a, b, sizeof(a))#define debug(x) cout << #x << " = " << x << endl; #define ls (rt << 1)#define rs (ls | 1)#define lson l, m, ls#define rson m + 1, r, rs void work(); int main() {    work();    return 0;}const int maxn = 222;const int maxv = 5e4 + 5 + maxn;const int inf = 0x3f3f3f3f; int n, m, p;int dp[maxv]; void zero_one_pack(int v, int c, int V) {    dff(i, V, v) {        dp[i] = min(dp[i], dp[i - v] + c);    }} void zero_one_pack2(int v, int c, int V) {    dff(i, V, v) {        dp[i] = max(dp[i], dp[i - v] + c);    }} void multi_pack(int v, int c, int num, int V, bool flag = true) {    int k = 1;    while (num) {        if (flag)            zero_one_pack(v * k, c * k, V);        else            zero_one_pack2(v * k, c * k, V);        num -= k;        k += k;        if (k > num) k = num;    }} void input() {    scanf("%d%d%d", &n, &m, &p);     clr(dp, inf); dp[0] = 0;    ff (i, n) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);        multi_pack(v, c, num, p + 100);    }    int V = *min_element(dp + p, dp + p + 100);     clr(dp, 0);    ff (i, m) {        int v, c, num;        scanf("%d%d%d", &v, &c, &num);         multi_pack(c, v, num, 50000, false);    }     int ans = inf;    dff(i, 50000, 0) if (dp[i] >= V) {        ans = min(ans, i);    }    if (ans == inf) {        puts("TAT");    } else {        printf("%d\n", ans);    }} void work() {    int T; scanf("%d", &T);    fff(cas, 1, T) {        input();    }}
                                                                                                                                                           


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 12:30:16, Gzip enabled