ამოხსნების სტატუსი

ამ გვერდზე თქვენ იხილავთ გაგზავნილი ამოხსნების სტატუსს.


გაგზავნის თარიღი: 08.12.2019 12:28:42

ამოცანა: ფიგურისტები

მომხმარებელი: PUGGO

ვერდიქტი: ამოუხსნელი

შეფასება: 0 ქულა







#include <iostream
>
using namespace std;
float a[11],b[11],mx;
int i,j,n;
main(){
cin>>n;
for (i=1; i<=n; i++){
cin>>a[i];
}
for (i=1; i<=n; i++){
cin>>b[i];
}
reverse (b+1,b+n+1);
for (i=1; i<=n; i++){
a[i]=a[i]+b[i];
if (mx<a[i]) {mx=a[i]; j=i;}
}
cout<<j<<" "<<mx;
}
PROB_cpp_UID284PID188_b10257/main.cpp:1:19: error: missing terminating > character
 #include <iostream
                   ^
PROB_cpp_UID284PID188_b10257/main.cpp:2:1: error: expected unqualified-id before '>' token
 >
 ^
PROB_cpp_UID284PID188_b10257/main.cpp: In function 'int main()':
PROB_cpp_UID284PID188_b10257/main.cpp:7:1: error: 'cin' was not declared in this scope
 cin>>n;
 ^~~
PROB_cpp_UID284PID188_b10257/main.cpp:7:1: note: suggested alternative:
In file included from PROB_cpp_UID284PID188_b10257/main.cpp:1:0:
/usr/include/c++/6/iostream:60:18: note:   'std::cin'
   extern istream cin;  /// Linked to standard input
                  ^~~
PROB_cpp_UID284PID188_b10257/main.cpp:14:19: error: 'reverse' was not declared in this scope
 reverse (b+1,b+n+1);
                   ^
PROB_cpp_UID284PID188_b10257/main.cpp:19:1: error: 'cout' was not declared in this scope
 cout<<j<<" "<<mx;
 ^~~~
PROB_cpp_UID284PID188_b10257/main.cpp:19:1: note: suggested alternative:
In file included from PROB_cpp_UID284PID188_b10257/main.cpp:1:0:
/usr/include/c++/6/iostream:61:18: note:   'std::cout'
   extern ostream cout;  /// Linked to standard output
                  ^~~~