// No.481 1から10 // https://yukicoder.me/problems/no/481 // #include #include #include #include using namespace std; int solve(vector &written); int main() { const int WRITTEN_NUMBER = 9; vector written(WRITTEN_NUMBER); for (auto i = 0; i < WRITTEN_NUMBER; i++) cin >> written[i]; int ans = solve(written); cout << ans << endl; } int solve(vector &written) { vector e = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; vector res; sort(written.begin(), written.end()); set_difference(e.begin(), e.end(), written.begin(), written.end(), inserter(res, res.end())); // e - writtenの差集合を求める return res[0]; }