submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s566245720
p00001
C++
#include <iostream> using namespace std; int main () { int takasa[10]; for (int i = 0; i < 10; i++) { cin >> takasa[i]; } //????????????(?????¬????????§??????????????? /*for (int i = 0; i < 9; i++) { for (int j = i+1; j < 10; j++) { if (takasa[i] < takasa[j]) { swap(takasa[i], takasa[j]); } } }*/ sort(&takasa[0], &takasa[10]); for (int i = 0; i < 3; i++) { cout << takasa[9-i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:21:9: error: 'sort' was not declared in this scope; did you mean 'short'? 21 | sort(&takasa[0], &takasa[10]); | ^~~~ | short
s483284051
p00001
C++
#include <iostream> #include <array> #include <functional> using namespace std; int main(){ array<int,10> list; for (int i = 0; i < 10; i++){ cin >> list[i]; } sort(list.begin(), list.end(),greater<int>()); for (int i = 0; i < 3; i++){ cout << list[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(list.begin(), list.end(),greater<int>()); | ^~~~ | short
s332613523
p00001
C++
#include <iostream> #include <array> #include <functional> using namespace std; int main(){ array<int,10> list; for (int i = 0; i < 10; i++){ cin >> list[i]; } sort(list.begin(), list.end(),greater<int>()); for (int i = 0; i < 3; i++){ cout << list[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:14:9: error: 'sort' was not declared in this scope; did you mean 'short'? 14 | sort(list.begin(), list.end(),greater<int>()); | ^~~~ | short
s992719755
p00001
C++
#include <iostream> using nameplace std; int main(){ int h[10]; for(int i=0;i<10;i++){ cin>>h[i]; } for(int i=0;i<10;i++){ for(int j=0;j<10-i;j++){ if(h[j]<h[j+1]){ swap(h[j],h[j+1]); } } } cout<<h[0]<<endl; cout<<h[1]<<endl; cout<<h[2]<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'nameplace' 2 | using nameplace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>h[i]; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:11:11: error: 'swap' was not declared in this scope 11 | swap(h[j],h[j+1]); | ^~~~ a.cc:11:11: note: suggested alternatives: In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41: /usr/include/c++/14/tuple:2823:5: note: 'std::swap' 2823 | swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; | ^~~~ In file included from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/bits/move.h:226:5: note: 'std::swap' 226 | swap(_Tp& __a, _Tp& __b) | ^~~~ /usr/include/c++/14/bits/move.h:226:5: note: 'std::swap' /usr/include/c++/14/bits/exception_ptr.h:229:5: note: 'std::__exception_ptr::swap' 229 | swap(exception_ptr& __lhs, exception_ptr& __rhs) | ^~~~ a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 15 | cout<<h[0]<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:15:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 15 | cout<<h[0]<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s093762387
p00001
C++
#include <iostream> using nameplace std; int main(){ int h[10]; for(int i=0;i<10;i++){ cin>>h[i]; } for(int k=0;i<10;i++){ for(int j=0;j<10-i;j++){ if(h[j]<h[j+1]){ swap(h[j],h[j+1]); } } } cout<<h[0]<<endl; cout<<h[1]<<endl; cout<<h[2]<<endl; return 0; }
a.cc:2:7: error: expected nested-name-specifier before 'nameplace' 2 | using nameplace std; | ^~~~~~~~~ a.cc: In function 'int main()': a.cc:6:7: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin>>h[i]; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:8:14: error: 'i' was not declared in this scope 8 | for(int k=0;i<10;i++){ | ^ a.cc:11:11: error: 'swap' was not declared in this scope 11 | swap(h[j],h[j+1]); | ^~~~ a.cc:11:11: note: suggested alternatives: In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41: /usr/include/c++/14/tuple:2823:5: note: 'std::swap' 2823 | swap(tuple<_Elements...>&, tuple<_Elements...>&) = delete; | ^~~~ In file included from /usr/include/c++/14/bits/exception_ptr.h:41, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/bits/move.h:226:5: note: 'std::swap' 226 | swap(_Tp& __a, _Tp& __b) | ^~~~ /usr/include/c++/14/bits/move.h:226:5: note: 'std::swap' /usr/include/c++/14/bits/exception_ptr.h:229:5: note: 'std::__exception_ptr::swap' 229 | swap(exception_ptr& __lhs, exception_ptr& __rhs) | ^~~~ a.cc:15:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 15 | cout<<h[0]<<endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:15:13: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 15 | cout<<h[0]<<endl; | ^~~~ | std::endl /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s000404603
p00001
C++
#include<iostream> using namespace std; int main() { int top[5]={0,0,0,0,0}; int yama; cin >> top[0]; for(int i=0; i<9; i++){ cin >> yama; for(int j=0; j<3; j++){ if(yama >top[j]){ top[j+2] = top[j+1] top[j+1] = top[j] top[j] =yama; break; } } return 0; }
a.cc: In function 'int main()': a.cc:14:23: error: expected ';' before 'top' 14 | top[j+2] = top[j+1] | ^ | ; 15 | top[j+1] = top[j] | ~~~ a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s331485749
p00001
C++
#include<iostream> using namespace std; int main() { int top[5]={0,0,0,0,0}; int yama; cin >> top[0]; for(int i=0; i<9; i++){ cin >> yama; for(int j=0; j<3; j++){ if(yama >top[j]){ top[j+2] = top[j+1]; top[j+1] = top[j]; top[j] =yama; break; } } return 0; }
a.cc: In function 'int main()': a.cc:22:2: error: expected '}' at end of input 22 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s640874299
p00001
C++
var readline = require('readline'); var rl = readline.createInterface({ input: process.stdin, output: {}, }); hs = []; rl.on('line', function(h) { hs.push(h | 0); }); rl.on('close', function() { console.log(3776); console.log(2848); console.log(2840); });
a.cc:1:24: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes 1 | var readline = require('readline'); | ^~~~~~~~~~ a.cc:10:7: warning: multi-character character constant [-Wmultichar] 10 | rl.on('line', function(h) { | ^~~~~~ a.cc:14:7: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes 14 | rl.on('close', function() { | ^~~~~~~ a.cc:1:1: error: 'var' does not name a type 1 | var readline = require('readline'); | ^~~ a.cc:3:1: error: 'var' does not name a type 3 | var rl = readline.createInterface({ | ^~~ a.cc:6:2: error: expected unqualified-id before ')' token 6 | }); | ^ a.cc:8:1: error: 'hs' does not name a type 8 | hs = []; | ^~ a.cc:10:1: error: 'rl' does not name a type 10 | rl.on('line', function(h) { | ^~ a.cc:12:2: error: expected unqualified-id before ')' token 12 | }); | ^ a.cc:14:1: error: 'rl' does not name a type 14 | rl.on('close', function() { | ^~ a.cc:18:2: error: expected unqualified-id before ')' token 18 | }); | ^
s114535849
p00001
C++
#include <iostream> #include <algorithm> #include <c++/array> using namespace std; int main() { array<int, 10> A; for (int i = 0; i < 10; ++i) { cin >> A[i]; } sort(A.begin(), A.end(), std::greater<int>()); for (int i = 0; i < 3; ++i) { cout << A[i] << endl; } return 0; }
a.cc:3:10: fatal error: c++/array: No such file or directory 3 | #include <c++/array> | ^~~~~~~~~~~ compilation terminated.
s662055290
p00001
C++
#include <iostream> #include <algorithm> #include <c++/array> using namespace std; int main() { array<int, 10> A; for (int i = 0; i < 10; ++i) { cin >> A[i]; } sort(A.begin(), A.end(), std::greater<int>()); for (int i = 0; i < 3; ++i) { cout << A[i] << endl; } return 0; }
a.cc:3:10: fatal error: c++/array: No such file or directory 3 | #include <c++/array> | ^~~~~~~~~~~ compilation terminated.
s067846721
p00001
C++
#include<iostream> #include<algorithm> using namespace std; #define N 10 void hoge(){ int i; int h[N]; for(i=0;i<N;i++){ cin>>h[i]; } sort(h); cout<<h[9]<<h[8]<<h[7]<<endl; } int main(){ hoge(); return 0; }
a.cc: In function 'void hoge()': a.cc:13:13: error: no matching function for call to 'sort(int [10])' 13 | sort(h); | ~~~~^~~ In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate: 'template<class _RAIter> void std::sort(_RAIter, _RAIter)' 4762 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last) | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4762:5: note: candidate expects 2 arguments, 1 provided /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate: 'template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)' 4793 | sort(_RandomAccessIterator __first, _RandomAccessIterator __last, | ^~~~ /usr/include/c++/14/bits/stl_algo.h:4793:5: note: candidate expects 3 arguments, 1 provided In file included from /usr/include/c++/14/algorithm:86: /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator, class _Compare> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare)' 292 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:292:1: note: candidate expects 4 arguments, 1 provided /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate: 'template<class _ExecutionPolicy, class _RandomAccessIterator> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator)' 296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last); | ^~~~ /usr/include/c++/14/pstl/glue_algorithm_defs.h:296:1: note: candidate expects 3 arguments, 1 provided
s498975139
p00001
C++
#include <bits/stdc++.h> using namespace std; int main(){ int h = 0,m = 0,l = 0,tmp,i; for(i = 0;i < 9;i++){ cin>>tmp; if(tmp > h){ l = m; m = h; h = tmp; }else if(tmp > m){ l = m; m = tmp; }else if(tmp > l){ l = tmp; } } cout<<h<<endl; cout<<m<<endl; cout<<l<<endl; } return 0; }
a.cc:24:9: error: expected unqualified-id before 'return' 24 | return 0; | ^~~~~~ a.cc:25:1: error: expected declaration before '}' token 25 | } | ^
s980780018
p00001
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a[10],i; for(i=0;i<10;i++) cin >> a[i]; sort(a,a+10,greater<int>()); for(i=0;i<3;i++) cout << a[i] << endl; return 0; } ~ ~ ~
a.cc:13:1: error: expected class-name before '~' token 13 | ~ | ^
s834192987
p00001
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a[10],i; for(i=0;i<10;i++) cin >> a[i]; sort(a,a+10); for(i=9;i>6;i--) cout << a[i] << endl; return 0; } ~ ~ ~ ~ ~ ~
a.cc:12:1: error: expected class-name before '~' token 12 | ~ | ^
s334750740
p00001
C++
i = 0 while i < 10 do a[i] = gets i = i + 1 end b = a.map(&:to_i).sort puts b[0] puts b[1] puts b[2]
a.cc:1:1: error: 'i' does not name a type 1 | i = 0 | ^
s802900813
p00001
C++
#include<iostream> using namespace std; int main(){ int yama[10], i, p, Flag = 0, t; for(i = 0; i < 10; i++) cin >> yama[i]; while(1){ Flag = 0; for(i = 0; i < 10; i++){ if(yama[i] < yama[i + 1]){ t = yama[i]; yama[i] = yama[i + 1]; yama[i + 1] = t; Flag++; } } if(Flag != 0) break; } cout << yama[1] << "\n" cout << yama[2] << "\n" cout << yama[3] << "\n" return 0; }
a.cc: In function 'int main()': a.cc:21:32: error: expected ';' before 'cout' 21 | cout << yama[1] << "\n" | ^ | ; 22 | cout << yama[2] << "\n" | ~~~~
s961707211
p00001
C++
#include <iostream> using namespace std; int main(void){ int a[10]; for(int i = 0; i < 10; i++){ cin >> a[i]; } sort(a, a + 10,greater<int>()); cout << a[0] << endl; cout << a[1] << endl; cout << a[2] << endl; }
a.cc: In function 'int main()': a.cc:9:5: error: 'sort' was not declared in this scope; did you mean 'short'? 9 | sort(a, a + 10,greater<int>()); | ^~~~ | short
s342608422
p00001
C++
#include <iostream> using namespace std; int main(){ unsigned short mt_list[10]; for(int i=0; i<10;i++){ cin >> mt_list[i]; } unsgined short high[3] = {0}; for(int h=0; h<3; h++){ for(int i=0; i<10; i++){ if(high[h] >= mt_list[i]){ high[h] = i; } } unsigned short tmp = high[h]; high[h] = mt_list[tmp]; mt_list[tmp] = 0; } for(int i=0; i<3; i++){ cout << high[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:1: error: 'unsgined' was not declared in this scope; did you mean 'unsigned'? 12 | unsgined short high[3] = {0}; | ^~~~~~~~ | unsigned a.cc:15:4: error: 'high' was not declared in this scope 15 | if(high[h] >= mt_list[i]){ | ^~~~ a.cc:19:22: error: 'high' was not declared in this scope 19 | unsigned short tmp = high[h]; | ^~~~ a.cc:25:9: error: 'high' was not declared in this scope 25 | cout << high[i] << endl; | ^~~~
s781667632
p00001
C++
import sys arr = [] for i in sys.stdin: arr.append(int(i)) arr.sort() arr.reverse() for i in range(3): print(arr[i])
a.cc:1:1: error: 'import' does not name a type 1 | import sys | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
s009185339
p00001
C++
lis=[]; for i in range(10): h=int(input()); lis.append(h); for i in range(10): for j in range(10): if lis[i]<lis[j]: a=lis[i]; lis[i]=lis[j]; lis[j]=a; for i in range(3): print(lis[i]);
a.cc:1:1: error: 'lis' does not name a type 1 | lis=[]; | ^~~ a.cc:3:1: error: expected unqualified-id before 'for' 3 | for i in range(10): | ^~~ a.cc:5:5: error: 'lis' does not name a type 5 | lis.append(h); | ^~~ a.cc:7:1: error: expected unqualified-id before 'for' 7 | for i in range(10): | ^~~ a.cc:11:13: error: 'lis' does not name a type 11 | lis[i]=lis[j]; | ^~~ a.cc:12:13: error: 'lis' does not name a type 12 | lis[j]=a; | ^~~ a.cc:14:1: error: expected unqualified-id before 'for' 14 | for i in range(3): | ^~~
s888638887
p00001
C++
lis=[]; for i in range(10): h=int(input()); lis.append(h); for i in range(10): for j in range(i+1,10): if lis[i]<lis[j]: a=lis[i]; lis[i]=lis[j]; lis[j]=a; for i in range(3): print(lis[i]);
a.cc:1:1: error: 'lis' does not name a type 1 | lis=[]; | ^~~ a.cc:3:1: error: expected unqualified-id before 'for' 3 | for i in range(10): | ^~~ a.cc:5:5: error: 'lis' does not name a type 5 | lis.append(h); | ^~~ a.cc:7:1: error: expected unqualified-id before 'for' 7 | for i in range(10): | ^~~ a.cc:11:13: error: 'lis' does not name a type 11 | lis[i]=lis[j]; | ^~~ a.cc:12:13: error: 'lis' does not name a type 12 | lis[j]=a; | ^~~ a.cc:14:1: error: expected unqualified-id before 'for' 14 | for i in range(3): | ^~~
s769266113
p00001
C++
#include<iostream> using namespace std; int main(){ int mountain,first=0,second=0,third=0; for(int i=0;i<10;i++){ cin>>mountain; if(mountain>first){ third=second; second=first; first=mountain; }else if(mountain>second){ third=second; second=mountain; }else if(mountain>third){ third=mountain; } } count<<first<<'\n'<<second<<'\n'<<third; return 0; }
a.cc: In function 'int main()': a.cc:19:2: error: 'count' was not declared in this scope 19 | count<<first<<'\n'<<second<<'\n'<<third; | ^~~~~
s967219913
p00001
C++
include<iostream> #include<algorithm> using namespace std; int main(){ int dt[10]; for(int i=0;i<10;i++)cin>>dt[i]; sort(dt,dt+10); for(int i=9;i>=7;i--)cout<<dt[i]<<endl; return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std' 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64: /usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared 295 | template <typename _Tp, size_t = sizeof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared 984 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std' 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std' 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std' 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std' 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope 1451 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 63 | #include <bits/version.h> +++ |+#include <cstddef> 64 | /usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid 1451 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared 1453 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope 1454 | struct extent<_Tp[_Size], 0> | ^~~~~ /usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid 1454 | struct extent<_Tp[_Size], 0> | ^ /usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~ /usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid 1455 | : public integral_constant<size_t, _Size> { }; | ^ /usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid /usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared 1457 | template<typename _Tp, unsigned _Uint, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope 1458 | struct extent<_Tp[_Size], _Uint> | ^~~~~ /usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid 1458 | struct extent<_Tp[_Size], _Uint> | ^ /usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope 1463 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid 1463 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type 1857 | { static constexpr size_t __size = sizeof(_Tp); }; | ^~~~~~ /usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~~~~ /usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~ /usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp' 1860 | struct __select; | ^~~~~~~~ /usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared 1862 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^~~ /usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^ /usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared 1866 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false> | ^~~ /usr/include/c++/14/type_traits:1867:58: error: template argument 1 is invalid 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
s259846824
p00001
C++
#include <algorithm> #include <iostream> using namespace std; int main() { int high[10]; int i = 0; while (i < 10){ cin >> high[i]; i++; } i = 0; reverse(high[i], high[i + 9]); while (i < 3){ cout << high[i] << endl; } return (0); }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:1: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::reverse(_BIter, _BIter) [with _BIter = int]': a.cc:17:9: required from here 17 | reverse(high[i], high[i + 9]); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_algo.h:1089:63: error: no matching function for call to '__iterator_category(int&)' 1089 | std::__reverse(__first, __last, std::__iterator_category(__first)); | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:65, from /usr/include/c++/14/algorithm:60: /usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: note: candidate: 'template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&)' 239 | __iterator_category(const _Iter&) | ^~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: note: template argument deduction/substitution failed: /usr/include/c++/14/bits/stl_iterator_base_types.h: In substitution of 'template<class _Iter> constexpr typename std::iterator_traits< <template-parameter-1-1> >::iterator_category std::__iterator_category(const _Iter&) [with _Iter = int]': /usr/include/c++/14/bits/stl_algo.h:1089:63: required from 'void std::reverse(_BIter, _BIter) [with _BIter = int]' 1089 | std::__reverse(__first, __last, std::__iterator_category(__first)); | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ a.cc:17:9: required from here 17 | reverse(high[i], high[i + 9]); | ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/bits/stl_iterator_base_types.h:239:5: error: no type named 'iterator_category' in 'struct std::iterator_traits<int>' 239 | __iterator_category(const _Iter&) | ^~~~~~~~~~~~~~~~~~~
s500533360
p00001
C++
#include <iostream> #include <algorithm> #include <vector> #include <cstdio> #include <string> #include <set> #include <queue> #include <stack> #include <cmath> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<long long > vll; typedef vector< vi > vvi; int H[10]; int main() { for (int i = 0; i < 10; i++) { cin >> H[i]; } sort(H.rbegin(), H.rend()); for (int i = 0; i <3 ; i++) { cout << H[i] << endl; } }
a.cc: In function 'int main()': a.cc:20:16: error: request for member 'rbegin' in 'H', which is of non-class type 'int [10]' 20 | sort(H.rbegin(), H.rend()); | ^~~~~~ a.cc:20:28: error: request for member 'rend' in 'H', which is of non-class type 'int [10]' 20 | sort(H.rbegin(), H.rend()); | ^~~~
s448208726
p00001
C++
gggggggggggg
a.cc:1:1: error: 'gggggggggggg' does not name a type 1 | gggggggggggg | ^~~~~~~~~~~~
s337345991
p00001
C++
#include<bits/stdc++.h> using namespace std; int x[1000]; int temp[1000]; void MargeSort(int x[],int left,int right){ int i,j,mid,k; if(left>=right)return; mid=(left+right)/2; MargeSort(x,left,mid); MargeSort(x,mid+1,right); for(i=left;i<=mid;i++){ temp[i]=x[i]; } for(i=mid+1,j=right;i<=right;i++,j--){ temp[i]=x[j]; } i=left; j=right; for(k=left;k<=right;k++){ if(temp[i]>=temp[j])x[k]=temp[i++]; else x[k]=temp[j--]; } } int main(){ int num=10 for(int i=0;i<num;i++){ cin>>x[i]; } MargeSort(x,0,num-1); for(int i=0;i<3;i++){ cout<<x[i]<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:28:5: error: expected ',' or ';' before 'for' 28 | for(int i=0;i<num;i++){ | ^~~ a.cc:28:17: error: 'i' was not declared in this scope 28 | for(int i=0;i<num;i++){ | ^
s557235581
p00001
C++
#include<bits/stdc++.h> using namespace std; int x[1000]; int temp[1000]; void MargeSort(int x[],int left,int right){ int i,j,mid; if(left>=right)return; mid=(left+right)/2; MargeSort(x,left,mid); MargeSort(x,mid+1,right); for(int i=left;i<=mid;i++){ temp[i]=x[i]; } for(int i=mid+1,int j=right;i<=right;i++,j--){ temp[i]=x[j]; } i=left; j=right; for(k=left;k<=right;k++){ if(int temp[i]>=temp[j])x[k]=temp[i++]; else x[k]=temp[j--]; } } int main(){ int num=10; for(int i=0;i<num;i++){ cin>>x[i]; } MargeSort(x,0,num-1); for(int i=0;i<3;i++){ cout<<x[i]<<endl; } return 0; }
a.cc: In function 'void MargeSort(int*, int, int)': a.cc:16:21: error: expected unqualified-id before 'int' 16 | for(int i=mid+1,int j=right;i<=right;i++,j--){ | ^~~ a.cc:16:21: error: expected ';' before 'int' 16 | for(int i=mid+1,int j=right;i<=right;i++,j--){ | ^~~ | ; a.cc:16:41: error: expected ')' before ';' token 16 | for(int i=mid+1,int j=right;i<=right;i++,j--){ | ~ ^ | ) a.cc:16:49: error: expected ';' before ')' token 16 | for(int i=mid+1,int j=right;i<=right;i++,j--){ | ^ | ; a.cc:20:9: error: 'k' was not declared in this scope 20 | for(k=left;k<=right;k++){ | ^ a.cc:21:16: error: condition declares an array 21 | if(int temp[i]>=temp[j])x[k]=temp[i++]; | ^~~~
s130866903
p00001
C++
import java.util.Scanner; import java.util.Arrays; import acjava.util.Collections; class Main{ public static void main(String[] a){ Scanner sc=new Scanner(System.in); int[] input=new input[10]; for(int i=0;i<10;i++){ input[i]=sc.nextLine(); } Arrays.sort(input,Collections.reserveOrder()); for(int j=0;j<3;j++){ System.out.println(input[i]); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:2:1: error: 'import' does not name a type 2 | import java.util.Arrays; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: 'import' does not name a type 3 | import acjava.util.Collections; | ^~~~~~ a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:6:15: error: expected ':' before 'static' 6 | public static void main(String[] a){ | ^~~~~~~ | : a.cc:6:33: error: 'String' has not been declared 6 | public static void main(String[] a){ | ^~~~~~ a.cc:6:42: error: expected ',' or '...' before 'a' 6 | public static void main(String[] a){ | ^ a.cc:17:2: error: expected ';' after class definition 17 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:7:25: error: 'Scanner' was not declared in this scope 7 | Scanner sc=new Scanner(System.in); | ^~~~~~~ a.cc:8:28: error: structured binding declaration cannot have type 'int' 8 | int[] input=new input[10]; | ^~ a.cc:8:28: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:8:28: error: empty structured binding declaration a.cc:8:31: error: expected initializer before 'input' 8 | int[] input=new input[10]; | ^~~~~ a.cc:10:33: error: 'input' was not declared in this scope; did you mean 'int'? 10 | input[i]=sc.nextLine(); | ^~~~~ | int a.cc:10:42: error: 'sc' was not declared in this scope 10 | input[i]=sc.nextLine(); | ^~ a.cc:12:25: error: 'Arrays' was not declared in this scope 12 | Arrays.sort(input,Collections.reserveOrder()); | ^~~~~~ a.cc:12:37: error: 'input' was not declared in this scope; did you mean 'int'? 12 | Arrays.sort(input,Collections.reserveOrder()); | ^~~~~ | int a.cc:12:43: error: 'Collections' was not declared in this scope 12 | Arrays.sort(input,Collections.reserveOrder()); | ^~~~~~~~~~~ a.cc:14:17: error: 'System' was not declared in this scope 14 | System.out.println(input[i]); | ^~~~~~ a.cc:14:42: error: 'i' was not declared in this scope 14 | System.out.println(input[i]); | ^
s733400385
p00001
C++
#include<iostream> using namespace std; int main(){ int a=0,b=0,c=0,i,val,tmp_a,tmp_b; for(i=0;i<10;i++){ cin >> val >> endl; if(val>a){ tmp_a=a; a=val; tmp_b = b; b=tmp_a; c=tmp_b; }else if(val>b){ tmp_a = b; b = val; c = tmp_a; }else if(val>c){ c=val; } } cout << a << endl << b << endl << c << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:12: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 6 | cin >> val >> endl; | ~~~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'bool&' 170 | operator>>(bool& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short int&' 174 | operator>>(short& __n); | ~~~~~~~^~~ /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:34: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'short unsigned int&' 177 | operator>>(unsigned short& __n) | ~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:23: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'int&' 181 | operator>>(int& __n); | ~~~~~^~~ /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'unsigned int&' 184 | operator>>(unsigned int& __n) | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:24: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long int&' 188 | operator>>(long& __n) | ~~~~~~^~~ /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:33: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long unsigned int&' 192 | operator>>(unsigned long& __n) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:29: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long int&' 199 | operator>>(long long& __n) | ~~~~~~~~~~~^~~ /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:38: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long long unsigned int&' 203 | operator>>(unsigned long long& __n) | ~~~~~~~~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:25: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'void*&' 328 | operator>>(void*& __p) | ~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ^~~~~~~~ /usr/include/c++/14/istream:133:30: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::ios_base& (*)(std::ios_base&)' 133 | operator>>(ios_base& (*__pf)(ios_base&)) | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:352:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; __streambuf_type = std::basic_streambuf<char>]' 352 | operator>>(__streambuf_type* __sb); | ^~~~~~~~ /usr/include/c++/14/istream:352:36: note: no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::basic_istream<char>::__streambuf_type*' {aka 'std::basic_streambuf<char>*'} 352 | operator>>(__streambuf_type* __sb); | ~~~
s080124220
p00001
C++
#include<iostream> using namespace std; int main() { int yama[9]; int x,y,z.a; for(x=0; x<10; x++) { cin >> yama[x]; } for(y=0;y<10000; y++) { if(yama[y] > yama[y+1]) { z = yama[y]; yama[y] = yama[y+1]; yama[y+1] = z; } else { a++; } if(y == 8) { if(a == 9) { break; } else { y = 0; a = 0; } } } cout << yama[9] << endl; cout << yama[8] << endl; cout << yama[7] << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:18: error: expected initializer before '.' token 5 | int x,y,z.a; | ^ a.cc:11:25: error: 'z' was not declared in this scope 11 | z = yama[y]; | ^ a.cc:16:25: error: 'a' was not declared in this scope 16 | a++; | ^ a.cc:19:28: error: 'a' was not declared in this scope 19 | if(a == 9) { | ^
s119181158
p00001
C++
#include <cstdio> int main(){ int top3[3]; int i,tmp; for(i=0;i<10;i++){ scanf("%d",&data); if (top3[2]>data) {} else { top3[2]=data; if (top3[1]>data) {} else { top3[2]=top3[1]; if (top3[0]>data) top3[1]=data; else { top3[1]=top3[0]; top3[0]=data; }; }; }; }; for(i=0;i<3;i++) printf("%d\n",top[i]); };
a.cc: In function 'int main()': a.cc:6:15: error: 'data' was not declared in this scope 6 | scanf("%d",&data); | ^~~~ a.cc:22:19: error: 'top' was not declared in this scope; did you mean 'tmp'? 22 | printf("%d\n",top[i]); | ^~~ | tmp
s326448679
p00001
C++
#include <cstdio> int main(){ int top3[3]; int i,tmp,data; for(i=0;i<10;i++){ scanf("%d",&data); if (top3[2]>data) {} else { top3[2]=data; if (top3[1]>data) {} else { top3[2]=top3[1]; if (top3[0]>data) top3[1]=data; else { top3[1]=top3[0]; top3[0]=data; }; }; }; }; for(i=0;i<3;i++) printf("%d\n",top[i]); };
a.cc: In function 'int main()': a.cc:22:19: error: 'top' was not declared in this scope; did you mean 'tmp'? 22 | printf("%d\n",top[i]); | ^~~ | tmp
s908661733
p00001
C++
#include <cstdio> int main(){ int top3[3]; int i,tmp,data; for(i=0;i<3;i++) top3[i]=0; for(i=0;i<10;i++){ scanf("%d",&data); if (top3[2]>data) {} else { top3[2]=data; if (top3[1]>data) {} else { top3[2]=top3[1]; if (top3[0]>data) top3[1]=data; else { top3[1]=top3[0]; top3[0]=data; }; }; }; }; for(i=0;i<3;i++) printf("%d\n",top[i]); };
a.cc: In function 'int main()': a.cc:23:19: error: 'top' was not declared in this scope; did you mean 'tmp'? 23 | printf("%d\n",top[i]); | ^~~ | tmp
s214332890
p00001
C++
#include <cstdio> int main(){ int top3[3]; int i,tmp,data; for(i=0;i<3;i++) top3[i]=0; for(i=0;i<10;i++){ scanf("%d",&data); if (top3[2]>data) {} else { top3[2]=data; if (top3[1]>data) {} else { top3[2]=top3[1]; if (top3[0]>data) top3[1]=data; else { top3[1]=top3[0]; top3[0]=data; }; }; }; }; for(i=0;i<3;i++) printf("%d\n",top[i]); return 0; };
a.cc: In function 'int main()': a.cc:23:19: error: 'top' was not declared in this scope; did you mean 'tmp'? 23 | printf("%d\n",top[i]); | ^~~ | tmp
s634675123
p00001
C++
#include <iostream> using namespace std; int main(){ int[3] top = {0,0,0}; while(cin.peek != EOF){ int h; cin >> h; if(h > top[2]){ top[2] = h; if(h > top[1]){ top[2] = top[1]; top[1] = h; if(h > top[0]){ top[1]=top[0]; top[0]=h; } } } } return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: expected identifier before numeric constant 6 | int[3] top = {0,0,0}; | ^ a.cc:6:5: error: expected ']' before numeric constant 6 | int[3] top = {0,0,0}; | ^ | ] a.cc:6:4: error: structured binding declaration cannot have type 'int' 6 | int[3] top = {0,0,0}; | ^ a.cc:6:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:6:4: error: empty structured binding declaration a.cc:6:8: error: expected initializer before 'top' 6 | int[3] top = {0,0,0}; | ^~~ a.cc:8:11: error: invalid use of member function 'std::basic_istream<_CharT, _Traits>::int_type std::basic_istream<_CharT, _Traits>::peek() [with _CharT = char; _Traits = std::char_traits<char>; int_type = int]' (did you forget the '()' ?) 8 | while(cin.peek != EOF){ | ~~~~^~~~ | () a.cc:11:8: error: 'top' was not declared in this scope 11 | if(h > top[2]){ | ^~~
s809968553
p00001
C++
#include <iostream> using namespace std; int main(){ int[3] top = {0,0,0}; while(cin.peek != EOF){ int h; cin >> h; if(h > top[2]){ top[2] = h; if(h > top[1]){ top[2] = top[1]; top[1] = h; if(h > top[0]){ top[1]=top[0]; top[0]=h; } } } } cout << top[0] << endl << top[1] << endl << top[2] << endl; return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: expected identifier before numeric constant 6 | int[3] top = {0,0,0}; | ^ a.cc:6:5: error: expected ']' before numeric constant 6 | int[3] top = {0,0,0}; | ^ | ] a.cc:6:4: error: structured binding declaration cannot have type 'int' 6 | int[3] top = {0,0,0}; | ^ a.cc:6:4: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto' a.cc:6:4: error: empty structured binding declaration a.cc:6:8: error: expected initializer before 'top' 6 | int[3] top = {0,0,0}; | ^~~ a.cc:8:11: error: invalid use of member function 'std::basic_istream<_CharT, _Traits>::int_type std::basic_istream<_CharT, _Traits>::peek() [with _CharT = char; _Traits = std::char_traits<char>; int_type = int]' (did you forget the '()' ?) 8 | while(cin.peek != EOF){ | ~~~~^~~~ | () a.cc:13:8: error: 'top' was not declared in this scope 13 | if(h > top[2]){ | ^~~ a.cc:27:9: error: 'top' was not declared in this scope 27 | cout << top[0] << endl << top[1] << endl << top[2] << endl; | ^~~
s938759064
p00001
C++
#include<iostream> int main(){ int f=0,s=0,t=0,num,tmp; for(int i=0;i<10;i++){ cin>>num; if(num>t){ t=num; } if(t>s){ tmp=s; s=t; t=tmp; } if(s>f){ tmp=f; f=s; s=tmp; } } cout << f << endl << s << endl << t << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin>>num; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:23:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 23 | cout << f << endl << s << endl << t << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:23:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 23 | cout << f << endl << s << endl << t << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s652422033
p00001
C++
#include <stdio.h> int main(){ int height[10], rank[3] = {0}; int i; for(i = 0; i < 10; i++){ scanf("%d", height[i]); if (rank[0] < height[i]){ rank[2] = rank[1]; rank[1] = rank[0]; rank[0] = height[i]; }else if (rank[1] < height[i]){ rank[2] = rank[1]; rank[1] = height[i]; }else if (rank[2] < height[i]){ rank[2] = height[i]; } } for(i = 0; i < 3; i++){ printf("%d\n", rank[i]) } return 0; }
a.cc: In function 'int main()': a.cc:23:32: error: expected ';' before '}' token 23 | printf("%d\n", rank[i]) | ^ | ; 24 | } | ~
s100402520
p00001
C++
#include <cstdio> #include <algorithm> #include <vector> #include <functional> using namespace std; int main() { int h[10] = { 0 }; for (int i = 0; i < 10; i++) { scanf_s("%d", &h[i]); //printf("%d\n", h[i]); } sort(h, h + 10, std::greater<int>()); for (int i = 0; i < 3; i++) { printf("%d\n", h[i]); } }
a.cc: In function 'int main()': a.cc:13:17: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 13 | scanf_s("%d", &h[i]); | ^~~~~~~ | scanf
s005978915
p00001
C++
int height[10]; void scan(){ for(int i = 0; i < 10; i++){ scanf("%d", &height[i]); } } void sorting(){ for(int numb = 0; numb < 9; numb++){ for(int num = 0; num < 9-numb; num++){ if(height[num] < height[num+1]){ int stock = height[num]; height[num] = height[num+1]; height[num+1] = stock; } } } } int main(){ scan(); sorting(); for(int a = 0; a < 3; a++){ printf("Height%d: %d\n", a, height[a]); } return 0; }
a.cc: In function 'void scan()': a.cc:5:5: error: 'scanf' was not declared in this scope; did you mean 'scan'? 5 | scanf("%d", &height[i]); | ^~~~~ | scan a.cc: In function 'int main()': a.cc:25:5: error: 'printf' was not declared in this scope 25 | printf("Height%d: %d\n", a, height[a]); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int height[10];
s113042678
p00001
C++
#include <iostream> #include <vector> using namespace std; int main() { int a; vector<int> v; while (cin >> a) { v.push_back(a); } sort(a.begin(), a.end(), greater<int>()); cout << a[0] << "\n" << a[1] << "\n" << a[2] << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:11:16: error: request for member 'begin' in 'a', which is of non-class type 'int' 11 | sort(a.begin(), a.end(), greater<int>()); | ^~~~~ a.cc:11:27: error: request for member 'end' in 'a', which is of non-class type 'int' 11 | sort(a.begin(), a.end(), greater<int>()); | ^~~ a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(a.begin(), a.end(), greater<int>()); | ^~~~ | short a.cc:13:18: error: invalid types 'int[int]' for array subscript 13 | cout << a[0] << "\n" << a[1] << "\n" << a[2] << "\n"; | ^ a.cc:13:34: error: invalid types 'int[int]' for array subscript 13 | cout << a[0] << "\n" << a[1] << "\n" << a[2] << "\n"; | ^ a.cc:13:50: error: invalid types 'int[int]' for array subscript 13 | cout << a[0] << "\n" << a[1] << "\n" << a[2] << "\n"; | ^
s135011779
p00001
C++
#include<iostream> using namespace std; int main() { int array[10], tmp; for (int i = 0; i < 10; i++) { cin >> array[i]; } for(int j = 0; i < 10; j++) { for(int k = 0; k < 9; k++) { if (array[k] < array[k+1]) { tmp = array[k]; array[k] = array[k+1]; array[k+1] = tmp; } } } for(int l = 0; l < 3; l++) { cout << array[l] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:18: error: 'i' was not declared in this scope 11 | for(int j = 0; i < 10; j++) { | ^
s711922859
p00001
C++
#include <iostream> #include <algorithm> using namespace std; int main() { int m[10]; for(int i=0; i<9; i++) cin >> m[i]; sort(a, a+10); for(int i=9; i>6; i++) cout << m[i] << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:14: error: 'a' was not declared in this scope 8 | sort(a, a+10); | ^
s233078028
p00001
C++
include <stdio.h> int main() { cin>>a>>b; int a,b; 1=1<a+b<10 2=10<a+b<100 3=100<a+b<1000 cout<<a<<b; }
a.cc:1:1: error: 'include' does not name a type 1 | include <stdio.h> | ^~~~~~~
s312196541
p00001
C++
#include "bits/stdc++.h" #include<unordered_map> #include<unordered_set> #pragma warning(disable:4996) using namespace std; using ld = long double; template<class T> using Table = vector<vector<T>>; int main() { vector<int>nums(10); for (int i = 0; i < N; ++i) { cin >> nums[i]; } sort(nums.begin(), nums.end(), greater<int>()); for (int i = 0; i < 3; ++i) { cout << nums[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:29: error: 'N' was not declared in this scope 13 | for (int i = 0; i < N; ++i) { | ^
s204143120
p00001
C++
#include "0001.hpp" #include<iostream> using namespace std; #include<algorithm> int main() { int a[10]; for(int i=0;i<10;i++) cin>>a[i]; sort(a,a+10); for(int j=0;j<3;j++){ cout<<a[i]; } return 0; }
a.cc:1:10: fatal error: 0001.hpp: No such file or directory 1 | #include "0001.hpp" | ^~~~~~~~~~ compilation terminated.
s878640272
p00001
C++
#include<iostream> using namespace std; #include<algorithm> int main() { int a[10]; for(int i=0;i<10;i++) cin>>a[i]; sort(a,a+10); for(int j=0;j<3;j++){ cout<<a[9-i]; } cout<<endl; return 0; }
a.cc: In function 'int main()': a.cc:12:19: error: 'i' was not declared in this scope 12 | cout<<a[9-i]; | ^
s238752435
p00001
C++
#include <iostream> #include <queue> int main() { priority_queue<int> q; int c; for (int i = 0; i < 10; ++i) { cin >> c; q.push(c); } for (int i = 0; i < 3; ++i) { cout << q.top() << endl; q.pop(); } return 0; }
a.cc: In function 'int main()': a.cc:5:3: error: 'priority_queue' was not declared in this scope; did you mean 'std::priority_queue'? 5 | priority_queue<int> q; | ^~~~~~~~~~~~~~ | std::priority_queue In file included from /usr/include/c++/14/queue:66, from a.cc:2: /usr/include/c++/14/bits/stl_queue.h:496:11: note: 'std::priority_queue' declared here 496 | class priority_queue | ^~~~~~~~~~~~~~ a.cc:5:18: error: expected primary-expression before 'int' 5 | priority_queue<int> q; | ^~~ a.cc:8:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 8 | cin >> c; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:9:5: error: 'q' was not declared in this scope 9 | q.push(c); | ^ a.cc:12:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 12 | cout << q.top() << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:12:13: error: 'q' was not declared in this scope 12 | cout << q.top() << endl; | ^ a.cc:12:24: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 12 | cout << q.top() << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s401452068
p00001
C++
#include<iostream> using namespace std; int main(){ int input; int first; int second; int third; for(int i,i<10,i++){ cin>>input; if(first<input){ first = input; }else if(second<input){ second = input; }else if(third<input){ third = input; } } cout<<first<<endl<<second<<endl<<third;<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: expected ';' before '<' token 9 | for(int i,i<10,i++){ | ^ | ; a.cc:9:12: error: expected primary-expression before '<' token a.cc:9:19: error: expected ';' before ')' token 9 | for(int i,i<10,i++){ | ^ | ; a.cc:21:40: error: expected primary-expression before '<<' token 21 | cout<<first<<endl<<second<<endl<<third;<<endl; | ^~
s656127614
p00001
C++
#include<iostream> using namespace std; int main(){ int input[10]; int first; int second; int third; for(int i,i<10,i++){ cin>>input[i]; if(first<input){ first = input[i]; }else if(second<input){ second = input[i]; }else if(third<input){ third = input[i]; } } cout<<first<<endl<<second<<endl<<third<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:12: error: expected ';' before '<' token 9 | for(int i,i<10,i++){ | ^ | ; a.cc:9:12: error: expected primary-expression before '<' token a.cc:9:19: error: expected ';' before ')' token 9 | for(int i,i<10,i++){ | ^ | ; a.cc:11:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(first<input){ | ~~~~~^~~~~~ a.cc:13:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | }else if(second<input){ | ~~~~~~^~~~~~ a.cc:15:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 15 | }else if(third<input){ | ~~~~~^~~~~~
s982221372
p00001
C++
#include<iostream> using namespace std; int main(){ int input[10]; int first; int second; int third; for(int i=0,i<10,i++){ cin>>input[i]; if(first<input){first = input[i];}else if(second<input){second = input[i];}else if(third<input){third = input[i];} } cout<<first<<endl;cout<<second<<endl;cout<<third<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:14: error: expected ';' before '<' token 8 | for(int i=0,i<10,i++){ | ^ | ; a.cc:8:14: error: expected primary-expression before '<' token a.cc:8:21: error: expected ';' before ')' token 8 | for(int i=0,i<10,i++){ | ^ | ; a.cc:10:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(first<input){first = input[i];}else | ~~~~~^~~~~~ a.cc:11:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(second<input){second = input[i];}else | ~~~~~~^~~~~~ a.cc:12:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(third<input){third = input[i];} | ~~~~~^~~~~~
s366501187
p00001
C++
#include<iostream> using namespace std; int main(){ int input[10]; int first; int second; int third; for(int i=0,i<10,i++){ cin>>input[i]; if(first<input){first = input[i];}else if(second<input){second = input[i];}else if(third<input){third = input[i];} } cout<<first<<endl; cout<<second<<endl; cout<<third<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:14: error: expected ';' before '<' token 8 | for(int i=0,i<10,i++){ | ^ | ; a.cc:8:14: error: expected primary-expression before '<' token a.cc:8:21: error: expected ';' before ')' token 8 | for(int i=0,i<10,i++){ | ^ | ; a.cc:10:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(first<input){first = input[i];}else | ~~~~~^~~~~~ a.cc:11:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(second<input){second = input[i];}else | ~~~~~~^~~~~~ a.cc:12:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(third<input){third = input[i];} | ~~~~~^~~~~~
s694077417
p00001
C++
#include<iostream> using namespace std; int main(){ int input[10]; int first; int second; int third; for(int i=0,i<10,i++){ cin>>input[i]; if(first<input){first = input[i];}else if(second<input){second = input[i];}else if(third<input){third = input[i];} } cout<<first<<endl; cout<<second<<endl; cout<<third<<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:14: error: expected ';' before '<' token 8 | for(int i=0,i<10,i++){ | ^ | ; a.cc:8:14: error: expected primary-expression before '<' token a.cc:8:21: error: expected ';' before ')' token 8 | for(int i=0,i<10,i++){ | ^ | ; a.cc:10:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(first<input){first = input[i];}else | ~~~~~^~~~~~ a.cc:11:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(second<input){second = input[i];}else | ~~~~~~^~~~~~ a.cc:12:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(third<input){third = input[i];} | ~~~~~^~~~~~
s259355403
p00001
C++
#include<iostream> using namespace std; int main(){ int input[10]; int first; int second; int third; for(int i=0;i<10;i++){ cin>>input[i]; if(first<input){first = input[i];}else if(second<input){second = input[i];}else if(third<input){third = input[i];} } cout<<first<<endl;cout<<second<<endl;cout<<third<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 10 | if(first<input){first = input[i];}else | ~~~~~^~~~~~ a.cc:11:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(second<input){second = input[i];}else | ~~~~~~^~~~~~ a.cc:12:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(third<input){third = input[i];} | ~~~~~^~~~~~
s133594459
p00001
C++
#include<iostream> using namespace std; int main(){ int input[10]; int first; int second; int third; int i=0 for(;i<10;i++){ cin>>input[i]; if(first<input){first = input[i];}else if(second<input){second = input[i];}else if(third<input){third = input[i];} } cout<<first<<endl;cout<<second<<endl;cout<<third<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:1: error: expected ',' or ';' before 'for' 9 | for(;i<10;i++){ | ^~~ a.cc:9:14: error: expected ';' before ')' token 9 | for(;i<10;i++){ | ^ | ;
s463954702
p00001
C++
#include<iostream> using namespace std; int main(){ int input[10]; int first; int second; int third; int i=0; for(;i<10;i++){ cin>>input[i]; if(first<input){first = input[i];}else if(second<input){second = input[i];}else if(third<input){third = input[i];} } cout<<first<<endl;cout<<second<<endl;cout<<third<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 11 | if(first<input){first = input[i];}else | ~~~~~^~~~~~ a.cc:12:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 12 | if(second<input){second = input[i];}else | ~~~~~~^~~~~~ a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] 13 | if(third<input){third = input[i];} | ~~~~~^~~~~~
s053839818
p00001
C++
#include <iostream> #include <vector> using namespace std; int main() { vector<int> hills; for (int i = 0; i < 10; i++) { int x; cin >> x; hills.push_back(x); } sort(hills.begin(), hills.end(), greater<int>()); for (int i = 0; i < 3; i++) { cout << hills[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(hills.begin(), hills.end(), greater<int>()); | ^~~~ | short
s920613499
p00001
C++
#include <iostream> #include <vector> using namespace std; int main() { vector<int> hills; for (int i = 0; i < 10; i++) { int x; cin >> x; hills.push_back(x); } std::sort(hills.begin(), hills.end(), std::greater<int>()); for (int i = 0; i < 3; i++) { cout << hills[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:12:8: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 12 | std::sort(hills.begin(), hills.end(), std::greater<int>()); | ^~~~ | qsort
s994209208
p00001
C++
#include<iostream> using namespace std; int main(){ int x[10],tmp,i,j; for(i=0; i<10; ++i) cin >> x[i]; sort(x,x+10,greater<int>()); /* for(i=0; i<10; ++i){ for(j=i+1; j<10; ++j){ if(x[i] < x[j]){ tmp = x[i]; x[i] = x[j]; x[j] = tmp; } } */ } for(i=0; i<3; ++i) cout << x[i] << "\n"; return 0; }
a.cc: In function 'int main()': a.cc:11:3: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(x,x+10,greater<int>()); | ^~~~ | short a.cc: At global scope: a.cc:25:3: error: expected unqualified-id before 'for' 25 | for(i=0; i<3; ++i) | ^~~ a.cc:25:12: error: 'i' does not name a type 25 | for(i=0; i<3; ++i) | ^ a.cc:25:17: error: expected unqualified-id before '++' token 25 | for(i=0; i<3; ++i) | ^~ a.cc:28:5: error: expected unqualified-id before 'return' 28 | return 0; | ^~~~~~ a.cc:29:1: error: expected declaration before '}' token 29 | } | ^
s409136691
p00001
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int x[10],tmp,i,j; for(i=0; i<10; ++i) cin >> x[i]; sort(x,x+10,greater<int>()); /* for(i=0; i<10; ++i){ for(j=i+1; j<10; ++j){ if(x[i] < x[j]){ tmp = x[i]; x[i] = x[j]; x[j] = tmp; } } */ } for(i=0; i<3; ++i) cout << x[i] << "\n"; return 0; }
a.cc:26:3: error: expected unqualified-id before 'for' 26 | for(i=0; i<3; ++i) | ^~~ a.cc:26:12: error: 'i' does not name a type 26 | for(i=0; i<3; ++i) | ^ a.cc:26:17: error: expected unqualified-id before '++' token 26 | for(i=0; i<3; ++i) | ^~ a.cc:29:5: error: expected unqualified-id before 'return' 29 | return 0; | ^~~~~~ a.cc:30:1: error: expected declaration before '}' token 30 | } | ^
s035968089
p00001
C++
int main(){ int hight[NUM]; // ??\???????????? int top[TOP]; // ????????????????????? for(int i=0; i < NUM ; ){ cin >> hight[i]; // ?????¶ : 0 <= ?±±????????? <= 10000 if(hight[i] < 0 || hight[i] > 10000){ continue; } i++; } // ?????????????????????TOP??????????????? top[0] = 0; for(int i=0; i < NUM ; i++){ for(int j=0;j<TOP ; j++){ // ???????????????????????????????????°???hight[i]???top[j]?????????????????\????????? if(hight[i] > top[j]){ for(int k=TOP-1 ; k > j ; k--){ top[k] = top[k-1]; // <- ????????§?????°????????? } top[j] = hight[i]; break; } } } // ?????????TOP??????????????? for(int i=0; i < TOP ; i++ ){ cout << top[i] << '\n'; } return 0; }
a.cc: In function 'int main()': a.cc:3:19: error: 'NUM' was not declared in this scope 3 | int hight[NUM]; // ??\???????????? | ^~~ a.cc:4:17: error: 'TOP' was not declared in this scope 4 | int top[TOP]; | ^~~ a.cc:8:17: error: 'cin' was not declared in this scope 8 | cin >> hight[i]; | ^~~ a.cc:8:24: error: 'hight' was not declared in this scope 8 | cin >> hight[i]; | ^~~~~ a.cc:17:9: error: 'top' was not declared in this scope 17 | top[0] = 0; | ^~~ a.cc:21:28: error: 'hight' was not declared in this scope 21 | if(hight[i] > top[j]){ | ^~~~~ a.cc:33:17: error: 'cout' was not declared in this scope 33 | cout << top[i] << '\n'; | ^~~~
s855006709
p00001
C++
#include<algorithm> using namespace std; int main() { unsigned int height[10]; for (int i = 0; i < 10; i++) { cin >> height[i]; } sort(height, height + 10); cout << height[9] << endl; cout << height[8] << endl; cout << height[7] << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:17: error: 'cin' was not declared in this scope 10 | cin >> height[i]; | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include<algorithm> +++ |+#include <iostream> 2 | using namespace std; a.cc:15:9: error: 'cout' was not declared in this scope 15 | cout << height[9] << endl; | ^~~~ a.cc:15:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:15:30: error: 'endl' was not declared in this scope 15 | cout << height[9] << endl; | ^~~~ a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 1 | #include<algorithm> +++ |+#include <ostream> 2 | using namespace std;
s030089904
p00001
C++
#include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> using namespace std; int main(void) { int a[10]={}; int i=0; int j=0; for(i=0;i<10;i++) cin>>a[i]; sort(a,a+10); cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; }
a.cc: In function 'int main()': a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(a,a+10); | ^~~~ | short
s233886996
p00001
C++
#include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> using namespace std; int main(void) { int a[10]={}; int i=0; int j=0; for(i=0;i<10;i++) cin>>a[i]; sort(a,a+10); cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; }
a.cc: In function 'int main()': a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(a,a+10); | ^~~~ | short
s157873718
p00001
C++
#include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> using namespace std; int main(void) { int a[10]={}; int i=0; int j=0; for(i=0;i<10;i++) cin>>a[i]; sort(a,a+10); cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; }
a.cc: In function 'int main()': a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(a,a+10); | ^~~~ | short
s358763080
p00001
C++
#include<iostream> using namespace std; int main(void) { int a[10]={}; int i=0; int j=0; for(i=0;i<10;i++) cin>>a[i]; sort(a,a+10); cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; }
a.cc: In function 'int main()': a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(a,a+10); | ^~~~ | short
s246400047
p00001
C++
#include<iostream> using namespace std; int main(void) { int a[10]={}; int i=0; int j=0; for(i=0;i<10;i++) cin>>a[i]; sort(a,a+10); cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; }
a.cc: In function 'int main()': a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(a,a+10); | ^~~~ | short
s412514123
p00001
C++
#include<iostream> using namespace std; int main(void) { int a[10]={}; int i=0; int j=0; for(i=0;i<10;i++) cin>>a[i]; sort(a,a+10); cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; }
a.cc: In function 'int main()': a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(a,a+10); | ^~~~ | short
s627038503
p00001
C++
#include<iostream> using namespace std; int main(void) { int a[10]={}; int i=0; int j=0; for(i=0;i<10;i++) cin>>a[i]; sort(a,a+10); cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; }
a.cc: In function 'int main()': a.cc:12:3: error: 'sort' was not declared in this scope; did you mean 'short'? 12 | sort(a,a+10); | ^~~~ | short
s026361360
p00001
C++
#include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> using namespace std; int main(void) { int a[10]={}; int i=0; int j=0; for(i=0;i<10;i++) cin>>a[i]; sort(a,a+10); cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; }
a.cc: In function 'int main()': a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(a,a+10); | ^~~~ | short
s482300041
p00001
C++
#include<iostream> #include<queue> #include<string> #include<stack> #include<cstdio> using namespace std; int main(void) { int a[10]={}; int i=0; int j=0; for(i=0;i<10;i++) cin>>a[i]; sort(a,a+10); cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:18:3: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(a,a+10); | ^~~~ | short
s511016569
p00001
C++
#include <stdio.h> int main(){ int a,b,c,d,e,f,g,h,i,j; int n1,n2,n3; scanf("%d",&a); scanf("%d",&b); if(b > a){ n1 = b n2 = a; }else{ n1 = a; n2 = b; } scanf("%d",&c); if(c > n1){ n2 = n1; n1 = c; }else if(c > n2){ n3 = n2; n2 = c; }else{ n3 = c; } scanf("%d",&d); if(d > n1){ n3 = n2; n2 = n1; n1 = d; }else if(d > n2){ n3 = n2; n2 = d; }else if(d > n3){ n3 = d; } scanf("%d",&e); if(e > n1){ n3 = n2; n2 = n1; n1 = e; }else if(e > n2){ n3 = n2; n2 = e; }else if(e > n3){ n3 = e; } scanf("%d",&f); if(f > n1){ n3 = n2; n2 = n1; n1 = f; }else if(f > n2){ n3 = n2; n2 = f; }else if(f > n3){ n3 = f; } scanf("%d",&g); if(g > n1){ n3 = n2; n2 = n1; n1 = g; }else if(g > n2){ n3 = n2; n2 = g; }else if(g > n3){ n3 = g; } scanf("%d",&h); if(h > n1){ n3 = n2; n2 = n1; n1 = h; }else if(h > n2){ n3 = n2; n2 = h; }else if(h > n3){ n3 = h; } scanf("%d",&i); if(i > n1){ n3 = n2; n2 = n1; n1 = i; }else if(i > n2){ n3 = n2; n2 = i; }else if(i > n3){ n3 = i; } scanf("%d",&j); if(j > n1){ n3 = n2; n2 = n1; n1 = j; }else if(j > n2){ n3 = n2; n2 = j; }else if(j > n3){ n3 = j; } printf("%d\n",n1); printf("%d\n",n2); printf("%d\n",n3); return 0; }
a.cc: In function 'int main()': a.cc:13:15: error: expected ';' before 'n2' 13 | n1 = b | ^ | ; 14 | n2 = a; | ~~
s726704784
p00001
C++
#include<stdio.h> int main(void) { int c[12],top=0,second=0,thread=0; for (time_t i = 1; i <= 10; i++) { scanf("%d", &c[i]); if (c[i]>top) { second = top; top = c[i]; } else { if (c[i]>second) { thread = second; second = c[i]; } else { if (c[i]>thread) { thread = c[i]; } } } } printf("%d\n%d\n%d\n", top, second, thread); return 0; }
a.cc: In function 'int main()': a.cc:4:14: error: 'time_t' was not declared in this scope 4 | for (time_t i = 1; i <= 10; i++) | ^~~~~~ a.cc:2:1: note: 'time_t' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>' 1 | #include<stdio.h> +++ |+#include <ctime> 2 | int main(void) { a.cc:4:28: error: 'i' was not declared in this scope 4 | for (time_t i = 1; i <= 10; i++) | ^
s171442328
p00001
C++
#include<iostream>?¬ using namespace std;?¬ ?¬ const int MAX_N = 9;?¬ int a[MAX_N];?¬ ?¬ int main(){?¬ ?¬ for(int i=0; i<=MAX_N; i++){?¬ cin >> a[i];?¬ }?¬ ?¬ sort(a,a+10);?¬ cout << a[9] << endl << a[8] << endl << a[7] << endl;?¬ ?¬ return 0;?¬ }?¬
a.cc:1:19: warning: extra tokens at end of #include directive 1 | #include<iostream>?¬ | ^ a.cc:1:20: error: extended character ¬ is not valid in an identifier 1 | #include<iostream>?¬ | ^ a.cc:2:25: error: extended character ¬ is not valid in an identifier 2 | using namespace std;?¬ | ^ a.cc:3:5: error: extended character ¬ is not valid in an identifier 3 | ?¬ | ^ a.cc:4:25: error: extended character ¬ is not valid in an identifier 4 | const int MAX_N = 9;?¬ | ^ a.cc:5:18: error: extended character ¬ is not valid in an identifier 5 | int a[MAX_N];?¬ | ^ a.cc:6:7: error: extended character ¬ is not valid in an identifier 6 | ?¬ | ^ a.cc:7:16: error: extended character ¬ is not valid in an identifier 7 | int main(){?¬ | ^ a.cc:8:5: error: extended character ¬ is not valid in an identifier 8 | ?¬ | ^ a.cc:9:37: error: extended character ¬ is not valid in an identifier 9 | for(int i=0; i<=MAX_N; i++){?¬ | ^ a.cc:10:25: error: extended character ¬ is not valid in an identifier 10 | cin >> a[i];?¬ | ^ a.cc:11:10: error: extended character ¬ is not valid in an identifier 11 | }?¬ | ^ a.cc:12:10: error: extended character ¬ is not valid in an identifier 12 | ?¬ | ^ a.cc:13:22: error: extended character ¬ is not valid in an identifier 13 | sort(a,a+10);?¬ | ^ a.cc:14:62: error: extended character ¬ is not valid in an identifier 14 | cout << a[9] << endl << a[8] << endl << a[7] << endl;?¬ | ^ a.cc:15:5: error: extended character ¬ is not valid in an identifier 15 | ?¬ | ^ a.cc:16:18: error: extended character ¬ is not valid in an identifier 16 | return 0;?¬ | ^ a.cc:17:6: error: extended character ¬ is not valid in an identifier 17 | }?¬ | ^ a.cc:2:24: error: expected unqualified-id before '?' token 2 | using namespace std;?¬ | ^ a.cc:4:24: error: expected unqualified-id before '?' token 4 | const int MAX_N = 9;?¬ | ^ a.cc:5:17: error: expected unqualified-id before '?' token 5 | int a[MAX_N];?¬ | ^ a.cc:17:5: error: expected unqualified-id before '?' token 17 | }?¬ | ^
s003645907
p00001
C++
#include<iostream> using namespace std; const int MAX_N = 9; int a[MAX_N]; int main(){ for(int i=0; i<=MAX_N; i++){ cin >> a[i]; } sort(a,a+10); cout << a[9] << endl << a[8] << endl << a[7] << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(a,a+10); | ^~~~ | short
s792735436
p00001
C++
#include<iostream> using namespace std; const int MAX_N = 9; int a[MAX_N]; int main(){ for(int i=0; i<=MAX_N; i++){ cin >> a[i]; } sort(a,a+10); cout << a[9] << endl << a[8] << endl << a[7] << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:5: error: 'sort' was not declared in this scope; did you mean 'short'? 13 | sort(a,a+10); | ^~~~ | short
s491653992
p00001
C++
#include<iostream> using namespace std; const int MAX_N = 9; int a[MAX_N]; int main(){ for(int i=0; i<=MAX_N; i++){ cin >> a[i]; } std::sort(a,a+10); cout << a[9] << endl << a[8] << endl << a[7] << endl; return 0; }
a.cc: In function 'int main()': a.cc:13:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 13 | std::sort(a,a+10); | ^~~~ | qsort
s479731764
p00001
C++
#include<iostream> using namespace std; int main(){ int a; int x=0; int y=0; int z=0; for(int i=1,i<=10,i++){ cin >> a; if(a>x){ x=a; }else if(y<a<=x){ y=a; }else if(z<a<=y){ z=a; } } cout << x << endl; cout << y << endl; cout << z << endl; }
a.cc: In function 'int main()': a.cc:8:16: error: expected ';' before '<=' token 8 | for(int i=1,i<=10,i++){ | ^~ | ; a.cc:8:16: error: expected primary-expression before '<=' token 8 | for(int i=1,i<=10,i++){ | ^~ a.cc:8:24: error: expected ';' before ')' token 8 | for(int i=1,i<=10,i++){ | ^ | ;
s414757359
p00001
C++
include<algorithm> #include<iostream> #include<vector> using namespace std; int main(){ vector<int> a(10, 0); for (int i = 0; i < 10; i++){ cin >> a[i]; } sort(a.begin(), a.end(), greater<int>()); cout << a[0] << endl << a[1] << endl << a[2] << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include<algorithm> | ^~~~~~~ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:2: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared 173 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function 179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 179 | _GLIBCXX
s127186027
p00001
C++
#include<iostream> using namespace std; int main(){ int max[3]={0},a,i; for(i=0;i<10;i++){ cin>>a; if(a>max[0]){max[2]=max[1];max[1]=max[0];max[0]=a;} else if(a>max[1]){max[2]=max[1];max[1]=a;} else if(a>max[2]){max[2]=a;} for(i=0;i<3;i++)cout<<max[i]<<endl; return 0;}
a.cc: In function 'int main()': a.cc:11:11: error: expected '}' at end of input 11 | return 0;} | ^ a.cc:3:11: note: to match this '{' 3 | int main(){ | ^
s394022671
p00001
C++
int main() { int i,j; int rank1 = 0; int mountain[10] = {0}; for (i = 0; i < 10; i++) { scanf_s("%d", &mountain[i]); } for (i = 0; i < 10; i++) { for (j = i + 1; j < 10; j++) { if (mountain[j] > mountain[i]) { rank1 = mountain[i]; mountain[i] = mountain[j]; mountain[j] = rank1; } } } for (i = 0; i < 3; i++) { printf("%d\n", mountain[i]); } return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: 'scanf_s' was not declared in this scope 7 | scanf_s("%d", &mountain[i]); | ^~~~~~~ a.cc:25:17: error: 'printf' was not declared in this scope 25 | printf("%d\n", mountain[i]); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int main()
s008210202
p00001
C++
int main() { int i,j; int rank1 = 0; int mountain[10] = {0}; for (i = 0; i < 10; i++) { scanf_s("%d", &mountain[i]); } for (i = 0; i < 10; i++) { for (j = i + 1; j < 10; j++) { if (mountain[j] > mountain[i]) { rank1 = mountain[i]; mountain[i] = mountain[j]; mountain[j] = rank1; } } } for (i = 0; i < 3; i++) { printf("%d\n", mountain[i]); } return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: 'scanf_s' was not declared in this scope 7 | scanf_s("%d", &mountain[i]); | ^~~~~~~ a.cc:25:17: error: 'printf' was not declared in this scope 25 | printf("%d\n", mountain[i]); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int main()
s418728190
p00001
C++
int main() { int i,j; int rank1 = 0; int mountain[10] = {0}; for (i = 0; i < 10; i++) { scanf("%d", &mountain[i]); } for (i = 0; i < 10; i++) { for (j = i + 1; j < 10; j++) { if (mountain[j] > mountain[i]) { rank1 = mountain[i]; mountain[i] = mountain[j]; mountain[j] = rank1; } } } for (i = 0; i < 3; i++) { printf("%d\n", mountain[i]); } return 0; }
a.cc: In function 'int main()': a.cc:7:17: error: 'scanf' was not declared in this scope 7 | scanf("%d", &mountain[i]); | ^~~~~ a.cc:25:17: error: 'printf' was not declared in this scope 25 | printf("%d\n", mountain[i]); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | int main()
s135463240
p00001
C++
#include<stdio.h> int main(void) { int a,b,max= 0,max2=0,max3=0; for(a 1;a<=10;a++){ scanf("%d",&b); if(b>max) { max=b; } else if(b>max2){ max2=b; } else if(b>max3){ max3=b; } } printf("%d\n %d\n %d\n",max,max2,max3); return 0; }
a.cc: In function 'int main()': a.cc:5:14: error: expected ';' before numeric constant 5 | for(a 1;a<=10;a++){ | ^~ | ;
s089976623
p00001
C++
#include<iostream> using namespace std; int main(){ int m[10]; for (int i =0; i < 10; i++){ cin << m ; } m.sort(); cout << m[9] << endl; cout << m[8] << endl; cout << m[7] << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:6: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [10]') 7 | cin << m ; | ~~~ ^~ ~ | | | | | int [10] | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << m ; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:7:2: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 7 | cin << m ; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << m ; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:7:9: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 7 | cin << m ; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int [10]]': a.cc:7:9: required from here 7 | cin << m ; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ a.cc:9:3: error: request for member 'sort' in 'm', which is of non-class type 'int [10]' 9 | m.sort(); | ^~~~
s093147433
p00001
C++
#include<iostream> using namespace std; int main(){ int m[10]; for (int i =0; i < 10; i++){ cin >> m ; } m.sort(); cout << m[9] << endl; cout << m[8] << endl; cout << m[7] << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:6: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int [10]') 7 | cin >> m ; | ~~~ ^~ ~ | | | | | int [10] | std::istream {aka std::basic_istream<char>} In file included from /usr/include/c++/14/iostream:42, from a.cc:1: /usr/include/c++/14/istream:170:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(bool&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 170 | operator>>(bool& __n) | ^~~~~~~~ /usr/include/c++/14/istream:170:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: cannot bind non-const lvalue reference of type 'bool&' to a value of type 'int*' 7 | cin >> m ; | ^ /usr/include/c++/14/istream:174:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(short int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 174 | operator>>(short& __n); | ^~~~~~~~ /usr/include/c++/14/istream:174:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: invalid conversion from 'int*' to 'short int' [-fpermissive] 7 | cin >> m ; | ^ | | | int* a.cc:7:10: error: cannot bind rvalue '(short int)((int*)(& m))' to 'short int&' /usr/include/c++/14/istream:177:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(short unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 177 | operator>>(unsigned short& __n) | ^~~~~~~~ /usr/include/c++/14/istream:177:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: invalid conversion from 'int*' to 'short unsigned int' [-fpermissive] 7 | cin >> m ; | ^ | | | int* a.cc:7:10: error: cannot bind rvalue '(short unsigned int)((int*)(& m))' to 'short unsigned int&' /usr/include/c++/14/istream:181:7: note: candidate: 'std::basic_istream<_CharT, _Traits>& std::basic_istream<_CharT, _Traits>::operator>>(int&) [with _CharT = char; _Traits = std::char_traits<char>]' (near match) 181 | operator>>(int& __n); | ^~~~~~~~ /usr/include/c++/14/istream:181:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: invalid conversion from 'int*' to 'int' [-fpermissive] 7 | cin >> m ; | ^ | | | int* a.cc:7:10: error: cannot bind rvalue '(int)((int*)(& m))' to 'int&' /usr/include/c++/14/istream:184:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 184 | operator>>(unsigned int& __n) | ^~~~~~~~ /usr/include/c++/14/istream:184:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: invalid conversion from 'int*' to 'unsigned int' [-fpermissive] 7 | cin >> m ; | ^ | | | int* a.cc:7:10: error: cannot bind rvalue '(unsigned int)((int*)(& m))' to 'unsigned int&' /usr/include/c++/14/istream:188:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 188 | operator>>(long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:188:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: invalid conversion from 'int*' to 'long int' [-fpermissive] 7 | cin >> m ; | ^ | | | int* a.cc:7:10: error: cannot bind rvalue '(long int)((int*)(& m))' to 'long int&' /usr/include/c++/14/istream:192:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 192 | operator>>(unsigned long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:192:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: invalid conversion from 'int*' to 'long unsigned int' [-fpermissive] 7 | cin >> m ; | ^ | | | int* a.cc:7:10: error: cannot bind rvalue '(long unsigned int)((int*)(& m))' to 'long unsigned int&' /usr/include/c++/14/istream:199:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 199 | operator>>(long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:199:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: invalid conversion from 'int*' to 'long long int' [-fpermissive] 7 | cin >> m ; | ^ | | | int* a.cc:7:10: error: cannot bind rvalue '(long long int)((int*)(& m))' to 'long long int&' /usr/include/c++/14/istream:203:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long long unsigned int&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 203 | operator>>(unsigned long long& __n) | ^~~~~~~~ /usr/include/c++/14/istream:203:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: invalid conversion from 'int*' to 'long long unsigned int' [-fpermissive] 7 | cin >> m ; | ^ | | | int* a.cc:7:10: error: cannot bind rvalue '(long long unsigned int)((int*)(& m))' to 'long long unsigned int&' /usr/include/c++/14/istream:328:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(void*&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' (near match) 328 | operator>>(void*& __p) | ^~~~~~~~ /usr/include/c++/14/istream:328:7: note: conversion of argument 1 would be ill-formed: a.cc:7:10: error: cannot bind non-const lvalue reference of type 'void*&' to an rvalue of type 'void*' 7 | cin >> m ; | ^ /usr/include/c++/14/istream:219:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(float&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 219 | operator>>(float& __f) | ^~~~~~~~ /usr/include/c++/14/istream:219:25: note: no known conversion for argument 1 from 'int [10]' to 'float&' 219 | operator>>(float& __f) | ~~~~~~~^~~ /usr/include/c++/14/istream:223:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 223 | operator>>(double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:223:26: note: no known conversion for argument 1 from 'int [10]' to 'double&' 223 | operator>>(double& __f) | ~~~~~~~~^~~ /usr/include/c++/14/istream:227:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(long double&) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 227 | operator>>(long double& __f) | ^~~~~~~~ /usr/include/c++/14/istream:227:31: note: no known conversion for argument 1 from 'int [10]' to 'long double&' 227 | operator>>(long double& __f) | ~~~~~~~~~~~~~^~~ /usr/include/c++/14/istream:122:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__istream_type& (*)(__istream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:122:36: note: no known conversion for argument 1 from 'int [10]' to 'std::basic_istream<char>::__istream_type& (*)(std::basic_istream<char>::__istream_type&)' {aka 'std::basic_istream<char>& (*)(std::basic_istream<char>&)'} 122 | operator>>(__istream_type& (*__pf)(__istream_type&)) | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:126:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(__ios_type& (*)(__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>; __ios_type = std::basic_ios<char>]' 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ^~~~~~~~ /usr/include/c++/14/istream:126:32: note: no known conversion for argument 1 from 'int [10]' to 'std::basic_istream<char>::__ios_type& (*)(std::basic_istream<char>::__ios_type&)' {aka 'std::basic_ios<char>& (*)(std::basic_ios<char>&)'} 126 | operator>>(__ios_type& (*__pf)(__ios_type&)) | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ /usr/include/c++/14/istream:133:7: note: candidate: 'std::basic_istream<_CharT, _Traits>::__istream_type& std::basic_istream<_CharT, _Traits>::operator>>(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; __istream_type = std::basic_istream<char>]' 133
s976324528
p00001
C++
num=[] for i in 0..9 num[i]=gets.to_i end for i in 0..2 ans=0 for j in 0..9 if ans<num[j] ans=num[j] set=j end end puts ans num[set]=0 end
a.cc:2:10: error: too many decimal points in number 2 | for i in 0..9 | ^~~~ a.cc:5:10: error: too many decimal points in number 5 | for i in 0..2 | ^~~~ a.cc:7:10: error: too many decimal points in number 7 | for j in 0..9 | ^~~~ a.cc:1:1: error: 'num' does not name a type; did you mean 'enum'? 1 | num=[] | ^~~ | enum
s804953596
p00001
C++
#include<stdio.h> nit mian(void) { int i,j,n[11] for(i=0;i<10;i++){ scanf("%d",n[i]); } for(i=0;i<10;i++){ for(j=0;j<=10;j++){ if(n[j]<=n[i]){ w=n[i]; n[i]=n[j]; n[j]=w; } } } for(i=0;i<3;i++){ printf("%d\n",y[i]); } return 0; }
a.cc:2:1: error: 'nit' does not name a type; did you mean 'int'? 2 | nit mian(void) | ^~~ | int
s629492451
p00001
C++
#include<stdio.h> nit mian(void) { int i,j,n[11],w; for(i=0;i<10;i++){ scanf("%d",n[i]); } for(i=0;i<10;i++){ for(j=0;j<=10;j++){ if(n[j]<=n[i]){ w=n[i]; n[i]=n[j]; n[j]=w; } } } for(i=0;i<3;i++){ printf("%d\n",y[i]); } return 0; }
a.cc:2:1: error: 'nit' does not name a type; did you mean 'int'? 2 | nit mian(void) | ^~~ | int
s418252951
p00001
C++
#include<stdio.h> int mian(void) { int i,j,n[11],w; for(i=0;i<10;i++){ scanf("%d",n[i]); } for(i=0;i<10;i++){ for(j=0;j<=10;j++){ if(n[j]<=n[i]){ w=n[i]; n[i]=n[j]; n[j]=w; } } } for(i=0;i<3;i++){ printf("%d\n",y[i]); } return 0; }
a.cc: In function 'int mian()': a.cc:18:31: error: 'y' was not declared in this scope 18 | printf("%d\n",y[i]); | ^
s226744752
p00001
C++
#include <studio.h> #include <iostream> intmain(){ int 1st, 2nd, 3rd, i, mou[10]; 1st = 0; 2nd = 0; 3rd = 0; for(i=1:i=<10:i++){ cin >> mou[i]; if(mou[i] > 1st){ 3rd = 2nd; 2nd = 1st; 1st = mou[i]; break; } if(mou[i] > 2nd){ 3rd = 2nd; 2nd = mou[i]; break; } if(mou[i] > 3rd){ 3rd = mou[i]; break; } } cout << 1st << "\n" << 2nd << "\n" << 3rd << endl; return 0; }
a.cc:1:10: fatal error: studio.h: No such file or directory 1 | #include <studio.h> | ^~~~~~~~~~ compilation terminated.
s735833415
p00001
C++
#include<iostream> using namespace std; int main(){ int num; int height[10]; for(int i=0;i<=9;i++) cin>>height[i]; for(int i=0;i<=9;i++){ for(int j=i+1;j<=9;j++){ if(height[i]<=height[j]){ num=height[i]; height[i]=height[j]; height[j]=num; } } } for(i=0;i<=2;i++) cout<<height[i]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:19:13: error: 'i' was not declared in this scope 19 | for(i=0;i<=2;i++) | ^
s781103668
p00001
C++
#include<iostream> using namespace std; int main(){ int m[10]; for(int i=0; i<10; i++){ cin>>m[i]; } sort(m , m+10 ,greater<int>()); for(int i=0; i<3; i++){ cout << m[i] <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:5: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(m , m+10 ,greater<int>()); | ^~~~ | short
s301537711
p00001
C++
#include<iostream> #include<functional> using namespace std; int main(){ int m[10]; for(int i=0; i<10; i++){ cin>>m[i]; } sort(m , m+10 ,greater<int>()); for(int i=0; i<3; i++){ cout << m[i] <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:5: error: 'sort' was not declared in this scope; did you mean 'short'? 11 | sort(m , m+10 ,greater<int>()); | ^~~~ | short
s323319632
p00001
C++
#include<iostream> #include<vector> using namespace std; int main(){ vector<int> v; int x; while(cin>>x){ v.push_back(x); } sort(v.begin(),v.end()); cout<<v[0]<<endl; cout<<v[1]<<endl; cout<<v[2]<<endl; reutrn 0; }
a.cc: In function 'int main()': a.cc:10:1: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(v.begin(),v.end()); | ^~~~ | short a.cc:14:1: error: 'reutrn' was not declared in this scope 14 | reutrn 0; | ^~~~~~
s056489397
p00001
C++
#include<iostream> using namespace std; int main(){ int a[10]; for(int i=0;i<10;i++)cin>>a[i]; sort(a,a+10); cout<<a[0]<<endl; cout<<a[1]<<endl; cout<<a[2]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:1: error: 'sort' was not declared in this scope; did you mean 'short'? 6 | sort(a,a+10); | ^~~~ | short
s849577500
p00001
C++
#include<iostream> using namespace std; int main(){ int h[10]; for(int i = 0; i < 10, i++){ cin >> h[i]; } sort(h.begin(),h.end()); for(int i = 0; i < 3, i++){ cout << h[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:35: error: expected ';' before ')' token 7 | for(int i = 0; i < 10, i++){ | ^ | ; a.cc:10:16: error: request for member 'begin' in 'h', which is of non-class type 'int [10]' 10 | sort(h.begin(),h.end()); | ^~~~~ a.cc:10:26: error: request for member 'end' in 'h', which is of non-class type 'int [10]' 10 | sort(h.begin(),h.end()); | ^~~ a.cc:10:9: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(h.begin(),h.end()); | ^~~~ | short a.cc:12:34: error: expected ';' before ')' token 12 | for(int i = 0; i < 3, i++){ | ^ | ;
s661731241
p00001
C++
#include<iostream> #include <algorithm> using namespace std; int main(){ int h[10]; for(int i = 0; i < 10, i++){ cin >> h[i]; } sort(h.begin(),h.end()); for(int i = 0; i < 3, i++){ cout << h[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:35: error: expected ';' before ')' token 8 | for(int i = 0; i < 10, i++){ | ^ | ; a.cc:11:16: error: request for member 'begin' in 'h', which is of non-class type 'int [10]' 11 | sort(h.begin(),h.end()); | ^~~~~ a.cc:11:26: error: request for member 'end' in 'h', which is of non-class type 'int [10]' 11 | sort(h.begin(),h.end()); | ^~~ a.cc:13:34: error: expected ';' before ')' token 13 | for(int i = 0; i < 3, i++){ | ^ | ;
s331415765
p00001
C++
#include<iostream> #include <algorithm> using namespace std; int main(){ int h[10]; for(int i = 0; i < 10; i++){ cin >> h[i]; } sort(h.begin(),h.end()); for(int i = 0; i < 3; i++){ cout << h[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:16: error: request for member 'begin' in 'h', which is of non-class type 'int [10]' 11 | sort(h.begin(),h.end()); | ^~~~~ a.cc:11:26: error: request for member 'end' in 'h', which is of non-class type 'int [10]' 11 | sort(h.begin(),h.end()); | ^~~