#include<bits/stdc++.h>
#define int long long
#define pii pair<int,int>
#define x first
#define y second
#define rep1(i,l,r) for(int i=l;i<=r;i++)
#define rep2(i,l,r) for(int i=l;i>=r;i--)
const int N=1e5+10;
using namespace std;
pii x;
inline int read()
{
int x=0,f=1;
char ch=getchar();
while(ch<'0'||ch>'9')
{
if(ch=='-') f=-1;
ch=getchar();
}
while(ch>='0'&&ch<='9')
{
x=(x<<1)+(x<<3)+(ch^48);
ch=getchar();
}
return f*x;
}
signed main()
{
x=make_pair(read(),read());
cout<<x.x<<' '<<x.y<<endl;
return 0;
}
以上代码输入
1 2
输出按理来讲应为
1 2
但实际上却是
2 1
改为 cin 或 scanf 就可以避免此类问题,所以为什么会导致此类情况,因为这个问题我的树剖调了半天,非常不解,望dalao指点指点qwq。