Problem | GSS |
---|---|
User | ryansoh |
Submission Time | 2023-07-25 09:32:52 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
GSS.cpp: In function ‘int main()’:
GSS.cpp:7:19: error: found ‘:’ in nested-name-specifier, expected ‘::’
7 | for (int i=0; i<n: i++) cin>>arr[i];
| ^
| ::
GSS.cpp:7:18: error: ‘n’ is not a class, namespace, or enumeration
7 | for (int i=0; i<n: i++) cin>>arr[i];
| ^
GSS.cpp:8:6: error: could not convert ‘std::sort<int*, std::greater<int> >(((int*)(& arr)), (((int*)(& arr)) + ((sizetype)(((long unsigned int)n) * 4))), (std::greater<int>{std::binary_function<int, int, bool>()}, std::greater<int>()))’ from ‘void’ to ‘bool’
8 | sort(arr,arr+n,greater<int>());
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| void
GSS.cpp:9:2: error: expected primary-expression before ‘int’
9 | int sum=0;
| ^~~
GSS.cpp:8:33: error: expected ‘)’ before ‘int’
8 | sort(arr,arr+n,greater&