# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
887800 | vjudge1 | Tents (JOI18_tents) | C++14 | 52 ms | 70732 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// Parsa Jokar 2023 https://github.com/phictus/ioi
#pragma GCC optimize("Ofast")
#include <iostream>
#include <cstdint>
using namespace std;
constexpr int64_t maxn = 3000, mod = 1000000007;
int64_t n, m, dp[maxn + 1][maxn + 1];
int main()
{
ios_base::sync_with_stdio(false);
cin >> n >> m;
for (int64_t i = 0; i <= n; i++)
dp[i][0] = 1;
for (int64_t j = 0; j <= m; j++)
dp[0][j] = 1;
for (int64_t i = 1; i <= n; i++)
dp[i][1] = 1 + 4 * i + (i * (i - 1)) / 2;
for (int64_t j = 1; j <= m; j++)
dp[1][j] = 1 + 4 * j + (j * (j - 1)) / 2;
for (int64_t i = 2; i <= n; i++)
{
for (int64_t j = 2; j <= m; j++)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |