submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s363585221
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,h+10,desc); for(int i = 0; i < 3; i++){ cout << h[i] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:21: error: 'desc' was not declared in this scope 11 | sort(h,h+10,desc); | ^~~~
s019162117
p00001
C++
#include <stdio.h> main(){ int h[10]; int st,nd,rd; st = 0; nd = 0; rd = 0; for(i=0;i<10;i++){ scanf("%d",&h[i]); if(h[i]>st){ st = h[i]; }else if(h[i]>nd){ nd = h[i]; }else if(h[i]>rd){ rd = h[i]; } } printf("%d\n%d\n%d\n",st,nd,rd); }
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 2 | main(){ | ^~~~ a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | for(i=0;i<10;i++){ | ^
s130154831
p00001
C++
#include<iostream> #include<algorithm> using namespace std; int x[10]; int main(){ for(i=0;i<10;i++){ cin>>x[i]; } sort(x,x+10); cout>>x[7]>>endl; cout>>x[8]>>endl; cout>>x[9]>>endl; return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'i' was not declared in this scope 7 | for(i=0;i<10;i++){ | ^ a.cc:11:5: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 11 | cout>>x[7]>>endl; | ~~~~^~~~~~ | | | | |...
s264182785
p00001
C++
#include<iostream> #include<algorithm> using namespace std; int x[10]; int main(){ for(i=0;i<10;i++){ cin>>x[i]; } sort(x,x+10); cout<<x[7]<<endl; cout<<x[8]<<endl; cout<<x[9]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'i' was not declared in this scope 7 | for(i=0;i<10;i++){ | ^
s894352729
p00001
C++
#include <stdio.h> int main(void){ int d, m1 ,m2 ,m3, i; for(i=0;i<10;i++){ scanf("%d",&d); if(d>m1){ m3=m2 ; m2=m1 ; m1=d ; }else if (d>m2){ m3=m2 ; m2=d ; }else if (m3<d){ m3=d ; } printf("%d\n%d\n%d\n", m1. m2 ,m3 ) ; return 0
a.cc: In function 'int main()': a.cc:16:36: error: request for member 'm2' in 'm1', which is of non-class type 'int' 16 | printf("%d\n%d\n%d\n", m1. m2 ,m3 ) ; | ^~ a.cc:17:17: error: expected ';' at end of input 17 | return 0 | ^ ...
s303857734
p00001
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 #include<stdio.h> int main(){ int i,j,t,data[10]; for(i=0;i<10;i++) { scanf("%d",&data[i]); } for(i=0;i<9;i++) { for(j=0;j<9-i;j++) { if(data[j]<data[j+1]) ...
a.cc:3:1: error: expected unqualified-id before numeric constant 3 | 1 | ^ a.cc: In function 'int main()': a.cc:39:9: error: 'scanf' was not declared in this scope 39 | scanf("%d",&data[i]); | ^~~~~ a.cc:56:9: error: 'printf' was not declared in this scope 56 | printf("%d\n...
s198579514
p00001
C++
Z:\H28\paso2016\toi02
a.cc:1:3: error: stray '\' in program 1 | Z:\H28\paso2016\toi02 | ^ a.cc:1:7: error: stray '\' in program 1 | Z:\H28\paso2016\toi02 | ^ a.cc:1:16: error: stray '\' in program 1 | Z:\H28\paso2016\toi02 | ^ a.cc:1:2: error: found ':' in nested-name-specifier, expected ...
s062228180
p00001
C++
h = [] 10.times {h << gets.to_i} h.sort.reverse.take(3).each{|hh| puts hh}
a.cc:1:1: error: 'h' does not name a type 1 | h = [] | ^ a.cc:3:1: error: 'h' does not name a type 3 | h.sort.reverse.take(3).each{|hh| puts hh} | ^
s804218729
p00001
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int main(){ vecctor<int> v; int num; for(int i = 0;i<10;i++){ cin>>num; v.push_back(num); } sort(v.end(),v.begin(),greater<int>()); for(int i = 0;i<3;i++) cout<<v.at(i); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'vecctor' was not declared in this scope 7 | vecctor<int> v; | ^~~~~~~ a.cc:7:13: error: expected primary-expression before 'int' 7 | vecctor<int> v; | ^~~ a.cc:11:9: error: 'v' was not declared in this scope 11 | v....
s955068944
p00001
C++
#include<iostream> #include<algorithm> #include<vector> using namespace std; int main(){ vecctor<int> v; int num; for(int i = 0;i<10;i++){ cin>>num; v.push_back(num); } sort(v.end(),v.begin(),greater<int>()); for(int i = 0;i<3;i++) cout<<v.at(i); return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'vecctor' was not declared in this scope 7 | vecctor<int> v; | ^~~~~~~ a.cc:7:13: error: expected primary-expression before 'int' 7 | vecctor<int> v; | ^~~ a.cc:11:9: error: 'v' was not declared in this scope 11 | v....
s953560890
p00001
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> heights; int input; int main(){ while(cin >> input) heights.push_back(input); sort(input.begin(), input.end()); auto itr = input.end(); cout << *itr << "\n" << *(itr-1) << "\n" << *(itr-2) << endl; return 0; }
a.cc: In function 'int main()': a.cc:12:13: error: request for member 'begin' in 'input', which is of non-class type 'int' 12 | sort(input.begin(), input.end()); | ^~~~~ a.cc:12:28: error: request for member 'end' in 'input', which is of non-class type 'int' 12 | sort(input.begin(), input.end(...
s722752252
p00001
C++
// // Created by tac on 2016/10/27. // #include <cstdlib> #include <functional> #include <vector> #include <iostream> const int N_SIZE = 10000; int main() { std::vector<int> v(N_SIZE); int n = 10; int s; for (int i = 0; i < n; ++i) { std::cin >> s; v.push_back(s); } std::sort(...
a.cc: In function 'int main()': a.cc:20:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 20 | std::sort(v.begin(), v.end(), std::greater<int>()); | ^~~~ | qsort
s370493996
p00001
C++
#include<stdio> int main(){ printf("aaaaaaaa"); return 0; }
a.cc:1:9: fatal error: stdio: No such file or directory 1 | #include<stdio> | ^~~~~~~ compilation terminated.
s557154459
p00001
C++
file:///home/ooki/AOJ/top3.c
a.cc:1:1: error: 'file' does not name a type 1 | file:///home/ooki/AOJ/top3.c | ^~~~
s948142826
p00001
C++
file:///home/ooki/AOJ/top3.c
a.cc:1:1: error: 'file' does not name a type 1 | file:///home/ooki/AOJ/top3.c | ^~~~
s955767916
p00001
C++
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; int main(){ int a[10]; for(int i=0;i<10;i++){ scans(" %d",&a[i]); } sort(a,a+10); for(int i=9;i>=7;i--){ cout << a[i] <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:10:1: error: 'scans' was not declared in this scope; did you mean 'scanf'? 10 | scans(" %d",&a[i]); | ^~~~~ | scanf
s616540371
p00001
C++
A = sorted([int(raw_input()) for _ in xrange(10)]) print A[9] print A[8] Print a[7]
a.cc:1:1: error: 'A' does not name a type 1 | A = sorted([int(raw_input()) for _ in xrange(10)]) | ^
s637751924
p00001
C++
#include<bits/stdc++.h> using namespace std; #define MOD 1000000007 #define INF 999999999 #define FOR(i,a,b) for (int i=(a);i<(b);i++) #define FFOR(i,a,b) for (int i=(a);i>(b);i--) #define REP(i,n) FOR(i,0,n) #define RREP(i,n) for (int i=(n)-1;i>=0;i--) #define SORT(c) sort((c).begin(),(c).end()) #define ALL(a) (a).beg...
a.cc: In function 'int main()': a.cc:9:26: error: request for member 'begin' in 'a', which is of non-class type 'int [10]' 9 | #define SORT(c) sort((c).begin(),(c).end()) | ^~~~~ a.cc:19:3: note: in expansion of macro 'SORT' 19 | SORT(a); | ^~~~ a.cc:9:38: error: request ...
s817355578
p00001
C++
#include<iostream> int main() { typedef unsigned short int mew; mew mountain[10]; for (int i = 0; i < 10; i++) { cin >> mountain[i]; } mew taller[3]; mew a, b, c; a = mountain[0]; b = mountain[1]; c = mountain[2]; for (int y = 3; y <= 9; y++) { if (a<=b){ if (a<=c){ if (a < mountain[y]) { ??...
a.cc: In function 'int main()': a.cc:6:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 6 | cin >> mountain[i]; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62...
s663091930
p00001
C++
#include<iostream> using namespace std; int main() { typedef unsigned short int mew; mew mountain[10]; for (int i = 0; i < 10; i++) { cin >> mountain[i]; } mew taller[3]; mew a, b, c; a = mountain[0]; b = mountain[1]; c = mountain[2]; for (int y = 3; y <= 9; y++) { if (a<=b){ if (a<=c){ if (a < ...
a.cc: In function 'int main()': a.cc:21:33: error: expected primary-expression before '?' token 21 | ???a = mountain[y];} | ^ a.cc:21:34: error: expected primary-expression before '?' token 21 | ???a = mountain[y...
s459067547
p00001
C++
#include<iostream> using namespace std; int main() { typedef unsigned short int mew; mew mountain[10]; for (int i = 0; i < 10; i++) { cin >> mountain[i]; } mew taller[3]; mew a, b, c; a = mountain[0]; b = mountain[1]; c = mountain[2]; for (int y = 3; y <= 9; y++) { if (a<=b){ if (a<=c){ if (a < ...
a.cc: In function 'int main()': a.cc:21:33: error: expected primary-expression before '?' token 21 | ???a = mountain[y];} | ^ a.cc:21:34: error: expected primary-expression before '?' token 21 | ???a = mountain[y...
s646256021
p00001
C++
#include<iostream> using namespace std; int main() { typedef unsigned short int mew; mew mountain[10]; for (int i = 0; i < 10; i++) { cin >> mountain[i]; } mew taller[3]; mew a, b, c; a = mountain[0]; b = mountain[1]; c = mountain[2]; for (int y = 3; y <= 9; y++) { if (a<=b){ if (a<=c){ if (a < ...
a.cc: In function 'int main()': a.cc:21:33: error: expected primary-expression before '?' token 21 | ???a = mountain[y];} | ^ a.cc:21:34: error: expected primary-expression before '?' token 21 | ???a = mountain[y...
s938252642
p00001
C++
using System; using System.Linq; namespace _0001 { class Program { static void Main(string[] args) { int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray(); int[] mountain = new int[] { a[0],a[1],a[2] }; Array.Sort(mountain); C...
a.cc:1:7: error: expected nested-name-specifier before 'System' 1 | using System; | ^~~~~~ a.cc:2:7: error: expected nested-name-specifier before 'System' 2 | using System.Linq; | ^~~~~~ a.cc:7:26: error: 'string' has not been declared 7 | static void Main(string[] args) ...
s855905171
p00001
C++
#include<iostream> using namespace std; int main() { typedef unsigned short int mew; mew mountain[10]; for (int i = 0; i < 10; i++) { cin >> mountain[i]; } mew taller[3]; mew a, b, c; a = mountain[0]; b = mountain[1]; c = mountain[2]; for (int y = 3; y <= 9; y++) { if (a<=b){ if (a<=c){ if (a < ...
a.cc: In function 'int main()': a.cc:21:33: error: expected primary-expression before '?' token 21 | ???a = mountain[y];} | ^ a.cc:21:34: error: expected primary-expression before '?' token 21 | ???a = mountain[y...
s936389934
p00001
C++
int main() { typedef unsigned short int mew; mew mountain[10]; for (int i = 0; i < 10; i++) { cin >> mountain[i]; } mew taller[3]; mew a, b, c; a = mountain[0]; b = mountain[1]; c = mountain[2]; for (int y = 3; y <= 9; y++) { if (a<=b){ if (a<=c){ if (a < mountain[y]) { ???a = mountain[y];} ...
a.cc: In function 'int main()': a.cc:5:17: error: 'cin' was not declared in this scope 5 | cin >> mountain[i]; | ^~~ a.cc:19:33: error: expected primary-expression before '?' token 19 | ???a = mountain[y];} | ...
s489885932
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+ 9); printf("%d\n", a[9]); printf("%d\n", a[8]); printf("%d\n", a[7]); }
a.cc: In function 'int main()': a.cc:10:3: error: 'sort' was not declared in this scope; did you mean 'short'? 10 | sort(a, a+ 9); | ^~~~ | short
s033648724
p00001
C++
#include<iostream> using namespace std; int main(){ int n[10]; for(int i=0;i<10;i++) cin>>n[i]; sort(n,n+10); for(int i=9;i>=7;i--){ cout<<n[i]<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:3: error: 'sort' was not declared in this scope; did you mean 'short'? 7 | sort(n,n+10); | ^~~~ | short
s879559443
p00001
C++
#include <iostream> using namespace std; int main(){ const int N=10; int date[N]; int tmp; for(int i=0;i<N;i++) cin>>data[i]; for(int i=1;i<=3;i++){ for(int j=0;j<N-i;j++){ if(data[j]>data[j+1]){ tmp=data[j]; data[j]=data[j+1]; data[j+1]=tmp; } } } cout<<data[N-1]<<endl<<data[N-2]<<endl<<...
a.cc: In function 'int main()': a.cc:9:39: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 9 | for(int i=0;i<N;i++) cin>>data[i]; | ^ a.cc:12:32: error: invalid types '<unresolved overloaded function type>[int]' for array subs...
s505035667
p00001
C++
#include <iostream> using namespace std; int main(){ const int N=10; int date[N]; int tmp; for(int i=0;i<N;i++) cin>>data[i]; for(int i=1;i<=3;i++){ for(int j=0;j<N-i;j++){ if(data[j]>data[j+1]){ tmp=data[j]; data[j]=data[j+1]; data[j+1]=tmp; } } } cout<<data[N-1]<<endl<<data[N-2]<<endl<<...
a.cc: In function 'int main()': a.cc:9:39: error: invalid types '<unresolved overloaded function type>[int]' for array subscript 9 | for(int i=0;i<N;i++) cin>>data[i]; | ^ a.cc:12:32: error: invalid types '<unresolved overloaded function type>[int]' for array subs...
s905817586
p00001
C++
#include <iostream> #include <vector> #include <algorithm> int main(){ int array[10]; for(int i=0; i<10; i++){ std::cin >> array[i]; } std::sort(array.begin(), array.end()); for(int i=0; i<3; i++){ std::cout << array[i] << std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:19: error: request for member 'begin' in 'array', which is of non-class type 'int [10]' 11 | std::sort(array.begin(), array.end()); | ^~~~~ a.cc:11:34: error: request for member 'end' in 'array', which is of non-class type 'int [10]' 11 | std::so...
s416568885
p00001
C++
#include <iostream> #include <vector> #include <algorithm> int main(){ int array[10]; for(int i=0; i<10; i++){ std::cin >> array[i]; } std::vector<int> vector(array, array+10) std::sort(vector.begin(), vector.end()); for(int i=0; i<3; i++){ std::cout << vector[i] << std::endl; } return...
a.cc: In function 'int main()': a.cc:13:3: error: expected ',' or ';' before 'std' 13 | std::sort(vector.begin(), vector.end()); | ^~~
s267406710
p00001
C++
#include <iostream> #include <vector> #include <algorithm> int main(){ int array[10]; for(int i=0; i<10; i++){ std::cin >> array[i]; } std::vector<int> vector(array, array+10); std::sort(vector.begin(), vector.end(), >); for(int i=0; i<3; i++){ std::cout << vector[i] << std::endl; } re...
a.cc: In function 'int main()': a.cc:13:43: error: expected primary-expression before '>' token 13 | std::sort(vector.begin(), vector.end(), >); | ^ a.cc:13:44: error: expected primary-expression before ')' token 13 | std::sort(vector.begin(), vector.end(), >); ...
s985412917
p00001
C++
#include <iostream> #include <vector> #include <algorithm> int main(){ int array[10]; for(int i=0; i<10; i++){ std::cin >> array[i]; } std::vector<int> vector(array, array+10); std::sort(vector.begin(), vector.end(), std::greater<int>); for(int i=0; i<3; i++){ std::cout << vector[i] << std::e...
a.cc: In function 'int main()': a.cc:13:60: error: expected primary-expression before ')' token 13 | std::sort(vector.begin(), vector.end(), std::greater<int>); | ^
s332100193
p00001
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ vector<int> v(10); int index = 0; for(int i = 0; i< 10; i++){ cin >> v[i]; } cout << *max_element(v.begin(),v.end()) << endl; index = distance(v.begin(),max_element(v.begin(),v.end())); v[index] = 0; cou...
a.cc: In function 'int main()': a.cc:6:5: error: 'vector' was not declared in this scope 6 | vector<int> v(10); | ^~~~~~ a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 2 | #include <algorithm> +++ |+#include <vector> 3 | ...
s133175496
p00001
C++
#include <iostream> #include <cmath> #include <algorithm> using namespace std; int main(){ vector<int> v(10); int index = 0; for(int i = 0; i< 10; i++){ cin >> v[i]; } cout << *max_element(v.begin(),v.end()) << endl; index = distance(v.begin(),max_element(v.begin(),v.end())); v[in...
a.cc: In function 'int main()': a.cc:7:5: error: 'vector' was not declared in this scope 7 | vector<int> v(10); | ^~~~~~ a.cc:4:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>' 3 | #include <algorithm> +++ |+#include <vector> 4 | ...
s371781770
p00001
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; int main(){ vector<int> v(10); for(int i = 0; i< 10; i++){ cin >> v[i]; } sort(v.begin(),v.end()); cout << v[0] << endl; cout << v[1] << endl; cout << v[2] << endl; }
a.cc: In function 'int main()': a.cc:11:4: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 11 | sort(v.begin(),v.end()); | ^~~~ | sqrt
s144973420
p00001
C++
#include <iostream> #include <vector> #include <cmath> using namespace std; int main(){ vector<int> v(9); for(int i = 0; i< 10; i++){ cin >> v[i]; } sort(v.begin(),v.end()); cout << v[0] << endl; cout << v[1] << endl; cout << v[2] << endl; }
a.cc: In function 'int main()': a.cc:11:4: error: 'sort' was not declared in this scope; did you mean 'sqrt'? 11 | sort(v.begin(),v.end()); | ^~~~ | sqrt
s056639229
p00001
C++
#include<iostream> #include<algorithm> using namespace std; int a[10]; int main(){ for(int i=0;i<10;i++){ cin>>a[i]; } soft(a[0],a[9]); cout<<a[0]<<a[1]<<a[2]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:1: error: 'soft' was not declared in this scope 9 | soft(a[0],a[9]); | ^~~~
s243659976
p00001
C++
#include<iostream> #include<algorithm> using namespace std; int a[10]; int main(){ for(int i=0;i<9;i++){ cin>>a[i]; } soft(a[0],a[9]); cout<<a[0]<<a[1]<<a[2]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:1: error: 'soft' was not declared in this scope 9 | soft(a[0],a[9]); | ^~~~
s309626022
p00001
C++
#include<iostream> #include<algorithm> using namespace std; int a[10]; int main(){ for(int i=0;i<9;i++){ cin>>a[i]; } sort(a[0],a[9]); cout<<a[0]<<a[1]<<a[2]<<endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/inclu...
s440025310
p00001
C++
#include<iostream> #include<algorithm> using namespace std; int a[10]; int main(){ for (int i = 0; i < 10;i++){ cin >> a[i]; } sort(a[0], a[9]); cout << a[0] << a[1] << a[2] << endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/inclu...
s920848173
p00001
C++
#include <iostream> #include <string> #include <cstring> #include <fstream> #include <algorithm> #include <iomanip> #include <vector> #include <stack> #include <queue> #include <deque> #include <map> #include <list> #include <set> #include <cstdio> #include <cstdlib> #include <cmath> #include <bitset> #include <functio...
a.cc: In function 'int main()': a.cc:58:25: error: expected ';' before 'cout' 58 | sort(arr,arr+10) | ^ | ; 59 | cout << arr[9] << endl << arr[8] << endl << arr[7] << endl; | ~~~~
s099741970
p00001
C++
#include <bits/stdc++.h> using namespace std; int n[17]; int main(){ for(int i=0; i<10; i++){ cin>>n[i]; } sort(n,n+10); for(int i=9; i>6; i--x){ cout<<n[i]<<endl; } }
a.cc: In function 'int main()': a.cc:10:30: error: expected ')' before 'x' 10 | for(int i=9; i>6; i--x){ | ~ ^ | ) a.cc:10:30: error: 'x' was not declared in this scope
s542582862
p00001
C++
#include <iostream> void Sort(int* a){ int tmp; for(int i=0;i<10;i++){ for(int j=0;j<9;j++){ if(a[j]<a[j+1]){ tmp = a[j+1]; a[j+1]=a[j]; a[j] = tmp; } } } } int main(){ int a[10]; for(int i=0;i<10;i++){ cin >> a[i]; } Sort(a); std::cout << a[0] << std::endl; std::cout << a[1] << std::endl; std::cout << a[2] << ...
a.cc: In function 'int main()': a.cc:24:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 24 | cin >> a[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 stand...
s610300642
p00001
C++
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; class Main{ public static void main(String[] args)throws IOException{ int[] height=new int[10]; String[] st=new String[1...
a.cc:1:1: error: 'import' does not name a type 1 | import java.io.BufferedReader; | ^~~~~~ 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.io.BufferedWriter; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '...
s807262415
p00001
C++
#include <iostream> #include <algorithm> #include <stdio.h> #define pri(dt) printf("%d\n",dt) #define RPE0(loopTotal) for(int i=0;i<=(loopTotal);i++) #define RPE(loopTotal) for(int i=1;i<=(loopTotal);i++) int data[9]; using namespace std; int main(void){ RPE0(9) scanf("%d",&data[i]); sort(data,data+9,g...
a.cc: In function 'int main()': a.cc:13:25: error: reference to 'data' is ambiguous 13 | RPE0(9) scanf("%d",&data[i]); | ^~~~ In file included from /usr/include/c++/14/string:53, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c...
s178264131
p00001
C++
import java.util.*; class Main{ public static void main(String[] a){ int[] h = new int[10]; //10??¶????????±?????\??????????????????????????£?¨? Scanner s = new Scanner(System.in); for(int i = 0; i < h.length; i++){ h[i] = s.nextInt(); } Arrays.sort(h); ...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:4:11: error: expected ':' before 'static' 4 | public static void main(String[] a){ | ^~~~~~~ | : a.cc:4:29: error: 'Str...
s807439725
p00001
C++
class Main { public static void main(String[] args) { int a = 0,b = 0,c = 0,i,j; for(i = 0; i < 10; i++) { j = new java.util.Scanner(System.in).nextInt(); if(0 <= j && j <= 10000) { if(j > a) { c = b; b = a; a = j; } else if(j > b) { c = b; b = j; } else if(j > ...
a.cc:2:15: error: expected ':' before 'static' 2 | public static void main(String[] args) { | ^~~~~~~ | : a.cc:2:33: error: 'String' has not been declared 2 | public static void main(String[] args) { | ^~~~~~ a.cc:2:42...
s938578334
p00001
C++
import java.util.*; public class Main{ public static void main(String[] args){ int[] hill={0,0,0,0,0,0,0,0,0,0}; for(int j=0;j<=9;j++){ hill[j]=new Scanner(System.in).nextInt(); } int key; int flag; for(key=9;key>=...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:3:1: error: expected unqualified-id before 'public' 3 | public class Main{ | ^~~~~~
s437294199
p00001
C++
#include<iostream> using namespace std; int main(){ int hill[15]; for(int j=0;j<=8;j++){ cin>>hill[j]; } int key; int flag; sort(hill,hill+10); //sort /*for(key=9;key>=0;key--){ for(int i=0;i<=key;i++){ if(hill[i]>hill[i+1]){ flag=hill[i];hill[i]=hill[i+1];hill[i+1]=flag; } } }*/ cou...
a.cc: In function 'int main()': a.cc:15:9: error: 'sort' was not declared in this scope; did you mean 'short'? 15 | sort(hill,hill+10); | ^~~~ | short
s728020042
p00001
C++
#include<iostream> int main(){ int a[10]; for(int i=0;i<10;i++){ scanf("%d",&a[i]); } int first=-1; int second=-1; int third=-1; for(int j=0;j<10;j++){ if(a[j]>first){ first=a[j]; } else if(a[j]>second){ second=a[j]; } else if(a[j]>third){ third=a[j]; } cout<<first<<endl; ...
a.cc: In function 'int main()': a.cc:20:25: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 20 | cout<<first<<endl; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 's...
s806830939
p00001
C++
include<iostream> using namespace std; int main(){ int tall[10],no1=0,no2=0,no3=0,i=0; for(i=0;i<=9;i++){ cin>>tall[i]; } for(i=0;i<=9;i++){ if(tall[i]>=no1){ no3=no2; no2=no1; no1=tall[i]; } if(tall[i]>=no2&&tall[i]<no1){ no3=no2; no2=tall[i]; } if(tall[i]...
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope 7 | cin>>tall[i]; | ^~~ a.cc:23:3: error: 'cout' was not declared in this scope 23 | cout<<endl<<no1<<endl<<no2<<endl<<no...
s849339308
p00001
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int a[10]; for(int b =0;b<10;b++) { cin>>a[b]>>endl; } sort(a.begin(),a.end()); sort(a.begin(),a.end()); for(int c =0;c<3;c++) cout<<a[c]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:11:26: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 11 | cin>>a[b]>>endl; | ~~~~~~~~~^~~~~~ In file included from ...
s931360504
p00001
C++
#include<stdio.h> ?? void swap(int *x,int *y){ ????????????????int temp; ?? ????????????????temp=*x; ????????????????*x=*y; ????????????????*y=temp; ?? } ?? int main(void){ ????????????????int i,j,k; ????????????????int height[10]; ?? ????????????????i=0; ?? ????????????????while(scanf("%d",&height[i])==1){ ???????????...
a.cc:2:1: error: expected unqualified-id before '?' token 2 | ?? | ^ a.cc:11:1: error: expected unqualified-id before '?' token 11 | ?? | ^
s497404682
p00001
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int>vec; for(int i = 0;i < 10;++i) { int v; cin << v; vec.push_back(v); } sort(vec.begin(),vec.end()); cout << vec[9] <<endl<< vec[8] <<endl << vec[7] <<endl; return 0; }
a.cc: In function 'int main()': a.cc:8:20: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 8 | int v; cin << v; | ~~~ ^~ ~ | | | | | int | std::istream...
s826145007
p00001
C++
#include<iostream> #include<algorithm> ?? using namespace std; ?? ?? int main(){ ????????int a[10]; ????????for(int i=0;i<10;i++){ ????????????????cin>>a[i]; ????????} ????????sort(a,a+10); ?? ????????cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl; ?? }
a.cc:3:1: error: expected unqualified-id before '?' token 3 | ?? | ^ a.cc:5:1: error: expected unqualified-id before '?' token 5 | ?? | ^
s896661309
p00001
C++
#include "stdafx.h" #include <iostream> #include <algorithm> #include <vector> using namespace std; int main() { vector<int> heights; for (int i = 0; i < 10; i++) { int height; cin >> height; heights.push_back(height); } sort(heights.rbegin(), heights.rend()); for (int i = 0; i < 3; i++) { cout << heigh...
a.cc:2:10: fatal error: stdafx.h: No such file or directory 2 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s274215475
p00001
C++
#include<iostream> using namespace std; int main(){ array<int,10> h{}; int in{}; for(int i=0;i<10;i++){ cin>>in; h[i]=in; } sort(h.begin(),h.end()); cout<<h[9]<<endl;cout<<h[8]<<endl;cout<<h[7]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:5:19: error: variable 'std::array<int, 10> h' has initializer but incomplete type 5 | array<int,10> h{}; | ^ a.cc:2:1: note: 'std::array' is defined in header '<array>'; this is probably fixable by adding '#include <array>' 1 | #include<iostream> ...
s353735501
p00001
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ vector<int> h(); int in{}; for(int i=0;i<10;i++){ cin>>in; h.push_back(in); } sort(h.begin(),h.end()); cout<<h[9]<<endl;cout<<h[8]<<endl;cout<<h[7]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:18: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 7 | vector<int> h(); | ^~ a.cc:11:11: error: request for member 'push_back' in 'h', which is of non-class type 'std::vector<int>()' 11 | h.push_ba...
s147657548
p00001
C++
#include<iostream> #include<vector> #include<algorithm> using namespace std; int main(){ vector<int> h(); int in{}; for(int i=0;i<10;i++){ cin>>in; h.push_back(in); } sort(h.begin(),h.end()); cout<<h[9]<<endl;cout<<h[8]<<endl;cout<<h[7]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:18: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 7 | vector<int> h(); | ^~ a.cc:11:11: error: request for member 'push_back' in 'h', which is of non-class type 'std::vector<int>()' 11 | h.push_ba...
s912637377
p00001
C++
#include <bits/stdc++.h> using namespace std; int main() { vector<int> v; int h; while (cin >> h) { v.push_back(h); } sort(v.begin, v.end); int s = v.size(); cout << v[s-1] << endl << v[s-2] << endl << v[s-3] << endl; }
a.cc: In function 'int main()': a.cc:9:7: error: no matching function for call to 'sort(<unresolved overloaded function type>, <unresolved overloaded function type>)' 9 | sort(v.begin, v.end); | ~~~~^~~~~~~~~~~~~~~~ In file included from /usr/include/c++/14/algorithm:61, from /usr/include...
s145799564
p00001
C++
A=[] for i in range(10): A.append(int(input())) A.sort() A.reverse() for i in range(3): print(A[i])
a.cc:1:1: error: 'A' does not name a type 1 | A=[] | ^
s444032957
p00001
C++
A=[] for i in range(10): A.append(int(input())) A.sort() A.reverse() for i in range(3): print(A[i])
a.cc:1:1: error: 'A' does not name a type 1 | A=[] | ^
s171102253
p00001
C++
import java.util.List; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class Main { public static void main(String[]args){ ListOfTop3Hills(); } public static void QQ(){ for(int i=1;i<10;i++){ for(int j=1;j<10;j++)System.out.println(i+"x"+j+"="+(i*j)); } } pu...
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.List; | ^~~~~~ 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.ArrayList; | ^~~~~~ a.cc:2:1: note: C++20 'import' only available with '-fmodules-t...
s075791676
p00001
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a,b,c,d,e,f,g,h,i,j; int yama[10] = { a, b, c, d, e, f, g, h, i, j} sort(yama, yama+10) cout << yama[0] << endl; cout << yama[1] << endl; cout << yama[2] << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: expected ',' or ';' before 'sort' 8 | sort(yama, yama+10) | ^~~~
s920892072
p00001
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int num = 0; int mountains[10] = { 0 }; for (int i = 0; i < 10; i++){ cin >> mountains[i]; } sort(mountains[0],mountains[9]); cout << mountains[0] << endl; cout << mountains[1] << endl; cout << mountains[2] << endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:2: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/inclu...
s126998949
p00001
C++
#include<cstdio> #include<algorithm> #include<array> using namespace std; int main(){ array<int,10> xs; for(int i=0;i<10;++i)scanf("%d",&xs[i]); sort(xs.begin(),xs.end(),greater<int>()); for(int i=0;i<3;++i)printf("%d",xs[i]); return 0; }
a.cc: In function 'int main()': a.cc:9:28: error: 'greater' was not declared in this scope 9 | sort(xs.begin(),xs.end(),greater<int>()); | ^~~~~~~ a.cc:9:36: error: expected primary-expression before 'int' 9 | sort(xs.begin(),xs.end(),greater<int>()); | ...
s733433574
p00001
C++
#include<iostream> #include<string> #include<algorithm> using namespace std; int main(){ int a[9]; for(int i=0;i<=9;i++){ cin>>a[i]; } sort(a[0],a[9]); cout<<a[9]<<a[8]<<a[7]<<endl; return 0; }
In file included from /usr/include/c++/14/algorithm:61, from a.cc:3: /usr/include/c++/14/bits/stl_algo.h: In instantiation of 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = int; _Compare = __gnu_cxx::__ops::_Iter_less_iter]': /usr/inclu...
s856396514
p00001
C++
#include<iostream> using namespace std; int main(){ int a[10],i=1; cin << i; while(cin >> a[i]){ i++ } sort(a,a+i); cout << a[i-1] << endl; cout << a[n-2] << endl; cout << a[i-3] << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 7 | cin << i; | ~~~ ^~ ~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:7:7: note: candidate: 'operat...
s526525448
p00001
C++
#include <stdio.h> ?? int main(void) { ????????int yama[10],i,j; ????????for(i=0;i<10;i++){ ????????????????scanf("%d",&yamja[i]); ????????} ????????for(i=0;i<10;i++){ ????????????????for(j=0;j<10;j++){ ????????????????????????if(yama[i]<yama[j]){ ????????????????????????????????a=yama[i]; ?????????????????????????????...
a.cc:2:1: error: expected unqualified-id before '?' token 2 | ?? | ^
s995506153
p00001
C++
#include <iostream> #include <fstream> #include <vector> using namespace std; int main(int argc, const char * argv[]) { // input from txt string filename = "input.txt"; ifstream fin(filename); if(fin.fail()){ cout << "load fail..."; } vector<int> heights(10); for (int...
a.cc: In function 'int main(int, const char**)': a.cc:20:5: error: 'sort' was not declared in this scope; did you mean 'short'? 20 | sort(heights.begin(), heights.end(), greater<int>()); | ^~~~ | short
s042495841
p00001
C++
#include <iostream> #include <fstream> #include <vector> using namespace std; int main(int argc, const char * argv[]) { if(fin.fail()){ cout << "load fail..."; } vector<int> heights(10); for (int i=0; i<10; i++){ cin >> heights[i]; } sort(heights.begin(), heights.end()...
a.cc: In function 'int main(int, const char**)': a.cc:8:8: error: 'fin' was not declared in this scope 8 | if(fin.fail()){ | ^~~ a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'? 16 | sort(heights.begin(), heights.end(), greater<int>()); | ^~~~ | ...
s340866067
p00001
C++
#include <iostream> #include <fstream> #include <vector> #include <algorithm> using namespace std; int main(int argc, const char * argv[]) { if(fin.fail()){ cout << "load fail..."; } vector<int> heights(10); for (int i=0; i<10; i++){ cin >> heights[i]; } sort(heights.b...
a.cc: In function 'int main(int, const char**)': a.cc:9:8: error: 'fin' was not declared in this scope 9 | if(fin.fail()){ | ^~~
s692497631
p00001
C++
#include <iostream> using namespace std; class top3 { private: int idx; int x; int y; int hill[10]; int top[3]; public: void empty(){ idx=0; y=0; x=10; } void push(int v){ hill[idx++]=v; } int pop(){ int i; top[y]=hill[i]; for(i=0;i<x;i++){ if(hill[i]>top[y]) {top[y]=hill[i]; } x--; ...
a.cc:48:8: error: expected '}' at end of input 48 | } | ^ a.cc:5:1: note: to match this '{' 5 | { | ^ a.cc:48:8: error: expected unqualified-id at end of input 48 | } | ^
s048841331
p00001
C++
#include <iostream> #include <cstdlib> #include <fstream> int main(int argc, char *argv[]){ // std::ifstream datafile(argv[1]); //input datafile std::string str; int mt_height[10] = {}; //height of mountain int ans[3] = {}; // top 3 height of mountain. 0 -> no.1 1 -> no.2 2 -> no.3 if(datafile.fail()){ std::co...
a.cc: In function 'int main(int, char**)': a.cc:11:12: error: 'datafile' was not declared in this scope 11 | if(datafile.fail()){ | ^~~~~~~~
s105878280
p00001
C++
#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int mountain[10]; cin << mountain[10]; sort(mountain[10]); cout << mountain[1] << endl; cout << mountain[2] << endl; cout << mountain[3] << endl; }
a.cc: In function 'int main()': a.cc:8:7: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 8 | cin << mountain[10]; | ~~~ ^~ ~~~~~~~~~~~~ | | | | | int | std::istream {aka std::basic_istre...
s326310800
p00001
C++
#include <bits/stdc+.h> using namespace std; int mountain[12] int main() { for (int i = 0; i < 10; ++i){ cin >> mountain[i]; } sort(mountain,mountain+10) cout << mountain[9] << endl << mountain[8] << endl << mountain[7] << endl; }
a.cc:1:10: fatal error: bits/stdc+.h: No such file or directory 1 | #include <bits/stdc+.h> | ^~~~~~~~~~~~~~ compilation terminated.
s792424316
p00001
C++
#include <bits/stdc++.h> using namespace std; int mountain[12] int main() { for (int i = 0; i < 10; ++i){ cin >> mountain[i]; } sort(mountain,mountain+10) cout << mountain[9] << endl << mountain[8] << endl << mountain[7] << endl; }
a.cc:6:1: error: expected initializer before 'int' 6 | int main() { | ^~~
s307802570
p00001
C++
#include <iostream> using namespace std; int main() { int a[10]; for(int i = 0; i < 10; ++i) { cin >> a[i] >> endl; } for(int i = 0; i < 10; ++i) { for(int j = 9; j > i; --j) { if(a[j] < a [j - 1]) { int t = a[j]; a[j] = a[j - 1]; a[j - 1] = t; } } } for(in...
a.cc: In function 'int main()': a.cc:7:17: error: no match for 'operator>>' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and '<unresolved overloaded function type>') 7 | cin >> a[i] >> endl; | ~~~~~~~~~~~~^~~~~~~ In file included from /usr/include/c++/...
s941480330
p00001
C++
1819 2003 876 2840 1723 1673 3776 2848 1592 922
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1819 | ^~~~
s011150735
p00001
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int x[10001],i; for(i=0;0<=i && i<=10000;++i){ cin>>x[i]; } sort(x); cout<<x[0]<<endl; cout<<x[1]<<endl; cout<<x[2]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: no matching function for call to 'sort(int [10001])' 9 | sort(x); | ~~~~^~~ 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 ...
s535276863
p00001
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(){ int x[10],i; for(i=0;0<=i && i<10;++i){ cin>>x[i]; } sort(x); cout<<x[0]<<endl; cout<<x[1]<<endl; cout<<x[2]<<endl; return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: no matching function for call to 'sort(int [10])' 10 | sort(x); | ~~~~^~~ 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 st...
s110316396
p00001
C++
#include <iostream> #include <algorithm> using namespace std; int main(){ int a[10]; for(int i = 0;i < 10;i++) cin >> a[i]; sort(a,a + n,greater<int>()); for(int i = 0;i < 3;i++) cout << a[i] << endl; }
a.cc: In function 'int main()': a.cc:8:12: error: 'n' was not declared in this scope 8 | sort(a,a + n,greater<int>()); | ^
s299273564
p00001
C++
#include<iostream> using namespace std; int main() { int i,h,m1,m2,m3; m1=0; m2=0; m3=0; for(i=0;i<10;i++) { cin>>h; if(h>m1) { m3=m2; m2=m1; m1=h; } else if(h>m2) { m3=m2; m2=h; } else if(h>m3) { m3=h; } } cout<<m1<<endl; cout<<m2<<endl; cout<<m3; return 0 }
a.cc: In function 'int main()': a.cc:31:9: error: expected ';' before '}' token 31 | return 0 | ^ | ; 32 | } | ~
s024048194
p00001
C++
#include<bits/stdc++.stdc> using namespace std; int main(){ int a[10]; for(int i =0; i < 10; i++){ cin >> a[i]; } sort( a, a + 10, greater<int>()); for(int j = 0; j < 3; j++){ cout << a[j] << endl; } return 0; }
a.cc:1:9: fatal error: bits/stdc++.stdc: No such file or directory 1 | #include<bits/stdc++.stdc> | ^~~~~~~~~~~~~~~~~~ compilation terminated.
s144536391
p00001
C++
#include <iostream> using namespace std; #define INPUTSIZE 10 int main() { int inputs[INPUTSIZE]; for (int i = 0; i < INPUTSIZE; i++) cin >> inputs[i]; sort(inputs, inputs + INPUTSIZE); for (int i = 1; i <= 3; i++) cout << inputs[INPUTSIZE - 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(inputs, inputs + INPUTSIZE); | ^~~~ | short
s973694472
p00001
C++
/* * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001 */ #include <iostream> #include <vector> #define COUNT 10 using namespace std; int main() { vector<int> heights(COUNT); for (int i = 0; i < COUNT; i++) { cin >> heights[i]; cin.ignore(); } sort(heights.begin(), heights.end(), greater<int>())...
a.cc: In function 'int main()': a.cc:18:9: error: 'sort' was not declared in this scope; did you mean 'short'? 18 | sort(heights.begin(), heights.end(), greater<int>()); | ^~~~ | short
s069693307
p00001
C++
mt = list() for i in range(10): mt.append(int(raw_input())) mt = sorted(mt,reverse=True) for i in range(3): print mt[i]
a.cc:1:1: error: 'mt' does not name a type 1 | mt = list() | ^~
s982147084
p00001
C++
#include<bits/stdc++.h> using namespace std; __int128 a[15]; int main(){ for(int 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:8:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128') 8 | cin>>a[i]; | ~~~^~~~~~ | | | | | __int128 | std::istream {aka std::basic_istr...
s639031344
p00001
C++
#include<bits/stdc++.h> using namespace std; __int128_t a[15]; int main(){ for(int 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:8:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128') 8 | cin>>a[i]; | ~~~^~~~~~ | | | | | __int128 | std::istream {aka std::basic_istr...
s958221498
p00001
C++
#include<bits/stdc++.h> using namespace std; __int128_t a[15]; int main(){ for(int 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:8:12: error: no match for 'operator>>' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and '__int128') 8 | cin>>a[i]; | ~~~^~~~~~ | | | | | __int128 | std::istream {aka std::basic_istr...
s595735752
p00001
C++
#include <iostream> #include <vector> #include <string> int main() { std::vector<int> hills; for (int i = 0; i < 10; i++) { std::cout << i << std::endl; std::string input; std::cin >> input; int height = std::atoi(input.c_str()); hills.push_back(height); } std::...
a.cc: In function 'int main()': a.cc:15:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 15 | std::sort(hills.begin(), hills.end(), std::greater<int>()); | ^~~~ | qsort
s682510353
p00001
C++
#include <iostream> #include <vector> #include <string> int main() { std::vector<int> hills; for (int i = 0; i < 10; i++) { std::cout << i << std::endl; std::string input; std::cin >> input; int height = std::stoi(input); hills.push_back(height); } std::sort(hil...
a.cc: In function 'int main()': a.cc:15:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 15 | std::sort(hills.begin(), hills.end(), std::greater<int>()); | ^~~~ | qsort
s989287828
p00001
C++
#include <iostream> #include <vector> #include <string> int main() { std::vector<int> hills; for (int i = 0; i < 10; i++) { std::cout << i << std::endl; std::string input; std::cin >> input; int height = std::stoi(input); hills.push_back(height); } std::sort(hil...
a.cc: In function 'int main()': a.cc:15:10: error: 'sort' is not a member of 'std'; did you mean 'qsort'? 15 | std::sort(hills.begin(), hills.end(), std::greater<int>()); | ^~~~ | qsort
s482027829
p00001
C++
#include <cstdio> #include <algorithm> using namespace std; int reverse(int x,int y){ return x>y; } int main(){ int i; int mount[10]; int *p=&mount[0]; for(i=0;i<10;i++){ scanf("%d\n",p); p++; } sort(mount,mount+10,reverse(x,y)); printf("%d\n%d\n%d\n",mount[0],mount[1],m...
a.cc: In function 'int main()': a.cc:16:33: error: 'x' was not declared in this scope 16 | sort(mount,mount+10,reverse(x,y)); | ^ a.cc:16:35: error: 'y' was not declared in this scope 16 | sort(mount,mount+10,reverse(x,y)); | ^
s549845445
p00001
C++
#include<bits/stdc++.h> using namespace std; int h[9] int main(){ for(i=0;i<=9;i++){ cin>>h[i]; } sort(h, h+10, greater<int>()); cout<<h[0]<<h[1]<<h[2]; return 0; }
a.cc:6:1: error: expected initializer before 'int' 6 | int main(){ | ^~~
s714388719
p00001
C++
#include<bits/stdc++.h> using namespace std; int main(){ int h[9] for(int i=0;i<=9;i++){ cin>>h[i]; } sort(h, h+10, greater<int>()); cout<<h[0]<<h[1]<<h[2]; return 0; }
a.cc: In function 'int main()': a.cc:6:3: error: expected initializer before 'for' 6 | for(int i=0;i<=9;i++){ | ^~~ a.cc:6:15: error: 'i' was not declared in this scope 6 | for(int i=0;i<=9;i++){ | ^ a.cc:10:8: error: 'h' was not declared in this scope 10 | sort(h, h+10, gre...
s627708353
p00001
C++
#include<bits/stdc++.h> using namespace std; int main(){ int h[10]; int i; for(i=0;i<10;i++){ scanf("%d",&h[i]); } sort(h, h+10); printf("%d\n%d\n%d\n",a[9],a[8],a[7]); return 0; }
a.cc: In function 'int main()': a.cc:13:25: error: 'a' was not declared in this scope 13 | printf("%d\n%d\n%d\n",a[9],a[8],a[7]); | ^
s777732620
p00001
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(void){ int i; vector<int> v; while(getline(cin, num)){ v.push_back(num); } sort(v.begin(), v.end()); for(int i = 1; i < 4; i++){ cout << v[v.size - i] << endl; } }
a.cc: In function 'int main()': a.cc:9:24: error: 'num' was not declared in this scope; did you mean 'enum'? 9 | while(getline(cin, num)){ | ^~~ | enum a.cc:14:21: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp...
s719865358
p00001
C++
#include <iostream> #include <algorithm> #include <vector> using namespace std; int main(void){ int i; vector<int> v; while(getline(cin, num)){ v.push_back(num); } sort(v.begin(), v.end()); for(int i = 1; i < 4; i++){ cout << v[v.size - i] << endl; } }
a.cc: In function 'int main()': a.cc:9:24: error: 'num' was not declared in this scope; did you mean 'enum'? 9 | while(getline(cin, num)){ | ^~~ | enum a.cc:14:21: error: invalid use of member function 'std::vector<_Tp, _Alloc>::size_type std::vector<_Tp...