Submission #370322

# Submission time Handle Problem Language Result Execution time Memory
370322 2021-02-23T18:53:38 Z nicolaalexandra Red-blue table (IZhO19_stones) C++14
0 / 100
49 ms 1388 KB
#include <bits/stdc++.h>

using namespace std;

int t,n,m,i,j;

int main (){

    //ifstream cin ("date.in");
    //ofstream cout ("date.out");
    
    cin>>t;
    for (;t--;){
        cin>>n>>m;
        if (n + (m-1)/2 > m + (n-1)/2){
            cout<<n + (m-1)/2<<"\n";
            for (i=1;i<=n;i++,cout<<"\n")
                for (j=1;j<=m;j++){
                    if (j <= (m+1)/2)
                        cout<<"+";
                    else cout<<"-";
                }

        } else {
            cout<<m + (n-1)/2<<"\n";
            for (i=1;i<=n;i++,cout<<"\n")
                for (j=1;j<=m;j++){
                    if (i <= (n+1)/2)
                        cout<<"-";
                    else cout<<"+";
                }
        }
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Incorrect 1 ms 364 KB in the table A+B is not equal to 4
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 364 KB in the table A+B is not equal to 20
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Incorrect 1 ms 364 KB in the table A+B is not equal to 4
# Verdict Execution time Memory Grader output
1 Incorrect 43 ms 1388 KB Wrong answer in test 97 21: 107 < 116
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 49 ms 1388 KB in the table A+B is not equal to 35
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Incorrect 1 ms 364 KB in the table A+B is not equal to 4