请求灌水区大神帮帮我的代码
  • 板块灌水区
  • 楼主liuyanchen123
  • 当前回复0
  • 已保存回复0
  • 发布时间2024/4/13 21:07
  • 上次更新2024/4/13 22:42:19
查看原帖
请求灌水区大神帮帮我的代码
1133103
liuyanchen123楼主2024/4/13 21:07

U415765 デスノート 死亡 笔记

测试点改之前全对 改之后就不行了 测试点没问题

#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;
}
2024/4/13 21:07
加载中...