Submission #7093901


Source Code Expand

Copy
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main(){
    vector<int> a[3];cin>>a[0]>>a[1]>>a[2];
    sort(a.begin(),a.end());
    cout << a[1] << endl;
    return 0;
    
}

Submission Info

Submission Time
Task A - 高橋くんと年齢
User kabuto6419
Language C++14 (GCC 5.4.1)
Score 0
Code Size 220 Byte
Status

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:7:25: error: no match for ‘operator>>’ (operand types are ‘std::istream {aka std::basic_istream<char>}’ and ‘std::vector<int>’)
     vector<int> a[3];cin>>a[0]>>a[1]>>a[2];
                         ^
In file included from /usr/include/c++/5/iostream:40:0,
                 from ./Main.cpp:1:
/usr/include/c++/5/istream:120:7: note: candidate: std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::basic_istream<_CharT, _Traits>::__istream_type& (*)(std::basic_istream<_CharT, _Traits>::__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_istream<_CharT, _Traits>::__istream_type = std::basic_istream<char>]
       operator>>(__istream_type& (*__pf)(__istream_type&))
       ^
/usr/include/c++/5/istream:120:7: note:   no known conversion for argument 1 from ‘std::vector<int>’ to ‘std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&) {aka std::basic_istr...