結果

問題 No.1771 A DELETEQ
ユーザー chocoruskchocorusk
提出日時 2021-12-19 17:17:55
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 86 ms / 3,500 ms
コード長 968 bytes
コンパイル時間 3,623 ms
コンパイル使用メモリ 187,248 KB
実行使用メモリ 134,392 KB
最終ジャッジ日時 2023-10-13 18:53:53
合計ジャッジ時間 21,906 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
134,392 KB
testcase_01 AC 19 ms
67,224 KB
testcase_02 AC 86 ms
67,088 KB
testcase_03 AC 20 ms
67,104 KB
testcase_04 AC 84 ms
67,108 KB
testcase_05 AC 78 ms
67,084 KB
testcase_06 AC 18 ms
67,140 KB
testcase_07 AC 18 ms
67,220 KB
testcase_08 AC 18 ms
67,100 KB
testcase_09 AC 28 ms
67,164 KB
testcase_10 AC 26 ms
67,332 KB
testcase_11 AC 25 ms
67,324 KB
testcase_12 AC 23 ms
67,160 KB
testcase_13 AC 25 ms
67,336 KB
testcase_14 AC 39 ms
67,260 KB
testcase_15 AC 47 ms
67,264 KB
testcase_16 AC 47 ms
67,268 KB
testcase_17 AC 20 ms
67,140 KB
testcase_18 AC 26 ms
67,160 KB
testcase_19 AC 18 ms
67,140 KB
testcase_20 AC 37 ms
67,204 KB
testcase_21 AC 20 ms
67,112 KB
testcase_22 AC 25 ms
67,148 KB
testcase_23 AC 27 ms
67,216 KB
testcase_24 AC 19 ms
67,140 KB
testcase_25 AC 18 ms
67,192 KB
testcase_26 AC 35 ms
67,140 KB
testcase_27 AC 23 ms
67,100 KB
testcase_28 AC 19 ms
67,280 KB
evil_hand_1.txt RE -
evil_hand_2.txt RE -
evil_hand_3.txt RE -
evil_random_1.txt RE -
evil_random_2.txt TLE -
evil_random_3.txt RE -
evil_random_4.txt RE -
evil_random_5.txt RE -
evil_random_6.txt RE -
evil_random_7.txt RE -
evil_random_8.txt RE -
evil_random_9.txt RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#include <utility>
#include <functional>
#include <time.h>
#include <stack>
#include <array>
#include <list>
#include <atcoder/all>
#define popcount __builtin_popcount
using namespace std;
using namespace atcoder;
typedef long long ll;
typedef pair<int, int> P;
using mint=modint998244353;
mint dp[4040][4040];
int main()
{
    int x, y;cin>>x>>y;
  dp[0][0]=1;
  for(int i=0; i<=x; i++){
    for(int j=0; j<=y; j++){
      dp[i+1][j]+=dp[i][j];
      dp[i][j+1]+=dp[i][j];
      dp[i+1][j+1]+=2*dp[i][j];
    }
  }
  mint ans=0;
  for(int i=0; i<=min(x,y);i++){
    ans+=dp[x-i][y-i];
  }
  cout<<ans.val()<<endl;
    return 0;
}
0