| 记录编号 | 590658 | 评测结果 | AAAAAAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 187.[USACO Oct08] 轮子的旋转 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | C++ | 运行时间 | 0.034 s | ||
| 提交时间 | 2024-07-10 16:38:53 | 内存使用 | 3.32 MiB | ||
#include<bits/stdc++.h>
using namespace std;
bool a[1010]={0};
int main()
{
    freopen("rotation.in","r",stdin);
    freopen("rotation.out","w",stdout);
    int n,s,d,c,i;
    bool ans;
    cin>>n;
    ans=0;
    for(i=1;i<=n-1;i++)
    {
        cin>>s>>d>>c;
        a[s]=c;
    }
    for(i=1;i<=n-1;i++)
    {
        if(a[i]==true)
        {
            ans=!ans;
        }
    }
    cout<<ans;
    return 0;
}