Submission #501368

# Submission time Handle Problem Language Result Execution time Memory
501368 2022-01-03T00:32:52 Z DragonO_o Red-blue table (IZhO19_stones) C++14
0 / 100
1 ms 448 KB
#include <bits/stdc++.h>

using namespace std;

#define x first
#define y second
#define pb push_back
#define all(a) a.begin(),a.end()
#define int long long

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int,int>pi;
typedef pair<ll,ll>pll;
typedef vector<ll>vll;
typedef vector<int>vi;
typedef vector<bool>vb;
typedef vector<vi>vvi;
typedef vector<vll>vvll;
typedef vector<pi>vpi;
typedef vector<pll>vpll;

const int N=1e3+99;

char a[N][N];

signed main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int tt;
    cin>>tt;
    while(tt--){
        int n,m;
        cin>>n>>m;
        for(int i=1;i<=n;++i){
            for(int j=1;j<=m;++j){
                a[i][j]='*';
            }
        }
        cout<<max(n,m)+(min(n,m)-1)/2*max(n,m)/((max(n,m)+2)/2)<<"\n";
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Wrong answer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 332 KB Wrong answer
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Wrong answer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 332 KB Wrong answer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 448 KB Wrong answer
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Wrong answer
2 Halted 0 ms 0 KB -