QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#528132 | #9158. 分数 | sumi007# | Compile Error | / | / | C++14 | 476b | 2024-08-23 10:06:38 | 2024-08-23 10:06:39 |
Judging History
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