QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#528131#9158. 分数sumi007#Compile Error//C++14466b2024-08-23 10:06:092024-08-23 10:06:10

Judging History

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

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

answer

#include <bits/stdc++.h>
using namespace std;
#define ll long long
const int N = 2e6+1;
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:12:11: error: ‘n’ was not declared in this scope
   12 |     if((i>n || j>m) && (i>m || j>n)) return ;
      |           ^
answer.code:12:18: error: ‘m’ was not declared in this scope
   12 |     if((i>n || j>m) && (i>m || j>n)) return ;
      |                  ^
answer.code:13:5: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
   13 |     ans += (!(i>n || j>m))+(!(i>m || j>n));
      |     ^~~
      |     abs
answer.code:13:17: error: ‘n’ was not declared in this scope
   13 |     ans += (!(i>n || j>m))+(!(i>m || j>n));
      |                 ^
answer.code:13:24: error: ‘m’ was not declared in this scope
   13 |     ans += (!(i>n || j>m))+(!(i>m || j>n));
      |                        ^
answer.code: In function ‘int main()’:
answer.code:17:12: error: ‘n’ was not declared in this scope
   17 |     cin >> n >> m;
      |            ^
answer.code:17:17: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
   17 |     cin >> n >> m;
      |                 ^
      |                 tm
answer.code:19:13: error: ‘ans’ was not declared in this scope; did you mean ‘abs’?
   19 |     cout << ans;
      |             ^~~
      |             abs