alternating.cpp: In function 'int main()':
alternating.cpp:17:2: error: 'sort' was not declared in this scope; did you mean 'short'?
17 | sort(a, a + m);
| ^~~~
| short
alternating.cpp:15:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
15 | scanf("%d%d", &n, &m);
| ~~~~~^~~~~~~~~~~~~~~~
alternating.cpp:16:35: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
16 | for (int i = 0; i < m; ++i) scanf("%d%d", &a[i].first.first, &a[i].first.second);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~