QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#209107#5271. Focusing on Costsucup-team1004WA 0ms3504kbC++14973b2023-10-10 10:12:362023-10-10 10:12:37

Judging History

This is the latest submission verdict.

  • [2023-10-10 10:12:37]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3504kb
  • [2023-10-10 10:12:36]
  • Submitted

answer

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
template<typename T>
ostream& operator << (ostream &out,const vector<T>&x){
	if(x.empty())return out<<"[]";
	out<<'['<<x[0];
	for(int len=x.size(),i=1;i<len;i++)out<<','<<x[i];
	return out<<']';
}
template<typename T>
vector<T> ary(const T *a,int l,int r){
	return vector<T>{a+l,a+1+r};
}
template<typename T>
void debug(T x){
	cerr<<x<<'\n';
}
template<typename T,typename ...S>
void debug(T x,S ...y){
	cerr<<x<<' ',debug(y...);
}
int a,b;
vector<string>ans;
void dfs(int a,int b){
	int g=__gcd(a,b);
	a/=g,b/=g;
	if(a==1&&b==1){
		return ans.push_back("cos");
	}
	if(a>b){
		dfs(a-b,b);
		ans.push_back("atan");
		ans.push_back("cos");
		ans.push_back("atan");
		ans.push_back("cos");
		ans.push_back("asin");
		ans.push_back("tan");
	}else{
		dfs(a,b-a);
		ans.push_back("atan");
		ans.push_back("sin");
	}
}
int main(){
	cin>>a>>b;
	dfs(a,b);
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3504kb

input:

1 1

output:


result:

wrong output format Unexpected end of file - int32 expected