请求改代码!!!
  • 板块灌水区
  • 楼主liuyanchen123
  • 当前回复4
  • 已保存回复4
  • 发布时间2024/3/24 13:20
  • 上次更新2024/3/24 15:03:02
查看原帖
请求改代码!!!
1133103
liuyanchen123楼主2024/3/24 13:20
#include <bits/stdc++.h>
using namespace std;
int main() {
    int N;
    cin>>N;
    vector<vector<char>> city(N,vector<char>(N));
    int Lx,Ly,Xx,Xy,Yx,Yy;
    for (int i=0;i<N;++i) {
        for (int j=0;j<N;++j) {
            cin>>city[i][j];
            if(city[i][j]=='L'){
                Lx=i;
                Ly=j;
            } else if(city[i][j]=='X') {
                Xx=i;
                Xy=j;
            } else if(city[i][j]=='Y') {
                Yx=i;
                Yy=j;
            }
        }
    }
    if((Lx==Xx&&Ly==Xy)||(Lx==Yx&&Ly==Yy)){
        cout<<"基拉获胜"<<endl;
    } else {
        cout<<"L获胜"<<endl;
    }
    return 0;
}

对了一半qwq点击进入

U415765 デスノート 死亡 笔记

2024/3/24 13:20
加载中...