0_0_16822011_667.cpp:1:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
0_0_16822011_667.cpp:3:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
0_0_16822011_667.cpp:5:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
0_0_16822011_667.cpp:7:9: error: #include expects "FILENAME" or <FILENAME>
#include
^
0_0_16822011_667.cpp:2:1: error: expected unqualified-id before '<' token
<stdio.h>
^
0_0_16822011_667.cpp:17:2: error: 'Node' does not name a type
}Node;
^
0_0_16822011_667.cpp:19:1: error: 'Node' does not name a type
Node peanuts[3000];
^
0_0_16822011_667.cpp: In function 'int cmp(const void*, const void*)':
0_0_16822011_667.cpp:24:14: error: 'Node' was not declared in this scope
return ((Node*)b)->num - ((Node*)a)->num;
^
0_0_16822011_667.cpp:24:19: error: expected primary-expression before ')' token
return ((Node*)b)->num - ((Node*)a)->num;
^
0_0_16822011_667.cpp:24:20: error: expected ')' before 'b'
return ((Node*)b)->num - ((Node*)a)->num;
^
0_0_16822011_667.cpp: In function 'int main()':
0_0_16822011_667.cpp:32:36: error: 'stdin' was not declared in this scope
freopen("Sample Input.txt","r",stdin);
^
0_0_16822011_667.cpp:32:41: error: 'freopen' was not declared in this scope
freopen("Sample Input.txt","r",stdin);
^
0_0_16822011_667.cpp:40:5: error: 'Node' was not declared in this scope
Node dodo;
^
0_0_16822011_667.cpp:43:18: error: 'scanf' was not declared in this scope
scanf("%d",&T);
^
0_0_16822011_667.cpp:75:21: error: 'peanuts' was not declared in this scope
peanuts[k].m = i;
^
0_0_16822011_667.cpp:96:15: error: 'peanuts' was not declared in this scope
qsort(peanuts,k,sizeof(peanuts[0]),cmp);
^
0_0_16822011_667.cpp:96:47: error: 'qsort' was not declared in this scope
qsort(peanuts,k,sizeof(peanuts[0]),cmp);
^
0_0_16822011_667.cpp:98:9: error: 'dodo' was not declared in this scope
dodo.m = 0;dodo.n = 1;dodo.num = 0;
^
0_0_16822011_667.cpp:109:49: error: 'abs' was not declared in this scope
time = abs(peanuts[i].m - dodo.m) + peanuts[i].m + 1;
^
0_0_16822011_667.cpp:113:49: 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_16822011_667.cpp:128:52: error: 'abs' was not declared in this scope
K -= (abs(peanuts[i].m - dodo.m) + abs(peanuts[i].n - dodo.n) +1 );
^
0_0_16822011_667.cpp:152:31: error: 'printf' was not declared in this scope
printf("%d\n",dodo.num);
^
|