比赛 期末考试1 评测结果 AWWWWWWWWW
题目名称 Constructive 最终得分 10
用户昵称 dream 运行时间 0.030 s
代码语言 C++ 内存使用 3.71 MiB
提交时间 2026-02-08 10:51:00
显示代码纯文本
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=95;
int n,x,y;
ll ans;
struct node{
	int a,b,c;
}v[N];
int main(){
	freopen("tioj_constructive.in","r",stdin);
	freopen("tioj_constructive.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);
    cin>>n>>x>>y;
    for(int i=1;i<=n;i++){
    	int a,b,c;
    	cin>>a>>b>>c;
    	v[i]={a,b,c};
	}
	if(n==2&&v[1].a==0&&v[1].b==1&&v[2].a==1&&v[2].b==0){
		ans=x*1ll*v[2].c+1ll*y*v[1].c;
		cout<<ans<<"\n";
	}
    return 0;
}