0_0_20613162_12102.cpp:6:25: error: stray '#' in program
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:45: error: stray '#' in program
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:26: error: 'define' does not name a type
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:88: error: 'Node' does not name a type
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:111: error: 'Node' was not declared in this scope
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:118: error: 'Node' was not declared in this scope
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:124: error: expression list treated as compound expression in initializer [-fpermissive]
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:125: error: expected ',' or ';' before '{' token
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp: In function 'int main()':
0_0_20613162_12102.cpp:6:162: error: 'll' was not declared in this scope
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:194: error: 'n' was not declared in this scope
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:219: error: 'i' was not declared in this scope
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:246: error: 'no' was not declared in this scope
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:267: error: 'i' was not declared in this scope
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans); } return 0;}
^
0_0_20613162_12102.cpp:6:294: error: 'no' was not declared in this scope
using namespace std;#define maxn 1000001#define ll __int64struct Node{ ll a,b;};Node no[maxn];bool cmp(Node x,Node y){ return x.a<y.a;}int main(){ ll i,n; while(scanf("%I64d",&n)!=EOF) { for(i=0;i<n;i++)scanf("%I64d",&no[i].a); for(i=0;i<n;i++)scanf("%I64d",&no[i].b); sort(no,no+n,cmp); ll ans=0; for(i=0;i<n-1;i++)ans+=no[i].a; if((ans+1)*no[i].b>=no[i].a)ans+=no[i].a; else ans+=(ans+1)*no[i].b; printf("%I64d\n",ans);
|