一直认为cin比scanf慢,即使加上了ios::sync_with__stdio(false);也不如scanf。
cin
scanf
ios::sync_with__stdio(false);
但是刚刚在 U129172 测试出的结果却是关闭了同步流之后的cin比scanf优的多,甚至和快读差不多。
那以后是否能用cin代替scanf?