UVA 10450 - World Cup Noise UVA • Sep 1, 2020 Problem PDFSolution:/************************************* ******** Team : BUBT_HIDDEN ********** ************************************** *********** Shipu Ahamed ************* *************************************/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ll long long #define sc scanf #define pf printf #define pi 2*acos(0.0) #define ft first #define se second #define r(input) freopen("input.txt","r",stdin) #define w(output) freopen("output.txt","w",stdout) #define maxall(v) *max_element(v.begin(),v.end()) #define minall(v) *min_element(v.begin(),v.end()) #define Sort(v) sort(v.begin(),v.end()) #define un(v) Sort(v), v.erase(unique(v.begin(),v.end()),v.end()) #define cover(a,d) memset(a,d,sizeof(a)) using namespace std; int main() { int t,no=0; sc("%d",&t); while(t--) { long long n,a[600]; sc("%lld",&n); a[1]=2; a[2]=3; for(int i=3;i<=n;i++) { a[i]=a[i-1]+a[i-2]; } pf("Scenario #%d:\n%lld\n\n",++no,a[n]); } return 0; } https://github.com/Shipu/OnlineJudgeProblemSolutionWithCPlusPlus/tree/master/uva/10450/10450.cpp Tags UVA Competitive Programming Shipu Ahamed Recommended for you UVA UVA 913 - Joana and the Odd Numbers 4 years ago • 1 min read UVA UVA 871 - Counting Cells in a Blob 4 years ago • 3 min read UVA UVA 866 - Intersecting Line Segments 4 years ago • 3 min read