제출 #57138

#제출 시각아이디문제언어결과실행 시간메모리
57138kriiiTents (JOI18_tents)C++17
0 / 100
2 ms504 KiB
#include <stdio.h> const long long mod = 1000000007; long long d[3030][3030]; int main() { int N,M; scanf ("%d %d",&N,&M); for (int i=0;i<=N;i++) for (int j=0;j<=M;j++){ if (i == 0 || j == 0) d[i][j] = 1; else{ d[i][j] = (d[i-1][j] + d[i-1][j-1] * j * 4) % mod; if (i >= 2) d[i][j] = (d[i][j] + d[i-2][j-1] * (i - 1) * j) % mod; if (j >= 2) d[i][j] = (d[i][j] + d[i-1][j-2] * j * (j - 1) / 2) % mod; } } printf ("%lld\n",d[N][M]); return 0; }

컴파일 시 표준 에러 (stderr) 메시지

tents.cpp: In function 'int main()':
tents.cpp:8:17: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  int N,M; scanf ("%d %d",&N,&M);
           ~~~~~~^~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...