Borderou de evaluare (job #1017671)
Utilizator | Data | 28 octombrie 2013 08:43:04 | |
---|---|---|---|
Problema | Geometrie | Status | done |
Runda | Arhiva de probleme | Compilator | cpp | Vezi sursa |
Scor | 0 |
Raport evaluator
Eroare de compilare:
user.cpp:5:22: error: template argument 1 is invalid
#define pii pair<,int>
^
user.cpp:16:1: note: in expansion of macro ‘pii’
pii v[nmax];
^
user.cpp:16:12: error: invalid type in declaration before ‘;’ token
pii v[nmax];
^
user.cpp: In function ‘void readData()’:
user.cpp:7:11: error: request for member ‘first’ in ‘v[i]’, which is of non-class type ‘int’
#define x first
^
user.cpp:23:29: note: in expansion of macro ‘x’
scanf("%d %d",&v[i].x,&v[i].y);
^
user.cpp:8:11: error: request for member ‘second’ in ‘v[i]’, which is of non-class type ‘int’
#define y second
^
user.cpp:23:37: note: in expansion of macro ‘y’
scanf("%d %d",&v[i].x,&v[i].y);
^
user.cpp: At global scope:
user.cpp:5:22: error: template argument 1 is invalid
#define pii pair<,int>
^
user.cpp:27:20: note: in expansion of macro ‘pii’
inline double dist(pii a,pii b) {
^
user.cpp:5:22: error: template argument 1 is invalid
#define pii pair<,int>
^
user.cpp:27:26: note: in expansion of macro ‘pii’
inline double dist(pii a,pii b) {
^
user.cpp: In function ‘double dist(int, int)’:
user.cpp:7:11: error: request for member ‘first’ in ‘a’, which is of non-class type ‘int’
#define x first
^
user.cpp:28:24: note: in expansion of macro ‘x’
return sqrt(1ll*(a.x - b.x)*(a.x - b.x) + 1ll*(a.y - b.y)*(a.y - b.y));
^
user.cpp:7:11: error: request for member ‘first’ in ‘b’, which is of non-class type ‘int’
#define x first
^
user.cpp:28:30: note: in expansion of macro ‘x’
return sqrt(1ll*(a.x - b.x)*(a.x - b.x) + 1ll*(a.y - b.y)*(a.y - b.y));
^
user.cpp:7:11: error: request for member ‘first’ in ‘a’, which is of non-class type ‘int’
#define x first
Ceva nu functioneaza?
- Citeste despre borderoul de evaluare.
- Daca tot nu e bine, contacteaza-ne pe forum !