做 P8472,开着 -Wall -Wextra,编译时出现了这样的警告:

警告的行数显示的是 main 函数定义的那一行,它的意思就是说 ansy2_lsm.116 和 ansy_lsm.114 可能在这个函数中使用但没有初始化。
但是我从来没有定义过 ansy2_lsm 和 ansy_lsm,只有 ansy1 和 ansy2,. 运算符也没有后加数字的用法;而且我的变量都是全局的,应该没有初始化的问题。
所以这是我的问题还是编译器的 bug?
代码:
#include <bits/stdc++.h>
#define gc IO::fastgc()
#define pc(c) IO::fastpc(c)
#define x1 _dn0pf902_AK_IOI_
#define y1 _Wind_Journey_AK_IOI_
#define size _konyakest_AK_IOI_
#define int long long
using namespace std;
namespace IO{
char ibuf[1<<23],obuf[1<<23],*ip1=ibuf,*ip2=ibuf,*o=obuf;
inline char fastgc(){
return ((ip1==ip2)&&(ip2=(ip1=ibuf)+fread(ibuf,1,1<<21,stdin),ip1==ip2)?EOF:*ip1++);
}
inline void fastpc(char c){
*(o++)=c;
}
inline int read(){
register int t=0,f=1;
register char c=gc;
while(c!='-'&&(c<'0'||c>'9')) c=gc;
if(c=='-') c=gc,f=-1;
while(c>='0'&&c<='9') t=10*t+(c^48),c=gc;
return f*t;
}
inline bool isspc(char c){
return c==' '||c=='\t'||c=='\r'||c=='\n'||c==0||c==EOF;
}
inline int reads(char *buf){
register int l=0;
register char c=gc;
while(isspc(c)) c=gc;
while(!isspc(c)) buf[l++]=c,c=gc;
buf[l]=0;
return l;
}
inline void write(int x){
if(!x) return (void)pc('0');
if(x<0) pc('-'),x=-x;
static char c[33]={""};
static int cc=0;
while(x) c[++cc]=x%10,x/=10;
while(cc) pc(c[cc--]|48);
}
inline void flush(){
fwrite(obuf,o-obuf,1,stdout);
}
struct IO_Flusher{
inline IO_Flusher(){}
inline ~IO_Flusher(){
flush();
}
}__io_flusher_;
}
using IO::read;
using IO::reads;
using IO::write;
constexpr int N=507;
int n,m,k,ans=0,ansx1=0,ansy1=0,ansx2=0,ansy2=0;
char a[N][N];
int bs[N][N],gs[N][N],ps[N][N];
inline int sum(int s[N][N],int x1,int y1,int x2,int y2){
return s[x2][y2]-s[x1-1][y2]-s[x2][y1-1]+s[x1-1][y1-1];
}
inline int size(int x1,int y1,int x2,int y2){
return (x2-x1+1)*(y2-y1+1);
}
inline int ok(int x1,int y1,int x2,int y2){
int cnt=size(x1,y1,x2,y2),
bcnt=sum(bs,x1,y1,x2,y2),
gcnt=sum(gs,x1,y1,x2,y2),
pcnt=sum(ps,x1,y1,x2,y2);
if(pcnt==cnt) return 1;
if(pcnt) return 0;
if(bcnt<=k) return 1;
if(gcnt<=k) return 1;
return 0;
}
inline void update(int top,int bottom){
int l,r,s=0;
int ansl,ansr;
l=r=1;
while(1){
if(ok(top,l,bottom,r)){
if(s<size(top,l,bottom,r)){
s=size(top,l,bottom,r);
ansl=l,ansr=r;
}
if(r<m) ++r;
else ++l;
}
else{
if(l<m&&l<r) ++l;
else ++r;
}
if(l==m&&r==m) break;
}
if(ok(top,l,bottom,r)){
if(s<size(top,l,bottom,r)){
s=size(top,l,bottom,r);
ansl=l,ansr=r;
}
}
if(ans<s){
ans=s;
ansx1=top,
ansy1=ansl,
ansx2=bottom,
ansy2=ansr;
}
}
inline void oper(){
if(sum(ps,ansx1,ansy1,ansx2,ansy2)){
return;
}
if(sum(bs,ansx1,ansy1,ansx2,ansy2)<=k){
for(int i=ansx1;i<=ansx2;++i){
for(int j=ansy1;j<=ansy2;++j){
a[i][j]='G';
}
}
return;
}
if(sum(gs,ansx1,ansy1,ansx2,ansy2)<=k){
for(int i=ansx1;i<=ansx2;++i){
for(int j=ansy1;j<=ansy2;++j){
a[i][j]='B';
}
}
return;
}
}
signed main(){
n=read(),m=read(),k=read();
for(int i=1;i<=n;++i){
reads(a[i]+1);
for(int j=1;j<=m;++j){
bs[i][j]=bs[i-1][j]+bs[i][j-1]-bs[i-1][j-1]+(a[i][j]=='B');
gs[i][j]=gs[i-1][j]+gs[i][j-1]-gs[i-1][j-1]+(a[i][j]=='G');
ps[i][j]=ps[i-1][j]+ps[i][j-1]-ps[i-1][j-1]+(a[i][j]=='P');
}
}
for(int i=1;i<=n;++i){
for(int j=i;j<=n;++j){
update(i,j);
}
}
write(ans),pc('\n');
oper();
for(int i=1;i<=n;++i){
for(int j=1;j<=m;++j){
pc(a[i][j]);
}
pc('\n');
}
return 0;
}