Why WA?
查看原帖
Why WA?
560112
__Alexander__楼主2024/7/26 16:51

rt

#include <bits/stdc++.h>
using namespace std;
int main(){
    int t;
    cin>>t;
    while (t--){
        int n,m;
        cin>>n>>m;
        int a[n+1],b[m+1];
        for (int i=1;i<=n;i++) cin>>a[i];
        for (int i=1;i<=m;i++) cin>>b[i];
        int t1=1,t2=1;
        while (t1<=n and t2<m){
            if (a[t1]>=b[t2]) t2++;
            else t1++;
        }
        if (t1>n){
            cout<<"MechaGodzilla"<<endl;
        }
        else{
            cout<<"Godzilla"<<endl;
        }
    }
    return 0;
}
2024/7/26 16:51
加载中...