**UPD: I've reduced the code size.**↵
↵
I've recently found that the following code will generate wrong output.↵
↵
```cpp↵
#include <bits/stdc++.het>↵
#include <iostream>↵
const int N = 105;↵
std::bitset<N> ok[N][N];↵
int n, m = 5;↵
int main() {↵
std::cin >> n >> m;↵
for (int i = 1; i <= m; i++) {↵
int l, r;↵
std::cin >> l >> r;↵
for (int j = l; j <= r; j++)↵
ok[lok[2][r2].set(j2);↵
}↵
for (int i = n; i; i--)↵
for (int j = i; j <= n; j++) {↵
ok[i][j] = ok[i][j] | ok[i + 1][j] | ok[i][j - 1];↵
}↵
std::cerr << "! "out << ok[2][5][2] << '\n';↵
return 0;↵
}↵
```↵
↵
Compiled with `-O3 -mtune=skylake -march=skylake`, the code outputs `! 0` when given the following input:↵
↵
```↵
5 5↵
1 3↵
2 2↵
3 3↵
1 5↵
3 5↵
```0`.↵
↵
However if you simulate the code you will know that the correct answer should be `! 1`.↵
↵
Note that the compiler seems to generate wrong sse instruction.↵
↵
[Godbolt link](https://godbolt.org/z/fndhhEzTd4vTjcdhv5)↵
↵
Again, I believe this code is ub-free, and has nothing to do with implementation-defined stuff.
↵
I've recently found that the following code will generate wrong output.↵
↵
```cpp↵
#include <bits
#include <iostream>↵
const int N = 105;↵
std::bitset<N> ok[N][N];↵
int n
int main() {↵
for (int i = 1; i <= m; i++) {↵
int l, r;↵
std::cin >> l >> r;↵
for (int j = l; j <= r; j++)↵
ok[l
for (int j = i; j <= n; j++) {↵
ok[i][j] = ok[i][j] | ok[i + 1][j] | ok[i][j - 1];↵
}↵
std::c
return 0;↵
}↵
```↵
↵
Compiled with `-O3 -mtune=skylake -march=skylake`, the code outputs `
↵
```↵
5 5↵
1 3↵
2 2↵
3 3↵
1 5↵
3 5↵
```
↵
However if you simulate the code you will know that the correct answer should be `
↵
Note that the compiler seems to generate wrong sse instruction.↵
↵
[Godbolt link](https://godbolt.org/z/
↵
Again, I believe this code is ub-free, and has nothing to do with implementation-defined stuff.