Problem lengthsort
User Cat
Submission Time 2025-03-05 16:40:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lengthsort.cpp:5:22: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
5 | pair<int,string> arr[n];
| ^
| yn
lengthsort.cpp: In function ‘int main()’:
lengthsort.cpp:9:16: error: ‘arr’ was not declared in this scope
9 | cin >> arr[i].first >> arr[i].second;
| ^~~
lengthsort.cpp:11:10: error: ‘arr’ was not declared in this scope
11 | sort(arr,arr+n);
| ^~~