Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有使用 cin/in 太慢的数据。每行有三个整数:
1 2 2 3 4 1 5 6 122 6 4 7
如何读入循环中的每一行,以获得结果(对于第一次迭代):
x==1; y==2; z==2; etc.
?
如何使用 cstdio::scanf 来做到这一点?
用这个:
while(scanf("%d %d %d", &a, &b, &c) != EOF) { ... do stuff ... }