poj3425
简单题
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
#define maxn 10005
bool quest[1000006];
int n, ans;
int main()
{
//freopen("t.txt", "r", stdin);
scanf("%d", &n);
memset(quest, 0, sizeof(quest));
ans = 0;
for (int i = 0; i < n; i++)
{
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (quest[a] && b)
ans += 10;
if (c && b)
ans += 40;
else if(b)
ans += 20;
else
ans += 10;
if (b)
quest[a] = true;
}
printf("%d\n", ans);
return 0;
}