답안 #980501

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
980501 2024-05-12T08:04:13 Z fcmalkcin 육각형 영역 (APIO21_hexagon) C++17
0 / 100
0 ms 408 KB
#include <bits/stdc++.h>
using namespace std;
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define nl "\n"
#define ll long long
const int maxn = 2e5+5;

int draw_territory(int N, int A, int B, vector<int> D, vector<int> L){
    ll mod = 1e9+7;
    int ans;
    if(N==3){
        ll length = L[0];
        ans = ((((length*(length-1)*(length+1)/3)*B)%mod) + (length*A)%mod) % mod;
    }
    else{
        ll totalsq = 4000*4000;
        ll dx[6] = {0, 1, 1, 0, -1, -1};
        ll dy[6] = {2, 1 ,-1, -2, -1, 1};
    }
    return ans;
}

Compilation message

hexagon.cpp: In function 'int draw_territory(int, int, int, std::vector<int>, std::vector<int>)':
hexagon.cpp:16:12: warning: unused variable 'totalsq' [-Wunused-variable]
   16 |         ll totalsq = 4000*4000;
      |            ^~~~~~~
hexagon.cpp:17:12: warning: unused variable 'dx' [-Wunused-variable]
   17 |         ll dx[6] = {0, 1, 1, 0, -1, -1};
      |            ^~
hexagon.cpp:18:12: warning: unused variable 'dy' [-Wunused-variable]
   18 |         ll dy[6] = {2, 1 ,-1, -2, -1, 1};
      |            ^~
hexagon.cpp:20:12: warning: 'ans' may be used uninitialized in this function [-Wmaybe-uninitialized]
   20 |     return ans;
      |            ^~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 408 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -