#include <fstream>
using namespace std;
ifstream cin("a.in");
ofstream cout("a.out");
signed main()
{
ios_base::sync_with_stdio(false);
int n;
unsigned ans = 0, x;
cin >> n;
for (int i = 0; i < n; i++)
{
cin >> x;
ans ^= x;
cout << x << " ";
}
return 0;
}速度和重定向的 cin/cout 几乎一样。
考场上想不起来是先 freopen 还是先关同步就这么写!
为什么这里能直接写 cin 而不会重名呢?因为我没有用万能头,这就是不用万能头带给我骄傲的资本。