现在的位置: 首页 > 综合 > 正文

1603: [Usaco2008 Oct]打谷机

2018年01月13日 ⁄ 综合 ⁄ 共 318字 ⁄ 字号 评论关闭
#include<iostream>
#include<cstdio>
using namespace std;
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*10+ch-'0';ch=getchar();}
    return x*f;
}
int n,x,ans;
int main(){
	n=read();
	for(int i=1;i<n;i++){
		x=read();x=read();
		ans^=read();
	}
	printf("%d",ans);
	return 0;
}

抱歉!评论已关闭.