Problem snowball
User FreedomhawksBANANAA
Submission Time 2023-01-18 17:51:36
Score 0
Max Time N/A
Max Memory N/A

Compile Error

snowball.cpp: In function ‘int main()’:
snowball.cpp:5:13: error: expected ‘;’ before ‘int’
5 | cin.tie(0)
| ^
| ;
6 | int N,D(0),counter(0);
| ~~~
snowball.cpp:7:8: error: ‘N’ was not declared in this scope
7 | cin >> N >> D;
| ^
snowball.cpp:7:13: error: ‘D’ was not declared in this scope
7 | cin >> N >> D;
| ^
snowball.cpp:10:12: error: ‘arr’ was not declared in this scope
10 | cin >> arr[x];
| ^~~
snowball.cpp:12:6: error: ‘arr’ was not declared in this scope
12 | sort(arr,arr+N);
| ^~~
snowball.cpp:15:1: error: ‘counter’ was not declared in this scope
15 | counter = counter+(arr[a]*arr[a]);
| ^~~~~~~
snowball.cpp:17:9: error: ‘counter’ was not declared in this scope
17 | cout << counter;
| ^~~~~~~