# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
683693 | Temkabat | Red-blue table (IZhO19_stones) | C++14 | 54 ms | 1292 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
using namespace std;
int main() {
int T;
cin>>T;
for (int i = 0; i < T; i++){
int N, M;
bool rotated=false;
cin>>N>>M;
char table[N][M];
if(N>M){
int t;
t=N;
N=M;
M=t;
rotated=true;
}
int a=M/2+1, b;
int c=N/2;
int d=N%2;
if(N==1 and M==1){
cout<<"1\n+\n";
}else{
b=min( N, (c - !(d)) * M / a );
cout<<M+b<<"\n";
for(int k=0;k<N;k++){
for(int l=0;l<M;l++){
if(rotated==true){
table[k][l]='+';
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |