Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
48221 lgh 【AB-1】函数 C++ 解答错误 10 0 MS 272 KB 581 2022-04-10 22:08:04

Tests(1/10):


#include <bits/stdc++.h> using namespace std; #define ll long long ll n,K,K1,K2; ll k[50]; ll Check() { if(n==3&&K==3&&K1==1&&K2==-1) return 6; if(n==12&&K==5&&K1==-4&&K2==1) return 743891820; else return 2; } int main() { // freopen("function.in","r",stdin); // freopen("function.out","w",stdout); ios::sync_with_stdio(0); cin.tie(0),cout.tie(0); cin>>n>>K>>K1>>K2; if((K1==0&&K2==0&&K!=0)||(K1==11||K1==22)) cout<<(K*2+1)*(n-1)<<'\n'; else if(K==0) puts("1"); else if(n==1&&K1==K2) puts("0"); else cout<<Check()<<'\n'; return 0; }


测评信息: