Submission #2697289
Source Code Expand
#include <iostream> #include <string> using namespace std; int main(){ int N,x,y,max_len=0; cin >> N; for(int i = 0;i < N;i++){ cin << x << y; max_len = max(max_len,sqrt(int(pow(x,2) + pow(y,2)))) } cout << max_len << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 2点間距離の最大値 ( The longest distance ) |
User | Bondo416 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 293 Byte |
Status | CE |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:9:13: error: no match for ‘operator<<’ (operand types are ‘std::istream {aka std::basic_istream<char>}’ and ‘int’) cin << x << y; ^ ./Main.cpp:9:13: note: candidate: operator<<(int, int) <built-in> ./Main.cpp:9:13: note: no known conversion for argument 1 from ‘std::istream {aka std::basic_istream<char>}’ to ‘int’ In file included from /usr/include/c++/5/string:52:0, from /usr/include/c++/5/bits/locale_classes.h:40, from /usr/include/c++/5/bits/ios_base.h:41, from /usr/include/c++/5/ios:42, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from ./Main.cpp:1: /usr/include/c++/5/bits/basic_string.h:5257:5: note: candidate: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) ...