0_0_16379347_1912.cpp:2:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
0_0_16379347_1912.cpp:4:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
0_0_16379347_1912.cpp:6:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
0_0_16379347_1912.cpp:8:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
0_0_16379347_1912.cpp:3:1: error: expected unqualified-id before '<' token
<stdio.h>
^
0_0_16379347_1912.cpp:14:2: error: 'Node' does not name a type
}Node;
^
0_0_16379347_1912.cpp:15:1: error: 'Node' does not name a type
Node peanuts[3000];
^
0_0_16379347_1912.cpp: In function 'int cmp(const void*, const void*)':
0_0_16379347_1912.cpp:18:14: error: 'Node' was not declared in this scope
return ((Node*)b)->num - ((Node*)a)->num;
^
0_0_16379347_1912.cpp:18:19: error: expected primary-expression before ')' token
return ((Node*)b)->num - ((Node*)a)->num;
^
0_0_16379347_1912.cpp:18:20: error: expected ')' before 'b'
return ((Node*)b)->num - ((Node*)a)->num;
^
0_0_16379347_1912.cpp: In function 'int main()':
0_0_16379347_1912.cpp:26:5: error: 'Node' was not declared in this scope
Node dodo;
^
0_0_16379347_1912.cpp:27:18: error: 'scanf' was not declared in this scope
scanf("%d",&T);
^
0_0_16379347_1912.cpp:39:21: error: 'peanuts' was not declared in this scope
peanuts[k].m = i;
^
0_0_16379347_1912.cpp:46:15: error: 'peanuts' was not declared in this scope
qsort(peanuts,k,sizeof(peanuts[0]),cmp);
^
0_0_16379347_1912.cpp:46:47: error: 'qsort' was not declared in this scope
qsort(peanuts,k,sizeof(peanuts[0]),cmp);
^
0_0_16379347_1912.cpp:47:9: error: 'dodo' was not declared in this scope
dodo.m = 0;dodo.n = 1;dodo.num = 0;
^
0_0_16379347_1912.cpp:51:45: error: 'abs' was not declared in this scope
time = abs(peanuts[i].m - dodo.m) + peanuts[i].m + 1;
^
0_0_16379347_1912.cpp:53:45: error: 'abs' was not declared in this scope
time = abs(peanuts[i].m - dodo.m) + abs(peanuts[i].n - dodo.n) + peanuts[i].m + 1;
^
0_0_16379347_1912.cpp:59:48: error: 'abs' was not declared in this scope
K -= (abs(peanuts[i].m - dodo.m) + abs(peanuts[i].n - dodo.n) +1 );
^
0_0_16379347_1912.cpp:67:31: error: 'printf' was not declared in this scope
printf("%d\n",dodo.num);
^
|