cake.cpp:2:5: error: extended character is not valid in an identifier
2 |
| ^
cake.cpp:2:5: error: '\U000000a0' does not name a type
2 |
| ^
cake.cpp:4:13: error: 'pair' does not name a type
4 | typedef pair<int,int> pii;
| ^~~~
cake.cpp:6:5: error: 'set' does not name a type; did you mean 'setns'?
6 | set<pii> s;
| ^~~
| setns
cake.cpp: In function 'int main()':
cake.cpp:30:9: error: 'ios_base' has not been declared
30 | ios_base::sync_with_stdio(false);
| ^~~~~~~~
cake.cpp:31:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
31 | cin.tie(0);
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:75,
from cake.cpp:1:
/usr/include/c++/10/iostream:60:18: note: 'std::cin' declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
cake.cpp:36:13: error: 's' was not declared in this scope
36 | s.insert({d[i],i});
| ^
cake.cpp:49:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
49 | cout<<where[poz]-1<<'\n';
| ^~~~
| std::cout
In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:75,
from cake.cpp:1:
/usr/include/c++/10/iostream:61:18: note: 'std::cout' declared here
61 | extern ostream cout; /// Linked to standard output
| ^~~~
cake.cpp:56:17: error: 'vector' was not declared in this scope
56 | vector<int> mypoz;
| ^~~~~~
cake.cpp:56:17: note: suggested alternatives:
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from cake.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector'
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
In file included from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:65,
from cake.cpp:1:
/usr/include/c++/10/vector:86:13: note: 'std::pmr::vector'
86 | using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
| ^~~~~~
cake.cpp:56:24: error: expected primary-expression before 'int'
56 | vector<int> mypoz;
| ^~~
cake.cpp:57:30: error: 's' was not declared in this scope
57 | auto it=prev(s.end());
| ^
cake.cpp:57:25: error: 'prev' was not declared in this scope; did you mean 'std::prev'?
57 | auto it=prev(s.end());
| ^~~~
| std::prev
In file included from /usr/include/c++/10/bits/stl_algobase.h:66,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from cake.cpp:1:
/usr/include/c++/10/bits/stl_iterator_base_funcs.h:224:5: note: 'std::prev' declared here
224 | prev(_BidirectionalIterator __x, typename
| ^~~~
cake.cpp:65:21: error: 'mypoz' was not declared in this scope; did you mean 'poz'?
65 | mypoz.push_back(p);
| ^~~~~
| poz
cake.cpp:73:28: error: 'mypoz' was not declared in this scope; did you mean 'poz'?
73 | for(auto i:mypoz)
| ^~~~~
| poz
cake.cpp:55:21: warning: unused variable 'old' [-Wunused-variable]
55 | int old=d[poz];
| ^~~