Judge Information
Run ID: 104474
src.cpp:1:24: warning: extra tokens at end of #include directive
#include<bits/stdc++.h>#include<iostream>using namespace std;int main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); freopen("TONGNN.INP","r",stdin);
^
src.cpp:2:9: error: expected constructor, destructor, or type conversion before '(' token
freopen("TONGNN.OUT","w", stdout);
^
src.cpp:3:17: error: 'cin' does not name a type
long long int a;cin>>a;
^
src.cpp:4:18: error: array bound is not an integer constant before ']' token
long long int b[a];
^
src.cpp:5:1: error: expected unqualified-id before 'for'
for(long long i=1;i<=a;i++)cin>>b[i];
^
src.cpp:5:19: error: 'i' does not name a type
for(long long i=1;i<=a;i++)cin>>b[i];
^
src.cpp:5:24: error: 'i' does not name a type
for(long long i=1;i<=a;i++)cin>>b[i];
^
src.cpp:6:5: error: expected constructor, destructor, or type conversion before '(' token
sort(b+1,b+1+a);
^
src.cpp:7:17: error: 'b' was not declared in this scope
long long int s=b[2]+b[1];
^
src.cpp:7:22: error: 'b' was not declared in this scope
long long int s=b[2]+b[1];
^
src.cpp:8:20: error: 'b' was not declared in this scope
long long int s2=s+b[3];
^
src.cpp:9:1: error: 'cout' does not name a type
cout<<s2;
^
src.cpp:25:1: error: expected declaration before '}' token
}
^
#include<bits/stdc++.h>#include<iostream>using namespace std;int main(){ ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); freopen("TONGNN.INP","r",stdin);
^
src.cpp:2:9: error: expected constructor, destructor, or type conversion before '(' token
freopen("TONGNN.OUT","w", stdout);
^
src.cpp:3:17: error: 'cin' does not name a type
long long int a;cin>>a;
^
src.cpp:4:18: error: array bound is not an integer constant before ']' token
long long int b[a];
^
src.cpp:5:1: error: expected unqualified-id before 'for'
for(long long i=1;i<=a;i++)cin>>b[i];
^
src.cpp:5:19: error: 'i' does not name a type
for(long long i=1;i<=a;i++)cin>>b[i];
^
src.cpp:5:24: error: 'i' does not name a type
for(long long i=1;i<=a;i++)cin>>b[i];
^
src.cpp:6:5: error: expected constructor, destructor, or type conversion before '(' token
sort(b+1,b+1+a);
^
src.cpp:7:17: error: 'b' was not declared in this scope
long long int s=b[2]+b[1];
^
src.cpp:7:22: error: 'b' was not declared in this scope
long long int s=b[2]+b[1];
^
src.cpp:8:20: error: 'b' was not declared in this scope
long long int s2=s+b[3];
^
src.cpp:9:1: error: 'cout' does not name a type
cout<<s2;
^
src.cpp:25:1: error: expected declaration before '}' token
}
^