Submission #974153

# Submission time Handle Problem Language Result Execution time Memory
974153 2024-05-03T02:10:46 Z vjudge1 Hexagonal Territory (APIO21_hexagon) C++17
0 / 100
1 ms 600 KB
#include <bits/stdc++.h>
using namespace std;
//#define int long long
#define fastio ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define nl "\n"

const int maxn = 2e5+5;

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

}*/

Compilation message

hexagon.cpp: In function 'int draw_territory(int, int, int, std::vector<int>, std::vector<int>)':
hexagon.cpp:17:13: warning: unused variable 'totalsq' [-Wunused-variable]
   17 |         int totalsq = 4000*4000;
      |             ^~~~~~~
hexagon.cpp:18:13: warning: unused variable 'dx' [-Wunused-variable]
   18 |         int dx[6] = {0, 1, 1, 0, -1, -1};
      |             ^~
hexagon.cpp:19:13: warning: unused variable 'dy' [-Wunused-variable]
   19 |         int dy[6] = {2, 1 ,-1, -2, -1, 1};
      |             ^~
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 432 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 600 KB Output isn't correct
2 Halted 0 ms 0 KB -