How is my soln wrong for this problem ,ADAROOKS2 MAY LONG CHALLENGE

my code:
https://www.codechef.com/viewsolution/24257412

#include <bits/stdc++.h>

#define ll long long

using namespace std;

int main() {

ll int t;

cin>>t;

while(t–){

int n;

cin>>n;

int cnt=0;

for(int i=0;i<n;i++){

int k=i;

int j=i;

while(k–){

cout<<“.”;

}

int x=0;

bool f=1;

while(j<n){

for(int p=0;p<x;p++){

cout<<“.”;

j++;

if(j>=n){

break;

}

}

/*

if(f){

cout<<“O”;

cnt++;

j++;

}*/

f=0;

if(j>=n){

break;

}

cout<<“O”;

cnt++;

j++;

x++;

}

cout<<endl;

}

//cout<<cnt<<endl;

}

}

1 Like

please try run my code to see my approach soln i cant understand why wont my soln be accepted
my approach is simple just print an arithmetic progression of dots with an O between each dotted term and watch for urself the pattern doesnt contain any rectangle and moreover am abe to fit in about 100N O’s in that NxN matrix given to us
https://www.codechef.com/viewsolution/24257412