QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#528132#9158. 分数sumi007#Compile Error//C++14476b2024-08-23 10:06:382024-08-23 10:06:39

Judging History

你现在查看的是最新测评结果

  • [2024-08-23 10:06:39]
  • 评测
  • [2024-08-23 10:06:38]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 5e6+1;
int n,m;
int f(int i,int j){
    if(i==0 && j==1) return 1; 
    if(i>j) swap(i,j);
    if((j/i)%2 == 0) return f(j%(2*i),i);
    return 0;
}
void dfs(int i,int j){
    if((i>n || j>m) && (i>m || j>n)) return ;
    ans += (!(i>n || j>m))+(!(i>m || j>n));
    dfs(i,j+2*i),dfs(j,i+2*j);
}
int main(){
    cin >> n >> m;
    dfs(1,2);
    cout << ans;
    return 0;
}

Details

answer.code: In function ‘void dfs(int, int)’:
answer.code:14:5: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
   14 |     ans += (!(i>n || j>m))+(!(i>m || j>n));
      |     ^~~
      |     abs
answer.code: In function ‘int main()’:
answer.code:20:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
   20 |     cout << ans;
      |             ^~~
      |             abs