Submission #125887

#TimeUsernameProblemLanguageResultExecution timeMemory
125887zozder철로 (IOI14_rail)C++14
Compilation error
0 ms0 KiB
#include "rail.h" #include <iostream> #include <cstdlib> using namespace std; int l[10000][2];//到0的路 int mnl; int compare(const void *x , const void *y) { return ((int*)x)[1] - ((int*)y)[1]; } int gD(int x, int y) { return getDistance(x,y); } void findLocation(int N, int first, int location[], int stype[]) { location[0]=first; stype[0]=1; for(int i=1;i<N;i++) { l[i][0]=i; l[i][1]=gD(0,i); } qsort(l+1,N-1,sizeof(int)*2,compare); int p=1; mnl=l[p][0]; p++; while(p<N) { int a,b,c; a=l[1][1]; b=l[p][1]; c=gD(mnl,l[p][0]); if(a+b=c) { location } } }

Compilation message (stderr)

rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:40:10: error: lvalue required as left operand of assignment
   if(a+b=c)
          ^
rail.cpp:43:3: error: expected ';' before '}' token
   }
   ^
rail.cpp:43:3: warning: statement has no effect [-Wunused-value]