답안 #198865

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
198865 2020-01-27T22:42:15 Z imaxblue Jump (BOI06_jump) C++17
컴파일 오류
0 ms 0 KB
  fox(l, n){
    fox(l2, n){
      fox(l3, 5){
        dp[l][l2][l3+1] += dp[l][l2][l3]/1000000000;
        dp[l][l2][l3+1] %= 1000000000;
      }
      if (l==n-1 && l2==n-1) break;
      scanf("%i", &a[l][l2]);
      fox(l3, 5){
        if (l+a[l][l2]<n) dp[l+a[l][l2]][l2][l3] += dp[l][l2][l3];
        if (l2+a[l][l2]<n) dp[l][l2+a[l][l2]][l3] += dp[l][l2][l3];
      }
      //cout << dp[l][l2] << ' ';
    }
    //cout << endl;
  }
  foxr(l, 5){
    if (dp[n-1][n-1][l]==0 && l!=0) continue;
    cout << dp[n-1][n-1][l];
  }
  return 0;
}
/*
4
2 3 3 1
1 2 1 3
1 2 3 1
3 1 1 0
*/

Compilation message

jump.cpp:2:6: error: expected constructor, destructor, or type conversion before '(' token
   fox(l, n){
      ^
jump.cpp:18:7: error: expected constructor, destructor, or type conversion before '(' token
   foxr(l, 5){
       ^
jump.cpp:22:3: error: expected unqualified-id before 'return'
   return 0;
   ^~~~~~
jump.cpp:23:1: error: expected declaration before '}' token
 }
 ^