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_20845973_29473.cpp:12:1: error: 'll' does not name a type
 ll n;struct node
 ^
0_0_20845973_29473.cpp:14:5: error: 'll' does not name a type
     ll pos,cost;
     ^
0_0_20845973_29473.cpp: In function 'bool operator<(node, node)':
0_0_20845973_29473.cpp:17:18: error: 'struct node' has no member named 'pos'
         return a.pos<b.pos;
                  ^
0_0_20845973_29473.cpp:17:24: error: 'struct node' has no member named 'pos'
         return a.pos<b.pos;
                        ^
0_0_20845973_29473.cpp: At global scope:
0_0_20845973_29473.cpp:19:7: error: 'maxn' was not declared in this scope
 }save[maxn];
       ^
0_0_20845973_29473.cpp:20:1: error: 'll' does not name a type
 ll dp[maxn];int main()
 ^
0_0_20845973_29473.cpp: In function 'int main()':
0_0_20845973_29473.cpp:23:26: error: 'n' was not declared in this scope
     while(~scanf("%lld",&n))
                          ^
0_0_20845973_29473.cpp:25:13: error: 'll' was not declared in this scope
         for(ll i=1;i<=n;i++)
             ^
0_0_20845973_29473.cpp:25:20: error: 'i' was not declared in this scope
         for(ll i=1;i<=n;i++)
                    ^
0_0_20845973_29473.cpp:26:32: error: 'save' was not declared in this scope
             scanf("%lld %lld",&save[i].pos,&save[i].cost);
                                ^
0_0_20845973_29473.cpp:27:14: error: 'save' was not declared in this scope
         sort(save+1,save+n+1);
              ^
0_0_20845973_29473.cpp:27:29: error: 'sort' was not declared in this scope
         sort(save+1,save+n+1);
                             ^
0_0_20845973_29473.cpp:27:29: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from 0_0_20845973_29473.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:4705:5: note:   'std::sort'
     sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
     ^
0_0_20845973_29473.cpp:28:9: error: 'dp' was not declared in this scope
         dp[1]=save[1].cost;
         ^
0_0_20845973_29473.cpp:29:13: error: 'll' was not declared in this scope
         for(ll i=2;i<=n;i++)
             ^
0_0_20845973_29473.cpp:29:20: error: 'i' was not declared in this scope
         for(ll i=2;i<=n;i++)
                    ^
0_0_20845973_29473.cpp:32:13: error: 'll' was not declared in this scope
         for(ll i=2;i<=n;i++)
             ^
0_0_20845973_29473.cpp:32:20: error: 'i' was not declared in this scope
         for(ll i=2;i<=n;i++)
                    ^
0_0_20845973_29473.cpp:34:20: error: expected ';' before 'j'
             for(ll j=1;j<i;j++)
                    ^
0_0_20845973_29473.cpp:34:24: error: 'j' was not declared in this scope
             for(ll j=1;j<i;j++)
                        ^
0_0_20845973_29473.cpp:39:85: error: 'min' was not declared in this scope
                 dp[i]=min(dp[i],dp[j]+save[i].cost-(n-i+1)*(save[i].pos-save[j].pos));
                                                                                     ^
0_0_20845973_29473.cpp:39:85: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from 0_0_20845973_29473.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3444:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_20845973_29473.cpp:42:9: error: 'll' was not declared in this scope
         ll ans=dp[1];
         ^
0_0_20845973_29473.cpp:43:16: error: expected ';' before 'i'
         for(ll i=1;i<=n;i++)
                ^
0_0_20845973_29473.cpp:43:20: error: 'i' was not declared in this scope
         for(ll i=1;i<=n;i++)
                    ^
0_0_20845973_29473.cpp:44:13: error: 'ans' was not declared in this scope
             ans=min(ans,dp[i]);
             ^
0_0_20845973_29473.cpp:44:30: error: 'min' was not declared in this scope
             ans=min(ans,dp[i]);
                              ^
0_0_20845973_29473.cpp:44:30: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
                 from 0_0_20845973_29473.cpp:5:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3444:5: note:   'std::min'
     min(initializer_list<_Tp> __l, _Compare __comp)
     ^
0_0_20845973_29473.cpp:45:25: error: 'ans' was not declared in this scope
         printf("%lld\n",ans);
                         ^


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-06-29 13:48:15, Gzip enabled