Borderou de evaluare (job #611112)
| Utilizator |
|
IP | ascuns |
|---|---|---|---|
| Problemă | Tombola (baraj gimnaziu) | Compilator | cpp-32 |
| Rundă | Arhiva de probleme | Status | evaluat |
| Dată | 19 oct. 2021 14:18:17 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp:1:21: warning: extra tokens at end of #include directive
1 | #include <iostream> #include <cmath> using namespace std; struct Punct{ int x,y; }; void Citire(Punct & P) { cin >> P.x >> P.y; } int pDistanta(Punct P) { return P.x * P.x + P.y * P.y; } int main() { int n , cnt , pMax = -1; // vom calcula patratul distantelor, nu distantele Punct A; cin >> n; for(int i = 1 ; i <= n ; i ++) { Citire(A); int pd = pDistanta(A); if(pd > pMax) pMax = pd, cnt = 1; else if(pd == pMax) cnt ++; } cout << sqrt(pMax) << " " << cnt; }
| ^
/usr/lib/gcc/i686-pc-linux-gnu/10.3.0/../../../../i686-pc-linux-gnu/bin/ld: /usr/lib/gcc/i686-pc-linux-gnu/10.3.0/../../../../lib/crt1.o: in function `_start':
(.text+0x28): undefined reference to `main'
collect2: error: ld returned 1 exit status