Cod sursa(job #3254974)
| Utilizator | Data | 9 noiembrie 2024 10:55:35 | |
|---|---|---|---|
| Problema | Problema rucsacului | Scor | 0 |
| Compilator | cpp-64 | Status | done |
| Runda | Arhiva educationala | Marime | 0.95 kb |
#include <bits/stdc++.h>
using namespace std;
ifstream fin("test.in");
ofstream fout("test.out");
int main()
{
int n;
fin>>n;
for(int k=1;k<=n;k++)
{
int x,y,z;
fin>>y>>x>>z;
int nr=x/3;
int cont=1;
char a[1000][1000];
for(int i=1;i<=x;i=i+4){
for(int j=1;j<=y;j+=2){
a[i][j] = 'x';
a[i][j+1] = '.';
}
}
// cout<<cont<<" ";
// if(cont-1 != z){
// for(int j=(y/3*3)+1;j<=y;j++){
// for(int i=1;i<=(x/3)*3;i++){
// a[i][j] = cont;
// if(i%3==0)
// cont++;
// }
// }
// }
for(int i=1;i<=x;i++){
for(int j=1;j<=y;j++){
fout<<a[i][j];
}
fout<<endl;
}
fout<<endl;
}
return 0;
}
