submission_id stringlengths 10 10 | problem_id stringlengths 6 6 | language stringclasses 3
values | code stringlengths 1 522k | compiler_output stringlengths 43 10.2k |
|---|---|---|---|---|
s146618765 | p00001 | C | d,a[];c(*z){d=*z-*1[&z];}main(){for(;~scanf("%d",a);qsort(a,4,4,c));for(d=4;--d;printf("%d\n",a[d]));} | main.c:1:1: warning: data definition has no type or storage class
1 | d,a[];c(*z){d=*z-*1[&z];}main(){for(;~scanf("%d",a);qsort(a,4,4,c));for(d=4;--d;printf("%d\n",a[d]));}
| ^
main.c:1:1: error: type defaults to 'int' in declaration of 'd' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declara... |
s781447935 | p00001 | C | #include <stdio.h>
int main(void)
{
int m[10],i,n,r[10],t;
for(i=0;i!=10;i++)
{
scanf("%d",&m[i])
}
for (n=0;n!=10;n++)
{
t=10;
for (i=0;i!=10;i++)
{
if(m[n]>m[i])
{
t--;
}
}
r[n]=t;
}
for (n=1;n!=4;n++)
{
... | main.c: In function 'main':
main.c:7:24: error: expected ';' before '}' token
7 | scanf("%d",&m[i])
| ^
| ;
8 | }
| ~
|
s166442441 | p00001 | C | #include<stdio.h>
int main()
{
int a,b,c,d,e,f,g,h,i,j;
printf("type the heights of the mountains");
scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d &a,&b,&c,&d,&e,&f,&g,&h,&i,&j);
if(c>a && c>b && c>d && c>e && c>f && c>g && c>h && c>i && c>j)
printf("%the heighest mountain is: d", c);
else if(b>a && b>d && b>e && b>f && b>g && ... | main.c: In function 'main':
main.c:6:7: warning: missing terminating " character
6 | scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d &a,&b,&c,&d,&e,&f,&g,&h,&i,&j);
| ^
main.c:6:7: error: missing terminating " character
6 | scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d &a,&b,&c,&d,&e,&f,&g,&h,&i,&j);
| ^~~~... |
s885817256 | p00001 | C | #include <stdio.h>
int main (int argc, char* argv[])
{
int i, j, temp, height[10];
for (i=0; i<10; i++) {
scanf("%d", height[i]);
}
for (i=10; 0<i; i--) {
for (j=0; j<i; j++) {
if (height[j+1] < height[j]) {
temp = height[j];
heghit[j] = height[j+1];
height[j+1] = temp;
}
}
}
... | main.c: In function 'main':
main.c:15:9: error: 'heghit' undeclared (first use in this function); did you mean 'height'?
15 | heghit[j] = height[j+1];
| ^~~~~~
| height
main.c:15:9: note: each undeclared identifier is reported only once for each function it appears in
|
s971795650 | p00001 | C | #include<stdio.h>
int main(void){
int i,hx, tmp, d[10];
for(i = 0; i < 10; i++) scanf("%d", &d[i]);
for(h = 10; h > 0; ){
h /= 1.3;
for(i = 0; i + h < 10; i++){
if(d[i + h] < d[i]){
tmp = d[i];
d[i] = d[i + h];
d[i + h] = tmp;
}
}
}
for(i = 0; i < 3; i++) printf("%d\n", d[i]);
... | main.c: In function 'main':
main.c:8:13: error: 'h' undeclared (first use in this function)
8 | for(h = 10; h > 0; ){
| ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
|
s956334643 | p00001 | C | include <stdio.h>
int main(){
int a,b,c=0,d=0,e=0;
for(a=1;a<=10;a++){
scanf("%d",&b);
if(b>c){e=d;d=c;c=b;}
else if(b>d){e=d;d=b;}
else if(b>e){e=b;}
}
printf("%d\n%d\n%d\n",c,d,e);
return 0;
} | main.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
1 | include <stdio.h>
| ^
|
s615671911 | p00001 | C | #include<iostream>
#define element 10
using namespace std;
int height[element];
int number;
int main()
{
for(int i=0;i<element;++i)
{
cin >> height[i];
}
for(int i=0;i<element;++i)
{
for(int j=i;j<element;++j)
{
if(height[i]<height[j])
{
number = height[i]; ... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s250759279 | p00001 | C | #include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
vector<int> height(10);
for(int i=0; i<10; i++){
cin >>height[i];
}
sort(height.begin(),height.end(),greater<int>());
cout <<height[0]<<endl<<height[1]<<endl<<height[2]<<endl;
return 0;
} | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s543985719 | p00001 | C | #include<stdio.h>
int main(void){
int i,l,ans[3],t,in;
for(i=0;i<10;i++){
scanf(" %d",&in);
for(l=0;l<3;l++){
if(in>ans[l]){
t=ans[l];
ans[l]=in;
in=t;
}
}
for(i=0;i<3;i++)
printf("%d\n",ans[i]);
return 0;
} | main.c: In function 'main':
main.c:19:1: error: expected declaration or statement at end of input
19 | }
| ^
|
s501069675 | p00001 | C | #include<stdio.h>
int main(){
int x[10],i,j,a;
for(i=0;i<10;i++){
scanf("%d",&x[i]);
}
for(i=0;i<10;i++){
for(j=0;j<10;j++){
if(x[i]<x[j]){
a=x[i];
x[i]=x[j];
x[j]=a;
}
}
}
for(i=0;i<3;i++){
p... | main.c: In function 'main':
main.c:17:24: error: subscripted value is neither array nor pointer nor vector
17 | printf("%d\n",a[i]);
| ^
|
s405534257 | p00001 | C | #include<stdio.h>
int main(){
int h[10];
int i, j;
int M, idx;
char buf[8];
for(j = 0; j < 10; j++) {
gets(buf);
h[j] = strtol(buf, NULL, 10);
}
for(i = 0; i < 3; i++) {
M = 0;
for(j = 0; j < 10; j++) {
if (h[j] > M) {
M = h[j];
idx = j;
}
}
printf("%d\n", M);
h[idx] = 0;
}
retu... | main.c: In function 'main':
main.c:10:17: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
10 | gets(buf);
| ^~~~
| fgets
main.c:11:24: error: implicit declaration of function 'strtol' [-Wimplicit-funct... |
s599589489 | p00001 | C | #include<stdio.h>
int main(){
int mountain[10];
scanf("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
int high[10]
for(i=0;i<=9;i++){
for(j=i+1;j<=10;i++){
if (mountain[i]<mountain[j]){
high[i] = moun... | main.c: In function 'main':
main.c:6:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
6 | for(i=0;i<=9;i++){
| ^~~
main.c:6:5: error: 'i' undeclared (first use in this function)
6 | for(i=0;i<=9;i++){
| ^
main.c:6:5: note: each undeclared identifier is reported only once f... |
s401251100 | p00001 | C | #include<stdio.h>
int main(){
int a;
int mountain[10];
scanf("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
for(i=0;i<=9;i++){
for(j=i+1;j<=10;j++){
if (mountain[i]<mountain[j]){
a = mountain[i];
... | main.c: In function 'main':
main.c:6:5: error: 'i' undeclared (first use in this function)
6 | for(i=0;i<=9;i++){
| ^
main.c:6:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:7: error: 'j' undeclared (first use in this function)
7 | for(j=i+1;j<=10;... |
s356144384 | p00001 | C | #include<stdio.h>
int main(){
int a;
int mountain[10];
scanf("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
for(int i=0;i<=9;i++){
for(int j=i+1;j<=10;j++){
if (mountain[i]<mountain[j]){
a = mountain... | main.c: In function 'main':
main.c:14:40: error: stray '\' in program
14 | printf("mountain[0]")\n
| ^
main.c:14:40: error: expected ';' before 'n'
14 | printf("mountain[0]")\n
| ^~
... |
s335823336 | p00001 | C | #include<stdio.h>
int main()
{
int a;
int mountain[10];
scanf("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
for(int i=0;i<=9;i++){
for(int j=i+1;j<=10;j++){
if (mountain[i]<mountain[j+1]){
a = mount... | main.c: In function 'main':
main.c:15:40: error: stray '\' in program
15 | printf("mountain[0]")\n
| ^
main.c:15:40: error: expected ';' before 'n'
15 | printf("mountain[0]")\n
| ^~
... |
s764066352 | p00001 | C | #include<stdio.h>
int main(){
int a;
int mountain[10];
scanf("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
int i;
int j;
for(i=0;i<=9;i++){
for(j=i+1;j<=10;j++){
if (mountain[i]<mountain[j+1]){
a = ... | main.c: In function 'main':
main.c:16:40: error: stray '\' in program
16 | printf("mountain[0]")\n
| ^
main.c:16:40: error: expected ';' before 'n'
16 | printf("mountain[0]")\n
| ^~
... |
s141578719 | p00001 | C | #include<stdio.h>
int main(){
int a;
int mountain[10];
scanf("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
int i;
int j;
for(i=0;i<=9;i++){
for(j=i+1;j<=10;j++){
if (mountain[i]<mountain[j+1]){
a = ... | main.c: In function 'main':
main.c:16:39: error: stray '\' in program
16 | printf("mountain[0]"\n)
| ^
main.c:16:39: error: expected ')' before 'n'
16 | printf("mountain[0]"\n)
| ~ ^~
| ... |
s227287365 | p00001 | C | #include<stdio.h>
int main(){
int a;
int mountain[10];
scanf("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
int i;
int j;
for(i=0;i<=9;i++){
for(j=i+1;j<=10;j++){
if (mountain[i]<mountain[j+1]){
a = ... | main.c: In function 'main':
main.c:16:37: error: stray '\' in program
16 | printf("mountain[0]"\n)
| ^
main.c:16:37: error: expected ')' before 'n'
16 | printf("mountain[0]"\n)
| ~ ^~
| ... |
s411871070 | p00001 | C | #include<stdio.h>
int main(){
int a;
int mountain[10];
scanf("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
int i;
int j;
for(i=0;i<=9;i++){
for(j=i+1;j<=10;j++){
if (mountain[i]<mountain[j]){
a = mo... | main.c: In function 'main':
main.c:16:42: error: expected ';' before 'printf'
16 | printf("mountain[0]\n")
| ^
| ;
17 | printf("mountain[1]\n")
| ~~~~~~ ... |
s505080270 | p00001 | C | #include<stdio.h>
int main(){
int a;
int mountain[10];
scanf("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
int x;
int y;
int z;
for(x=1;x<=9;x++){
if(mountain[0]<mountain[x]){
a = mountain[0]
mounta... | main.c: In function 'main':
main.c:11:20: error: expected ';' before 'mountain'
11 | a = mountain[0]
| ^
| ;
12 | mountain[0] = mountain[x]
| ~~~~~~~~
main.c:18:20: error: expected ';' before 'mountain'
18 | a = mountain[1]
... |
s762724813 | p00001 | C | #include<stdio.h>
int main(){
int a;
int b;
int c;
int mountain[10];
gets("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
int x;
int y;
int z;
for(x=1;x<=9;x++){
if(mountain[0]<mountain[x]){
a = mountain[0]... | main.c: In function 'main':
main.c:7:2: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
7 | gets("%d%d%d%d%d%d%d%d%d%d",&mountain[0],&mountain[1],&mountain[2],&mountain[3],&mountain[4],&mountain[5],&mountain[6],&mountain[7],&mountain[8],&mountain[9]);
|... |
s680796747 | p00001 | C | #include<stdio.h>
int main(){
int i;
int a;
int mountain[10];
for(i =0;i<10;i++){
scanf("%d",&mountain[i]);
}
int x;
for(i=0;i<10;i++){
for(x=0;x<=2;x++){
if(mountain[x]<mountain[i]){
a = mountain[i];
mountain[x] = mountain[i];
mountain[i] = a;
}
}
}
printf("%d\n"&mountain[0] );
printf("%d... | main.c: In function 'main':
main.c:19:14: error: invalid operands to binary & (have 'char *' and 'int')
19 | printf("%d\n"&mountain[0] );
| ~~~~~~^~~~~~~~~~~~
| | |
| char * int
main.c:20:16: error: invalid operands to binary & (have 'char *' and 'int')
... |
s335552814 | p00001 | C | #include<stdio.h>
int main(void)
{
int a[10+1],i,M1,M2,M3;
scanf("%d",&a[10+1]);
for(i=1;i<=3;i++) {
if(a>M1) {
a=M1;
}
if(M2<a && a<M1) {
a=M2;
}
if(M3<a && a<M2) {
a=M3;
}
printf("%d\n",a);
}
return 0;
} | main.c: In function 'main':
main.c:7:21: warning: comparison between pointer and integer
7 | if(a>M1) {
| ^
main.c:8:26: error: assignment to expression with array type
8 | a=M1;
| ^
main.c:10:22: warning: compariso... |
s901238674 | p00001 | C | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int main()
{
int i,ar[20];
for(i=0;i<10;i++)
{
scanf("%d",&ar[i]);
}
sort(ar,ar+i);
printf("%d\n%d\n%d\n",ar[i-1],ar[i-2],ar[i-3]);
return 0;
} | main.c:3:10: fatal error: algorithm: No such file or directory
3 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s197792659 | p00001 | C | #include <cstdio>
#include <algorithm>
#include <vector>
int main(){
int i,x;
std::vector<int>v;
for(i=0;i<10;i++)scanf("%d",&x),v.push_back(x);
std::sort(v.begin(),v.end());
printf("%d\n%d\n%d\n",v[9],v[8],v[7]);
} | main.c:1:10: fatal error: cstdio: No such file or directory
1 | #include <cstdio>
| ^~~~~~~~
compilation terminated.
|
s322602048 | p00001 | C | #include<stdio.h>
int main(void){
double i,j,s=0,a[10],b[3];
for(i=0;i<10;i++)
scanf("%lld",&a[i]);
for(i=0;i<10;i++)
{
s=0;
for(j=0;j<10;j++)
{
if(a[j]>a[i])
s++;
}
if(s<3)
b[s]=a[i];
}
for(s=0;s<3;s++)
printf("%lld\n",b[s]);
return 0;
} | main.c: In function 'main':
main.c:6:20: error: array subscript is not an integer
6 | scanf("%lld",&a[i]);
| ^
main.c:12:12: error: array subscript is not an integer
12 | if(a[j]>a[i])
| ^
main.c:12:17: error: array subscript is not an integer
12 | i... |
s367238178 | p00001 | C | #include<stdio.h>
main(){
int c,i,j,temp,h[11];
for(c=0#include<stdio.h>
main(){
int c,i,j,temp,h[11];
for(c=0;c<10;c++){
scanf("%d",&h[c]);
}
for(i=0;i<3;i++){
for(j=c-1;j>0;j--){
if(h[j]>h[j-1]){
temp=h[j];
h[j]=h[j-1];
h[j-1]=temp;
}
}
}
printf("\n%d\n%d\n%d\n",h[0],h[1],h[... | main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
2 | main(){
| ^~~~
main.c: In function 'main':
main.c:4:10: error: stray '#' in program
4 | for(c=0#include<stdio.h>
| ^
main.c:4:10: error: expected ';' before 'include'
4 | for(c=0#include<stdio.h>
| ... |
s162822390 | p00001 | C | #include <stdio.h>
int main() {
int a[10], i, max, t, j=3;
for(i=0; i<10; i++) scanf("%d", &a[i]);
while(j--) {
max=a[0]
for(i=1; i<10; i++) if(a[i]>max) { max=a[i]; t=i; }
printf("%d\n", max);
a[t]=0;
t=0;
}
return 0;
} | main.c: In function 'main':
main.c:6:15: error: expected ';' before 'for'
6 | max=a[0]
| ^
| ;
7 | for(i=1; i<10; i++) if(a[i]>max) { max=a[i]; t=i; }
| ~~~
|
s437514766 | p00001 | C | #include <stdio.h>
#include <stdlib.h>
int compare(int *a, int *b){
return *a - *b
}
int main(void){
int Height[10] = {0};
int i;
for(i=0; i < 10; i++){
scanf("%d", &Height[i]);
}
qsort(Height, 10, sizeof(int), compare);
printf("%d\n%d\n%d",Height[7],Height[8],Height[9]);
return 0;
} | main.c: In function 'compare':
main.c:5:23: error: expected ';' before '}' token
5 | return *a - *b
| ^
| ;
6 | }
| ~
main.c: In function 'main':
main.c:17:40: error: passing argument 4 of 'qsort' from incompatible point... |
s293277663 | p00001 | C | #pragma comment(linker, "/STACK:102400000,102400000")
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<queue>
#include<stack>
#include<string>
#include<map>
#include<set>
#include<cmath>
#include<cassert>
#inclu... | main.c:2:13: fatal error: iostream: No such file or directory
2 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s061767083 | p00001 | C | #include <stdio.h>
int main (void){
int st = 0, nd =0 ,rd =0, tem, i;
for( i =0; i<10; i++){
scanf("%d",&s);
if ( tem >= st){
rd = nd;
nd = st;
st = tem;
continue ;
}
... | main.c: In function 'main':
main.c:7:25: error: 's' undeclared (first use in this function)
7 | scanf("%d",&s);
| ^
main.c:7:25: note: each undeclared identifier is reported only once for each function it appears in
main.c:14:26: error: expected expression before '=' token
... |
s983317340 | p00001 | C | #include <stdio.h>
int main (void){
int st = 0, nd =0 ,rd =0, tem, i;
for( i =0; i<10; i++){
scanf("%d",&tem);
if ( tem >= st){
rd = nd;
nd = st;
st = tem;
continue ;
}
... | main.c: In function 'main':
main.c:14:26: error: expected expression before '=' token
14 | if ( tem > = nd) {
| ^
main.c:19:25: error: expected expression before '=' token
19 | if ( tem > = rd) {
| ^
|
s786348226 | p00001 | C | #include<stdio.h>
int main(){
int a[10],i,j,temp;
for(i=0;i<10;i++) scnaf("%d",&a[i]);
for(i=9;i>=0;i--){
for(j=0;j<=i;j++){
if(a[j] <a[j+1]){
temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
}
}
}
for(i=0;i<3;i++) printf("%d\n",a[i]);
return 0;
} | main.c: In function 'main':
main.c:5:27: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | for(i=0;i<10;i++) scnaf("%d",&a[i]);
| ^~~~~
| scanf
|
s403456721 | p00001 | C | #include<stdio.h>
int main(){
int a[10],i,j,temp;
for(i=0;i<10;i++) scnaf("%d",&a[i]);
for(i=9;i>=0;i--){
for(j=0;j<=i;j++){
if(a[j] <a[j+1]){
temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
}
}
}
for(i=0;i<3;i++) printf("%d\n",a[i]);
return 0;
} | main.c: In function 'main':
main.c:5:27: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
5 | for(i=0;i<10;i++) scnaf("%d",&a[i]);
| ^~~~~
| scanf
|
s306808547 | p00001 | C | #include<stdio.h>
#include<stdlib.h>
int main(){
int a[10],i,j,temp;
for(i=0;i<10;i++) scnaf("%d",&a[i]);
for(i=9;i>=0;i--){
for(j=0;j<=i;j++){
if(a[j] <a[j+1]){
temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
}
}
}
for(i=0;i<3;i++) printf("%d\n",a[i]);
return 0;
} | main.c: In function 'main':
main.c:6:27: error: implicit declaration of function 'scnaf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
6 | for(i=0;i<10;i++) scnaf("%d",&a[i]);
| ^~~~~
| scanf
|
s025935963 | p00001 | C | #include <stdio.h>
void swap(int &a,int &b);
int main(){
int i,data[10];
for(i=0;i<10;i++) scanf("%d",&data[i]);
for(i=0;i<3;i++){
for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
}
printf("%d\n%d\n%d\n",data[0],data[1],data[2]);
return 0;
}
void swap(int &a,int &b){
int t;
t=a;
a=b;
b=t... | main.c:2:15: error: expected ';', ',' or ')' before '&' token
2 | void swap(int &a,int &b);
| ^
main.c: In function 'main':
main.c:7:62: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
7 | for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data... |
s674261707 | p00001 | C | #include <stdio.h>
void swap(int &a,int &b);
int main(){
int i,data[10];
for(i=0;i<10;i++) scanf("%d",&data[i]);
for(i=0;i<3;i++){
for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
}
printf("%d\n%d\n%d\n",data[0],data[1],data[2]);
return 0;
}
void swap(int &a,int &b){
int t;
t=a;
a=b;
b=t... | main.c:2:15: error: expected ';', ',' or ')' before '&' token
2 | void swap(int &a,int &b);
| ^
main.c: In function 'main':
main.c:7:62: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
7 | for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data... |
s877882178 | p00001 | C | #include <stdio.h>
void swap(int &a,int &b){
int t;
t=a;
a=b;
b=t;
}
//void swap(int &a,int &b);
int main(){
int i,data[10];
for(i=0;i<10;i++) scanf("%d",&data[i]);
for(i=0;i<3;i++){
for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
}
printf("%d\n%d\n%d\n",data[0],data[1],data[2]);
return ... | main.c:2:15: error: expected ';', ',' or ')' before '&' token
2 | void swap(int &a,int &b){
| ^
main.c: In function 'main':
main.c:13:62: error: implicit declaration of function 'swap' [-Wimplicit-function-declaration]
13 | for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(dat... |
s411686084 | p00001 | C | #include <stdio.h>
void swap(int *a,int *b){
int t;
t=*a;
*a=*b;
*b=t;
}
//void swap(int &a,int &b);
int main(){
int i,data[10];
for(i=0;i<10;i++) scanf("%d",&data[i]);
for(i=0;i<3;i++){
for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
}
printf("%d\n%d\n%d\n",data[0],data[1],data[2]);
ret... | main.c: In function 'main':
main.c:13:71: error: passing argument 1 of 'swap' makes pointer from integer without a cast [-Wint-conversion]
13 | for(int j=i+1;j<10;j++) if(data[j]>=data[i]) swap(data[i],data[j]);
| ~~~~^~~
|... |
s883874566 | p00001 | C | #include<stdio.h>
int main(){
int a,max1=0,max2=0,max3=0,i;
for(i=0;i<10;i++){
scanf("%d",&a);
else if(max1<a){
max3=max2;
max2=max1;
max1=a;
}
else if(max2<a){
max3=max2;
max2=a;
}
else if(max3<a)
max3=a;
}
printf("%d\n%d\n%d\n",max1,max2,max3);
return 0;
} | main.c: In function 'main':
main.c:7:9: error: 'else' without a previous 'if'
7 | else if(max1<a){
| ^~~~
|
s323791483 | p00001 | C | #include<stdio.h>
int main()
{
int i,x,a=-1,b=-1,c=-1;
for(i=1;i<=10;i++)
{
scanf("%d",&x);
if(x>a)
{
c=b;
b=a;
a=x;
}
else if(x>b)
{
c=b;
b=x;
}
else if(x>c)
c=x;
}
... | main.c: In function 'main':
main.c:22:33: error: expected ';' before 'return'
22 | printf("%d\n%d\n%d\n",a,b,c)
| ^
| ;
23 | return 0;
| ~~~~~~
|
s507768464 | p00001 | C | /*
* Author: chlxyd
* Created Time: 2013/8/15 13:05:07
* File Name: 1006.cpp
*/
#include<iostream>
#include<sstream>
#include<fstream>
#include<vector>
#include<list>
#include<deque>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<algorithm>
#include<cstdio>
#include<cstdlib>... | main.c:6:9: fatal error: iostream: No such file or directory
6 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s998528793 | p00001 | C | #include <stdio.h>
int main(){
int i,a[10],b[3],f;
for(i=0;i<10;i++){
scanf("%d",&a[i]);
}
for(i=0;i<10;i++){
if(max2>max1 && max1<a[i]){
b[0]=a[i];
continue;
}
if(max3>max2 && max2<a[i]){
b[1]=a[i];
continue;
}
if(max3<a[i]){
b[2]=a[i];
continue;
}
}
for(i=0;i<2;i++){
if(b[i]<b[i+1]){
f=b[i];
b[i]=b[i+1];
b[i+1]=f;
}... | main.c: In function 'main':
main.c:9:4: error: 'max2' undeclared (first use in this function)
9 | if(max2>max1 && max1<a[i]){
| ^~~~
main.c:9:4: note: each undeclared identifier is reported only once for each function it appears in
main.c:9:9: error: 'max1' undeclared (first use in this function)
9 | i... |
s067951277 | p00001 | C | #include<stdio.h>
#include<stlib.h>
int main(){
int n[10],a;
for (int f=0;f<10;f++){
scanf("%d",&n[f]);
}
for(int f1=0;f1<10;f1++){
for(int f2=0;f2<10;f2++){
a=max(a,max(n[f1],n[f2]));
}
}
printf("%d",a);
return 0;
} | main.c:2:9: fatal error: stlib.h: No such file or directory
2 | #include<stlib.h>
| ^~~~~~~~~
compilation terminated.
|
s758318180 | p00001 | C | #include<stdio.h>
#include<stlib.h>
int main(){
int n[10],a;
for (int f=0;f<10;f++){
scanf("%d",&n[f]);
}
for(int f1=0;f1<10;f1++){
for(int f2=0;f2<10;f2++){
a=max(a,max(n[f1],n[f2]));
}
}
printf("%d",a);
return 0;
} | main.c:2:9: fatal error: stlib.h: No such file or directory
2 | #include<stlib.h>
| ^~~~~~~~~
compilation terminated.
|
s282937326 | p00001 | C | #include<stdio.h>
#include<stdlib.h>
int main(){
int n[10],a;
for (int f=0;f<10;f++){
scanf("%d",&n[f]);
}
for(int f1=0;f1<10;f1++){
for(int f2=0;f2<10;f2++){
a=max(a,max(n[f1],n[f2]));
}
}
printf("%d",a);
return 0;
} | main.c: In function 'main':
main.c:11:15: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
11 | a=max(a,max(n[f1],n[f2]));
| ^~~
|
s261588137 | p00001 | C | #include<stdio.h>
#include<stdlib.h>
int main(){
int n[10],a,f,f1,f2;
for (f=0;f<10;f++){
scanf("%d",&n[f]);
}
for(f1=0;f1<10;f1++){
for(f2=0;f2<10;f2++){
a=max(a,max(n[f1],n[f2]));
}
}
printf("%d",a);
return 0;
} | main.c: In function 'main':
main.c:11:15: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
11 | a=max(a,max(n[f1],n[f2]));
| ^~~
|
s234291406 | p00001 | C | #include<stdio.h>
#include<stdlib.h>
int main(void){
int n[10]=0,a,f,f1,f2;
for (f=0;f<10;f++){
scanf("%d",&n[f]);
}
for(f1=0;f1<10;f1++){
for(f2=0;f2<10;f2++){
a=max(a,max(n[f1],n[f2]));
}
}
printf("%d",a);
return 0;
} | main.c: In function 'main':
main.c:5:15: error: invalid initializer
5 | int n[10]=0,a,f,f1,f2;
| ^
main.c:11:15: error: implicit declaration of function 'max' [-Wimplicit-function-declaration]
11 | a=max(a,max(n[f1],n[f2]));
| ^~~
|
s149247185 | p00001 | C | #include <stdio.h>
int main(){
int n,height,top[3];
for(n=1;n<=10;n++){
scanf("%d",&height);
if(top[0]<height){
top[2]=top[1];
top[1]=top[0];
top[0]=height;
}
else if(top[1]<height){
top[2]=top[1];
top[1]=height;
... | main.c:22:5: error: expected identifier or '(' before 'return'
22 | return 0;
| ^~~~~~
main.c:23:1: error: expected identifier or '(' before '}' token
23 | }
| ^
|
s830665091 | p00001 | C | #include <iostream>
#include <cstdlib>
#include <cstdio>
#include <string>
#include <cmath>
#include <algorithm>
using namespace std;
int main()
{
int h[10];
for(int i=0;i<10;i++) cin>>h[i];
int temp;
sort(h,h+10);
cout<<h[9]<<endl<<h[8]<<endl<<h[7];
} | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s508825814 | p00001 | C | console.log('Hello World');
a
a | main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | console.log('Hello World');
| ^
main.c:1:13: warning: multi-character literal with 11 characters exceeds 'int' size of 4 bytes
1 | console.log('Hello World');
| ^~~~~~~~~~~~~
main.c:3:1: error... |
s672749111 | p00001 | C | #include <stdio.h>
int main(){
int x[10],i,j,max[3];
for(i=0; i<10; i++){
scanf("%d",&x[i]);
}
max[0]=x[0];
for(i=0; i<10; i++){
if(x[i]>max[0]){
max[0]=x[i];
}
}
if(max[1]==x[0]){
max[1]=x[1];
} else [
max[1]=x[0]
}
for(i=0; i<10; i++){
if((x[i]>max[1]) && (x[i]<max[0])){
max[1]=x[i]... | main.c: In function 'main':
main.c:20:16: error: expected expression before '[' token
20 | } else [
| ^
main.c:21:28: error: expected ';' before '}' token
21 | max[1]=x[0]
| ^
| ;
22 | }
... |
s142188478 | p00001 | C | #include <stdio.h>
int main(){
int x[10],i,j,max[3];
for(i=0; i<10; i++){
scanf("%d",&x[i]);
}
max[0]=x[0];
for(i=0; i<10; i++){
if(x[i]>max[0]){
max[0]=x[i];
}
}
if(max[1]==x[0]){
max[1]=x[1];
} else {
max[1]=x[0]
}
for(i=0; i<10; i++){
if((x[i]>max[1]) && (x[i]<max[0])){
max[1]=x[i]... | main.c: In function 'main':
main.c:21:28: error: expected ';' before '}' token
21 | max[1]=x[0]
| ^
| ;
22 | }
| ~
main.c:33:28: error: expected ';' before '}' token
33 | m... |
s834571981 | p00001 | C | #include<stdio.h>
#include<conio.h>
int main()
{
int a[100],i,mountain1,mountain2,mountain3;
for(i=0;i<10;i++)
{
scanf("%d",&a[i]);
}
mountain1=a[0];
for(i=1;i<10;i++)
{
if(mountain1<a[i])
{
mountain1=a[i];
}
}
mountain2=0;
for(i=0;i<10;i++)
{
if(a[i]<mountain1)
{
if(a[i]>mountain2)
... | main.c:2:9: fatal error: conio.h: No such file or directory
2 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s245851080 | p00001 | C | #include<stdio.h>
#include<conio.h>
int main()
{
long long int s,d,t,n=0;
long long int i[15];
for(s=0;s<=9;s++)
{
scanf("%lld,",&i[s]);
}
for(d=0;d<=9;d++)
{
for(s=0;s<=9;s++)
{
if(i[d]<i[s])
{
t=i[s];
i[s]=i[d];
i[d]=t;
}
}
}
for(s=9;s>=7;s--)
{
printf("%... | main.c:2:9: fatal error: conio.h: No such file or directory
2 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s070127581 | p00001 | C | #include<stdio.h>
#include<conio.h>
int main()
{
long long int s,d,t,n=0;
long long int i[15];
for(s=0;s<=9;s++)
{
scanf("%lld,",&i[s]);
}
for(d=0;d<=9;d++)
{
for(s=0;s<=9;s++)
{
if(i[d]<i[s])
{
t=i[s];
i[s]=i[d];
i[d]=t;
}
}
}
for(s=9;s>=8;s--)
{
printf("%... | main.c:2:9: fatal error: conio.h: No such file or directory
2 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s366995524 | p00001 | C | #include <Stdio.h>
int max_of_array(int vc[], int n, int *num, int *num2) {
int i;
int max;
max = vc[0];
for(i = 0; i < n; i++) {
if((vc[i] > max) && (vc[i] != *num && vc[i] != *num2)) {
max = vc[i];
}
}
return(max);
}
int main(void) {
i... | main.c:1:10: fatal error: Stdio.h: No such file or directory
1 | #include <Stdio.h>
| ^~~~~~~~~
compilation terminated.
|
s868067478 | p00001 | C | #include <Stdio.h>
int max_of_array(int vc[], int n, int *num, int *num2) {
int i;
int max;
max = vc[0];
for(i = 0; i < n; i++) {
if((vc[i] > max) && (vc[i] != *num && vc[i] != *num2)) {
max = vc[i];
}
}
return(max);
}
int main(void) {
i... | main.c:1:10: fatal error: Stdio.h: No such file or directory
1 | #include <Stdio.h>
| ^~~~~~~~~
compilation terminated.
|
s278285880 | p00001 | C | #include <stdio.h>
#include <string.h>
int main(void)
{
int i,j,temp,input_int,rank[3] = {0};
char input[5];
char* p;
for (i = 0; i < 10; i++) {
fgets(input, sizeof(input),stdin);
p = strchr(input,'\n');
if (p != NULL) *p = '\0';
sscanf_s(input,"%d",&input_int);
for(j = 0; j < 3; j++)
{
if (rank[j] ... | main.c: In function 'main':
main.c:13:17: error: implicit declaration of function 'sscanf_s'; did you mean 'sscanf'? [-Wimplicit-function-declaration]
13 | sscanf_s(input,"%d",&input_int);
| ^~~~~~~~
| sscanf
|
s290628548 | p00001 | C | #include <stdio.h>
int main(){
int i,m,m1,m2,m3;
for(i=0;i<10;i++){
scanf("%d",&m);
if(i==0){
m1=m;
}
else if(i==1){
if(m>m1){
m2=m1;
m1=m;
}
else{
m2=m;
}
}
... | main.c: In function 'main':
main.c:54:5: error: expected declaration or statement at end of input
54 | return 0;
| ^~~~~~
|
s984528893 | p00001 | C | #include<stdio.h>
int main(void)
{
int i,j,k;
int mountain[10];
int top[3];
for(i=0;i<3;i++){
top[i]=0;
}
for(i=0;i<10;i++){
printf("山の高さ%d(整数):",i+1);
scanf("%d",&mountain[i]);
if(0<=mountain[i]||mountain[i]<=10000)
}
for(i=0;i<10;i++){
for(j=0;j<3;j++){
if(top[j]<mountain[i]){
if(j==0){
... | main.c: In function 'main':
main.c:15:9: error: expected expression before '}' token
15 | }
| ^
|
s352483242 | p00001 | C | #include <stdio.h>
int main(void)
{
unsigned int n,s,v;
unsigned int mountains[10];
for(n=0;n<10;n++)
scanf("%u",&mountains[n]);
for(s=1;s<=3;s++)
{
for(n=0;n<10;n++)
v=v<mountains[n]?mountains[n]:v;
printf("%u\n",v);
for(n=0;n<10;n++)
mountain... | main.c: In function 'main':
main.c:16:14: error: expected expression before '[' token
16 | return 0;[
| ^
main.c:16:15: error: expected ';' before '}' token
16 | return 0;[
| ^
| ;
17 | }
| ~
|
s123636421 | p00001 | C | #include<stdio.h>
int main()
{
int i,j,high[10],higher[3],flag=1,escape;
for(i=0;i<10;i++)
{
scanf("%d",&high[i]);
}
higher[0] = high[0];
higher[1] = high[1];
higher[2] = high[2];
while(flag)
{
for(i=0;i<2;i++)
{
if(higher[i]<higher[i+1])
{
escape[0] = higher[i];
higher[i] = highe... | main.c: In function 'main':
main.c:26:39: error: subscripted value is neither array nor pointer nor vector
26 | escape[0] = higher[i];
| ^
|
s598016320 | p00001 | C | #include<stdio.h>
#include<stdlib.h>
int main()
{
int i,j,high[10],higher[3],flag=1,escape;
for(i=0;i<10;i++)
{
scanf("%d",&high[i]);
}
higher[0] = high[0];
higher[1] = high[1];
higher[2] = high[2];
while(flag)
{
for(i=0;i<2;i++)
{
if(higher[i]<higher[i+1])
{
escape[0] = higher[i];
... | main.c: In function 'main':
main.c:27:39: error: subscripted value is neither array nor pointer nor vector
27 | escape[0] = higher[i];
| ^
|
s418145710 | p00001 | C | int top3(int a[])
{
int i,j,k;
for(i=10;i>7;i--)
{
for(j=i;j>1;j--)
{
if(a[j]<a[j-1])
{
k=a[j];
a[j]=a[j-1];
a[j-1]=k;
}
}
}
return a[];
} | main.c: In function 'top3':
main.c:17:18: error: expected expression before ']' token
17 | return a[];
| ^
|
s252901292 | p00001 | C | #include<stdio.h>
#define N 10
int main()
{
int i, j, n, a=0;
int A[N];
for(i=0;i<10;i++){
scanf("%d", &n);
A[i] = n;
}
for(i=0;i<3;i++){
n = 0;
for(j=i1;j<N;j++){
if(n<A[j] && 0<=A[j] && A[j]<=10000){
n = A[j];
a = j;//ma... | main.c: In function 'main':
main.c:15:15: error: 'i1' undeclared (first use in this function); did you mean 'i'?
15 | for(j=i1;j<N;j++){
| ^~
| i
main.c:15:15: note: each undeclared identifier is reported only once for each function it appears in
|
s778218253 | p00001 | C | #include <stdio.h>
#include <string.h>
#include <algorithm>
#include <stdlib.h>
using namespace std;
int main()
{
int a[1000],i,j,k;
for(i=0;i<10;i++)
scanf("%d",&a[i]);
sort(a,a+i);
reverse(a,a+i);
for(i=0;i<3;i++)
printf("%d\n",a[i]);
return 0;
} | main.c:3:10: fatal error: algorithm: No such file or directory
3 | #include <algorithm>
| ^~~~~~~~~~~
compilation terminated.
|
s448773536 | p00001 | C | #include<stdio.h>
int main(){
int i,j,height[10]rank[3],backup;
for(i=0;i<10;i++){
scanf("%d",height[i]);
}
for(j=0;j<10;j++){
for(i=0;i<9;i++){
if(height[i]>height[i+1]){
backup=height[i];
height[i]=height[i+1];
height[i+1]=backup;
}
}
}
for(i=0;i<3;i++){
rank[i]=height[9-i];
printf... | main.c: In function 'main':
main.c:4:27: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rank'
4 | int i,j,height[10]rank[3],backup;
| ^~~~
main.c:6:28: error: 'height' undeclared (first use in this function)
6 | scanf("%d",height[i]);
... |
s336646700 | p00001 | C | #include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
int mountain[10] = {0};
int i, k, index;
int height = 0;
for (i = 0; i < 10; i++) {
cin >> mountain[i];
}
for (i = 0; i < 3; i++) {
height = 0;
for (k = 0; k < 10; k++) {
if (he... | main.c:1:10: fatal error: iostream: No such file or directory
1 | #include <iostream>
| ^~~~~~~~~~
compilation terminated.
|
s859805420 | p00001 | C | #include<stdio.h>
int main(void)
{
int h[10],i,j,box;
for(i=0;i<10;i++){
scanf("%d",&h[i]);
for(i=0;i<9;i++){
for(j=i+1;j<10;j++){
if(h[i]<h[j]){
box=h[i];
h[i]=h[j];
h[j]=box;
}
}
}
for(i=0;i<3;i++)
printf("%d",h[i]);
return 0;
} | main.c: In function 'main':
main.c:19:1: error: expected declaration or statement at end of input
19 | }
| ^
|
s516022568 | p00001 | C | #include<stdio.h>
int main(void)
{
int h[10],i,j,box;
for(i=0;i<10;i++){
scanf("%d",&h[i]);
for(i=0;i<9;i++){
for(j=i+1;j<10;j++){
if(h[i]<h[j]){
box=h[i];
h[i]=h[j];
h[j]=box;
}
}
}
for(i=0;i<3;i++)
printf("%d\n",h[i]);
return 0;
} | main.c: In function 'main':
main.c:19:1: error: expected declaration or statement at end of input
19 | }
| ^
|
s741327255 | p00001 | C | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner input = new Scanner(System.in);
int first = 0;
int second = 0;
int third = 0;
for(int i=0;i<10;i++){
int current = input.nextInt();
if (current>third)
if(current>second){
if(current>first){
third... | main.c:1:1: error: unknown type name 'import'
1 | import java.util.Scanner;
| ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
1 | import java.util.Scanner;
| ^
main.c:2:1: error: unknown type name 'public'
2 | public class Main{
| ^~~... |
s559388845 | p00001 | C | http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001 | main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
1 | http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001
| ^
|
s773205362 | p00001 | C | int main(){
int mcount=0;
int mbest3[4]={0,0,0,0};
while(scanf("[\n]%d",&mbest3[3])){
int ccount=0;
do{
int i=0;
for(;i<3;i++){}
if(mbest3[i]>mbest[i+1]){
mbest3[i]+=mbest[i+1];
mbest3[i+1]=mbest3[i]-mbest3[i+1];
mbest3[i]-=mbest3[i];
}
}while(ccount==0);
}
int i=0;
for(;i<3;i++){
... | main.c: In function 'main':
main.c:4:15: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
4 | while(scanf("[\n]%d",&mbest3[3])){
| ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
+++ |+#include <stdio.h>
1 | int main(... |
s525470981 | p00001 | C | #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
int arr[11];
while(cin>>arr[0])
{
for(int i=1;i<10;i++)
{
cin>>arr[i];
}
sort(arr,arr+10);
cout<<arr[9]<<endl;
cout<<arr[8]<<endl;
cout<<arr[7]<<endl;
}
retu... | main.c:1:9: fatal error: iostream: No such file or directory
1 | #include<iostream>
| ^~~~~~~~~~
compilation terminated.
|
s835687445 | p00001 | C | #include<stdio.h>
int main(){
int i;
int a[10];
for(i=0;i<10;i++) scanf("%d",&a[i]);
int f=s=t=0;
for(i=0;i<10;i++)
{
if(a[i]>=a[f])
{
t=s;
s=f;
f=i;
}
else if(a[i]>=a[s])
{
t=s;
s=i;
}
else if(a[i]>=a[t])
{
t=i;
}
}
printf("%d\n%d\n%d\n",a[f],a[s],a[t]);
... | main.c: In function 'main':
main.c:7:9: error: 's' undeclared (first use in this function)
7 | int f=s=t=0;
| ^
main.c:7:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:7:11: error: 't' undeclared (first use in this function)
7 | int f=s=t=0;
... |
s275998143 | p00001 | C | #include<stdio.h>
int array[10],i,first=0,second=0,third=0;
int main(void){
for(i=0;i<10;i++){
printf("height of mountain %d(integer)",i+1);
scanf("%d",&array[i]);
}
for(i=0;i<10;i++){
if(array[i]>first){
third=s... | main.c: In function 'main':
main.c:33:9: error: expected declaration or statement at end of input
33 | return 0;
| ^~~~~~
|
s372996812 | p00001 | C | int height[10]={1819,2003,876,2840,1723,1673,3776,2848,1592,922};
int minh=10000;
int askmax(){
int maxh=0;
int maxindex=0;
for(int i=0;i<10;i++){
if(height[i]>height[maxindex]){
maxindex=i;
}
}
maxh=height[maxindex];
height[maxindex]=minh;
return maxh;
}
int askmin(){
for(int i=0;i<10;i++){
if(height... | main.c: In function 'main':
main.c:26:9: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
26 | printf("height of the 1st mountain %d\n",askmax());
| ^~~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'printf'
+++ |+#include <stdio.h>
... |
s168723927 | p00001 | C | #include <stdio.h>
int main(void){
int height[10]={0};
int i,j,temp;
for(i=0;i<10;i++){
scanf("%d",&height[i]);
for(i=0;i<9;i++){
for(j=i+1;j<10;j++){
if(height[i]<height[j]){
temp=height[i];
height[i]=height[j];
height[j]=temp;
}
}
}
for(i=0;i<3;i++){
printf("%d\n",height[i]);
}
retur... | main.c: In function 'main':
main.c:20:1: error: expected declaration or statement at end of input
20 | }
| ^
|
s620272176 | p00001 | C | #include<stdio.h>
int main(void){
int a,b,c,d,e;
c=0,d=0,e=0;
for(a=0;a<10;a++){
scanf("%d",&b);
if(c=<b){
d=c;
c=b;
continue;
}else if(d=<b){
e=d;
d=b;
continue;
}else if(e=<b){
e=b;
... | main.c: In function 'main':
main.c:7:14: error: expected expression before '<' token
7 | if(c=<b){
| ^
main.c:11:20: error: expected expression before '<' token
11 | }else if(d=<b){
| ^
main.c:15:20: error: expected expression before '<' token
15 | ... |
s538153283 | p00001 | C | #include<stdio.h>
int main(void){
int a,b,c,d,e;
c=0,d=0,e=0;
for(a=0;a<10;a++){
scanf("%d",&b);
if(c=<b){
d=c;
c=b;
continue;
}else if(d=<b){
e=d;
d=b;
continue;
}else if(e=<b){
e=b;
... | main.c: In function 'main':
main.c:7:14: error: expected expression before '<' token
7 | if(c=<b){
| ^
main.c:11:20: error: expected expression before '<' token
11 | }else if(d=<b){
| ^
main.c:15:20: error: expected expression before '<' token
15 | ... |
s113489130 | p00001 | C | #include<stdio.h>
#include<conio.h>
int main(void)
{
int array[10],c,j,m,swap;
for(c=0;c<10;c++)
{
//printf("Please enter value for array[%d] : ",c);
scanf("\n%d",&array[c]);
}
printf("\n");
//printf("\nThe orignal values . . . \n");
//for(c=0;c<5;c++)
//printf("%d \t",array[c]);
for(c=0;c<9;c++)
{
m=c;
for(j=c+1;j<1... | main.c:2:9: fatal error: conio.h: No such file or directory
2 | #include<conio.h>
| ^~~~~~~~~
compilation terminated.
|
s905234822 | p00001 | C | #include<stdio.h>
int main(void) {
int height[10];
int i,j;
for(i=0; i<10; i++)
scanf("%d", &height[i]);
for(i=0,i<10;i++) {
for(j=i, j<10; j++) {
if(a[i] < a[j]) {
int swap =a[i];
a[i] = a[j];
a[j] = swap;
}
}
}
for(i=0; i<3; i++)
printf("%d\n", height[i]);
return 0;
} | main.c: In function 'main':
main.c:10:25: error: expected ';' before ')' token
10 | for(i=0,i<10;i++) {
| ^
| ;
main.c:11:35: error: expected ';' before ')' token
11 | for(j=i, j<10; j++) {
| ... |
s570286943 | p00001 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N ;
vector<int>Muntain(N);
for(int i = 0; i < N; i++){
cin >> Mountain(i);
}
sort(Mountain.begin(), Mountain.endl());
for(int j = 0; j < 3; j++){
cout << Mountain(j) << endl;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:8:12: error: 'Mountain' was not declared in this scope; did you mean 'Muntain'?
8 | cin >> Mountain(i);
| ^~~~~~~~
| Muntain
a.cc:10:8: error: 'Mountain' was not declared in this scope; did you mean 'Muntain'?
10 | sort(Mountain.begin()... |
s540832618 | p00001 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
int N ;
vector<int>Mountain(N);
for(int i = 0; i < N; i++){
cin >> Mountain(i);
}
sort(Mountain.begin(), Mountain.endl());
for(int j = 0; j < 3; j++){
cout << Mountain(j) << endl;
}
}
}
}
| a.cc: In function 'int main()':
a.cc:8:20: error: no match for call to '(std::vector<int>) (int&)'
8 | cin >> Mountain(i);
| ~~~~~~~~^~~
a.cc:10:35: error: 'class std::vector<int>' has no member named 'endl'; did you mean 'end'?
10 | sort(Mountain.begin(), Mountain.endl());
| ... |
s381745479 | p00001 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> mountain;
for(int i = 0; i < 10; i++){
cin >> mountian.at(i);
}
sort(moutain.begin(), moutain.end());
for (int i = 0; i < 3; i++) {
cout << moutain.at(i) << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:7:14: error: 'mountian' was not declared in this scope; did you mean 'mountain'?
7 | cin >> mountian.at(i);
| ^~~~~~~~
| mountain
a.cc:9:10: error: 'moutain' was not declared in this scope; did you mean 'mountain'?
9 | sort(mou... |
s567384790 | p00001 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> mountain;
for(int i = 0; i < 10; i++){
cin >> mountain.at(i);
}
sort(moutain.begin(), moutain.end());
for (int i = 0; i < 3; i++) {
cout << moutain.at(i) << endl;
}
}
}
| a.cc: In function 'int main()':
a.cc:9:10: error: 'moutain' was not declared in this scope; did you mean 'mountain'?
9 | sort(moutain.begin(), moutain.end());
| ^~~~~~~
| mountain
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
17 | }
| ^
|
s756153267 | p00001 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> mountain;
for(int i = 0; i < 10; i++){
cin >> mountain.at(i);
}
sort(mountain.begin(), mountain.end());
reverse(moutain.begin(), moutain.endl());
for (int i = 0; i < 3; i++) {
cout << mountain.at(i) << endl;
... | a.cc: In function 'int main()':
a.cc:10:13: error: 'moutain' was not declared in this scope; did you mean 'mountain'?
10 | reverse(moutain.begin(), moutain.endl());
| ^~~~~~~
| mountain
|
s930766748 | p00001 | C++ | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> mountain;
for(int i = 0; i < 10; i++){
cin >> mountain.at(i);
}
sort(mountain.begin(), mountain.end());
reverse(mountain.begin(), mountain.endl());
for (int i = 0; i < 3; i++) {
cout << mountain.at(i) << endl;... | a.cc: In function 'int main()':
a.cc:10:40: error: 'class std::vector<int>' has no member named 'endl'; did you mean 'end'?
10 | reverse(mountain.begin(), mountain.endl());
| ^~~~
| end
|
s948515875 | p00001 | C++ |
using namespace std;
int main(){
int x[10];
for (int i = 0; i < 10; i++){
cin >> x[i];
}
sort(begin(x), end(x));
cout << x[9];
cout << x[8];
cout << x[7];
}
| a.cc: In function 'int main()':
a.cc:7:17: error: 'cin' was not declared in this scope
7 | cin >> x[i];
| ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
+++ |+#include <iostream>
1 |
a.cc:9:14: e... |
s259973601 | p00001 | C++ |
int main(){
int x[10];
for (int i = 0; i < 10; i++){
cin >> x[i];
}
sort(begin(x), end(x));
cout << x[9];
cout << x[8];
cout << x[7];
}
| a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope
5 | cin >> x[i];
| ^~~
a.cc:7:14: error: 'begin' was not declared in this scope
7 | sort(begin(x), end(x));
| ^~~~~
a.cc:7:24: error: 'end' was not declared in ... |
s143819725 | p00001 | C++ | //
// main.cpp
// kyougi
//
// Created by 寺林 一旭 on 2018/08/27.
// Copyright © 2018年 寺林 一旭. All rights reserved.
//
#include <iostream>
#include <vector>
using namespace std;
int main() {
int num;
vector<int> list;
while(cin)
{
cin >> num;
list.push_back(num);
}
sort(list.b... | a.cc: In function 'int main()':
a.cc:22:5: error: 'sort' was not declared in this scope; did you mean 'short'?
22 | sort(list.begin(), list.end(), greater<int>());
| ^~~~
| short
|
s482376203 | p00001 | C++ | #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main()
{
int i;
vector<int> a;
int c;
for(i=0;i<10;i++)
{
cin>>c;
a.push_back(c)
}
sort(a.begin(),a.end());
cout<<a[9]<<endl<<a[8]<<endl<<a[7];
}
| a.cc: In function 'int main()':
a.cc:14:17: error: expected ';' before '}' token
14 | a.push_back(c)
| ^
| ;
15 | }
| ~
|
s340529728 | p00001 | C++ | #include<iostream>
#include<vector>
using namespace std;
const int numOfMountain = 10;
int main(int argc, char* argv[]){
int mountainBuf;
vector<int> mountains;
for(int i = 0; i <= numOfMountain; i++) {
mountainBuf = atoi(argv[i]);
mountains.push_back(mountainBuf);
}
sort(mounta... | a.cc: In function 'int main(int, char**)':
a.cc:17:5: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(mountains.begin(), mountains.end());
| ^~~~
| short
|
s623437137 | p00001 | C++ | #include <iostream>
#include <vector>
#include <iterator>
#include <cstdlib>
#include <algorithm>
using namespace std;
const int numOfMountain = 10;
int main(int argc, char** argv){
int mountainBuf;
vector<int> mountains;
for(int i = 0; i <= numOfMountain; i++) {
mountainBuf = atoi(argv[i]);
... | a.cc: In function 'int main(int, char**)':
a.cc:22:5: error: '__wrap_iter' was not declared in this scope
22 | __wrap_iter out = mountains.end();
| ^~~~~~~~~~~
a.cc:24:20: error: 'out' was not declared in this scope
24 | cout << *--out << endl;
| ^~~
|
s779676222 | p00001 | C++ | #include<iostream>
using namespace std;
int main()
{
int b[10];
for(int i=0;i<10;i++)
cin>>b[i];
int t;
for(i=0;i<3;i++)
{
for(int j=0;j+i<9;j++)
while(b[j]>b[j+1])
{ t=b[j];b[j]=b[j+1];b[j+1]=t;}
cout<<b[j]<<endl;
}
return 0;
} | a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
9 | for(i=0;i<3;i++)
| ^
a.cc:14:25: error: 'j' was not declared in this scope
14 | cout<<b[j]<<endl;
| ^
|
s692178997 | p00001 | C++ | #include <iostream>
using namespace std;
int main()
{
int h;
int mh[3] = {0};
for(i=0;i<10;i++){
cin<<h;
if(mh[0] < h) mh[0] = h;
else if(mh[1] < h) mh[1] = h;
else if(mh[2] < h) mh[2] = h;
}
for(i=0;i<3;i++) cout<<mh[i]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
9 | for(i=0;i<10;i++){
| ^
a.cc:10:20: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int')
10 | cin<<h;
| ... |
s364124029 | p00001 | C++ |
#include <iostream>
using namespace std;
int main(int argc, const char * argv[])
{
int *input = new int[10];
for(int i=0;i<10;i++){
cin >> input[i];
}
sort(input, input +10);
for(int i=0;i<3;i++){
cout << input[9-i] << endl;
}
return 0;
} | a.cc: In function 'int main(int, const char**)':
a.cc:16:5: error: 'sort' was not declared in this scope; did you mean 'short'?
16 | sort(input, input +10);
| ^~~~
| short
|
s253510391 | p00001 | C++ | #include<iostream>
using namespace std;
int main(){
int h[10];
int i;
for(i=0;i<10;i++)cin>>h[i];
sort(h,h+10);
for(i=0;i<3;i++)cout<<h[i]<<endl;
return 0;
} | a.cc: In function 'int main()':
a.cc:7:1: error: 'sort' was not declared in this scope; did you mean 'short'?
7 | sort(h,h+10);
| ^~~~
| short
|
s283779989 | p00001 | C++ | import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] array = new String[10];
int[] heights = new int[10];
for(int i=0; i<10; i++){
... | a.cc:1:1: error: 'import' does not name a type
1 | import java.io.*;
| ^~~~~~
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.*;
| ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.