42pts 求调
查看原帖
42pts 求调
1646989
sunqiwen楼主2025/8/30 18:36

报错信息Wrong Answer.wrong output format Unexpected end of file - int32 expected

代码:

#include <bits/stdc++.h>
#define maxn 10010
using namespace std;

int n, r, u[maxn], v[maxn], ans[maxn];
int main() {
	cin >> n;
	r = n * (n - 1) / 2;
	for (int i = 1; i <= r; i++) {
		cin >> u[i] >> v[i];
		if (u[i] < v[i]) {
			swap(u[i], v[i]);
		}
		printf("%d\n", u[i] == ++ans[u[i]]);
	}
	return 0;
}

2025/8/30 18:36
加载中...