先读前面的string和数,这是每一行都会有的两次 string s; int val; cin >> s >> val; while(cin.get() != '\n') { int next; cin >> next; // operation... }
1 1
牛客网
牛客企业服务