Codevs Ladder Bronze

Source: Internet
Author: User
Tags cmath

Some water problems.

T1201:

#include <cstdio>intmin=0x7fffffff, max=-0x7fffffff;intN,i,a;intMain () {scanf ("%d",&n); for(i=1; i<=n;i++) {scanf ("%d",&a);if(A>max) max=A;if(a<min) min=A;} printf ("%d%d\n", Min,max);}
View Code

T1202:

#include <cstdio>intsum=0;intN,i,a;intMain () {scanf ("%d",&n); for(i=1; i<=n;i++) {scanf ("%d",&a); Sum+=A;} printf ("%d\n", sum);}
View Code

T1203:

#include <iostream>#include<cmath>using namespacestd;Const Doublee=1e-8;intMain () {DoubleA, b;cin>> a >>b;if((a-e<=b&&b<=a+e) | | (b-e<=a&&a<=b+e)) cout<<"Yes";Elsecout<<"No";}
View Code

T1206:

#include <cstdio>double  A; int Main () {scanf ("%lf",&a);p rintf ("%.2lf\n " , a);}
View Code

T2235:

#include <iostream><cmath>usingnamespace  std; int Main () {double>> a >> b; int Ten 5  intten) << Endl;}
View Code

T1204:

 #include <cstdio> #include  <cstring>  #include  <iostream>using  namespace   Std;  int   I;  string   s,x;  int   Main () { int  tot= 0  ;cin  >>s>>x;cout  << S.find (x) +1  << \n   ;}  
View Code

T1205:

#include <cstdio>#include<cstring>#include<iostream>using namespacestd;inti;strings[10001];intMain () {inttot=0; while(cin>>s[++tot]); for(i=tot-1; i>=1; i--) cout<<s[i]<<" "; cout<<"\ n";}
View Code

Codevs Ladder Bronze

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.