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]); } } ...
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 ...
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 ...
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...
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: warni...
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 _RAIte...
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...
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] ...
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: 'hig...
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...
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...
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...
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 __g...
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]); | ~~~~~~~^~~~~~~~~~~~~~~~~~...
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 ...
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(...
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...
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=m...
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--){ | ...
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...
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-t...
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/iostrea...
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 { ...
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 ...
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=...
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; }; }; }; }; f...
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]=d...
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]=d...
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' ...
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' ...
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 | exter...
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]; ...
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] = hei...
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[...
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(...
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; ...
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(), ...
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++...
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++){ | ^ ...
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 ...
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++){ | ^ ...
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; retur...
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++){ | ...
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; ret...
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++){ | ...
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; retu...
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++){ | ...
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; retur...
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...
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; retu...
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; ret...
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...
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...
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:...
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...
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: ...
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;...
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 declare...
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> +++ |+#includ...
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){ ...
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 =...
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...
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...
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...
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 ';'...
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, ...
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; } } ...
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...
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; } } ...
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...
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; } } }...
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:...
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/i...
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 /u...
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 ...
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]; ...
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;...
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 | ...
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 | ...
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...