关于本题的数据问题
查看原帖
关于本题的数据问题
346383
q779楼主2021/10/10 19:25

本题的测试数据似乎是windows下造的

我下载了测试点1,然后用这个

#include <bits/stdc++.h>
using namespace std;
string str;
signed main()
{
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	freopen("P1486_1.in","r",stdin);
	freopen("test.out","w",stdout);
	while(getline(cin,str))
	{
		for(int i=0; i<str.size(); i++)
		{
			if(str[i]=='\r')cout << "\\r";
			else cout << str[i];
		}
		cout << endl;
	}
	return 0;
}

发现数据的确是windows下造的(有\r

希望可以在题面上标注一下本题数据问题

不然可能会有和我一样用getchar()的永远输出 00 然后WA (

我的提交记录

0分 link

100分 link

2021/10/10 19:25
加载中...