Submission #645631

# Submission time Handle Problem Language Result Execution time Memory
645631 2022-09-27T14:24:22 Z ElnuR_007 Chessboard (IZhO18_chessboard) C++14
0 / 100
1 ms 212 KB
#include<bits/stdc++.h>
using namespace std;
#define ll long long int
ll n,m,k,cnt;
void anomalous_solve()
{
	cin>>n>>k;
	if(k==0)
	{
		if(int(sqrt(n))*int(sqrt(n))==n)
		{
			cout<<(n/2)*int(sqrt(n))*int(sqrt(n));return;
		}
		if(n%3==0)
		{
			cout<<4*(n/3)*(n/3);
		}
		else
		{
			cout<<(n*n)/2;
		}
		return;
	}
	if(n==6 && k==8)
	{
		cout<<"14";return;
	}
	else
	{
		cout<<"8";return;
	}
}
int main()
{
	//	freopen("INPUT.txt","r",stdin);
	//  freopen("OUTPUT.txt","w",stdout);
	
	ios_base::sync_with_stdio();
    cin.tie(NULL);
    cout.tie(NULL);
    
    ll test=1;
    //cin>>test;
    for(int pos=1;pos<=test;pos++)
    	anomalous_solve();
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -