답안 #493334

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
493334 2021-12-11T06:08:14 Z irmuun Chessboard (IZhO18_chessboard) C++17
8 / 100
69 ms 3836 KB
#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define PI 3.14159265359
ll n,m,t,p,h,a,b,c,d,e,f,i,j,k,mod=1000000007,mod1=998244353,MAX=1e18,X1[100001],X2[100001],Y1[100001],Y2[100001],ans;
string s,u;
ll df[101];
vector<pair<ll,ll> >v;
vector<ll>dv[101];
void dfs(ll x){
    df[x]=1;
    for(ll i=0;i<dv[x].size();i++){
        if(df[dv[x][i]]==0){
            dfs(dv[x][i]);
        }
    }
}
ll fastPow(ll a,ll b){
    ll d=1;
    while(b>0){
        if(b%2==1){
            d=d*a%mod;
        }
        b/=2;
        a=a*a%mod;
    }
    return d;
}
int main(){
	cin>>n>>k;
	for(i=1;i<=k;i++){
		cin>>X1[i]>>Y1[i]>>X2[i]>>Y2[i];
	}
	if(k==0){
		ans=n*n/2;
		for(i=1;i<n;i++){
			if(n%i==0&&n/i%2==1){
				d=n*n-(i*i);
				ans=min(ans,d/2);
			}
		}
		cout<<ans;
	}
}

Compilation message

chessboard.cpp: In function 'void dfs(long long int)':
chessboard.cpp:15:17: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   15 |     for(ll i=0;i<dv[x].size();i++){
      |                ~^~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Incorrect 69 ms 3836 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 69 ms 3836 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Incorrect 69 ms 3836 KB Output isn't correct
10 Halted 0 ms 0 KB -