Codeforces #285 solution report A. B .C

Source: Internet
Author: User
Tags acos

Codeforces #285 solution report A. B .C

A-Contest

Question.

Just calculate the scores of the two people based on the requirements.

The Code is as follows:

# Include
 
  
# Include
  
   
# Include
   
    
# Include
    
     
# Include
     
      
# Include
      # Include
       
         # Include
        
          Using namespace std; # define LL _ int64 # define pi acos (-1.0) const int mod = 100000000; const int INF = 0x3f3f3f; const double eqs = 1e-8; int main () {int a, B, c, d, ans1, ans2; scanf ("% d", & a, & B, & c, & d ); ans1 = max (3 * a/10, a-a/250 * c); ans2 = max (3 * B/10, B-B/250 * d ); // printf ("% d \ n", ans1, ans2); if (ans1> ans2) puts ("Misha"); else if (ans1
         
B- Misha and Changing Handles

Search for each input and replace it with a matching condition.

The Code is as follows:

# Include
          
           
# Include
           
            
# Include
            
             
# Include
             
              
# Include
              
               
# Include
               # Include
                
                  # Include
                 
                   Using namespace std; # define LL _ int64 # define pi acos (-1.0) const int mod = 100000000; const int INF = 0x3f3f3f; const double eqs = 1e-8; map
                  
                    Q; struct node {char s1 [30], s2 [30];} fei [2000]; int main () {int n, I, j, cnt = 0, flag; char st1 [30], st2 [30]; scanf ("% d", & n); for (I = 0; I
                   
                    
C- Misha and Forest

From the leaf node, delete the node and search for it. Because the difference or sum of a leaf node is another parent node of the leaf node.

The Code is as follows:

# Include
                     
                      
# Include
                      
                       
# Include
                       
                        
# Include
                        
                         
# Include
                         
                          
# Include
                          # Include
                           
                             # Include
                            
                              Using namespace std; # define LL _ int64 # define pi acos (-1.0) const int mod = 100000000; const int INF = 0x3f3f3f; const double eqs = 1e-8; struct node {int d, x;} fei [1 <17]; struct N {int u, v;} edge [1 <17]; queue
                             
                               Q; int main () {int n, I, j, d, x, cnt = 0, u, v; scanf ("% d", & n ); for (I = 0; I
                              
                               
The remaining two questions need to be updated ..

Related Article

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.