Problem | xmas |
---|---|
User | PrunJuice |
Submission Time | 2023-11-05 21:03:43 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
xmas.cpp: In function ‘int main()’:
xmas.cpp:8:31: error: conflicting declaration ‘std::vector<std::pair<int, int> > arr’
8 | std::vector <pair<int, int>> arr;
| ^~~
xmas.cpp:7:17: note: previous declaration as ‘std::pair<int, int> arr [n]’
7 | pair<int, int> arr[n];
| ^~~
xmas.cpp:12:16: error: expected ‘;’ before ‘}’ token
12 | arr[i]=({x, i});
| ^
| ;
xmas.cpp:12:17: error: no match for ‘operator=’ (operand types are ‘std::pair<int, int>’ and ‘int’)
12 | arr[i]=({x, i});
| ^
In file included from /usr/include/c++/9/bits/stl_algobase.h:64,
from /usr/include/c++/9/bits/specfun.h:45,
from /usr/include/c++/9/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:41,
from xma