16 条题解

  • 1
    @ 2023-5-16 22:50:48

    #include<iostream>

    using namespace std;

    int main()

    {

    int a,b;

    cin>>a>>b;

    if(0<=a+b&&a+b<=3)

    {

    cout<<"YES";

    }

    else if(a+b>=3)

    {

    cout<<"NO";

    }

    else

    {

    cout<<"negative";

    }

    return 0;

    }

    • 1
      @ 2022-1-3 11:13:01
      #include <queue>
      #include <math.h>
      #include <stack>
      #include <stdio.h>
      #include <iostream>
      #include <vector>
      #include <iomanip>
      #include <string.h>
      #include <algorithm>
      using namespace std;
      #define LL long long
      const int N = 1e5 + 10;
      const int INF = 0x3f3f3f3f;
      int main()
      {	
      	int a,b;
      	cin>>a>>b;
      	if(a+b>=4)
      	{
      		cout<<"NO";
      	}
      	else if(a+b<0)
      	{
      		cout<<"negative";
      	}
      	else 
      	{
      		cout<<"YES";
      	}
      	return 0;
      }	
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      
    • 0
      @ 2024-10-12 22:25:23

      #include<iostream> using namespace std ; main() { int a,b; cin>>a>>b; if(a+b<=3){ cout<<"YES";} else{ if(a+b>3){ cout<<"NO";} else{ if(a+b<0){ cout<<"negative";} } } }

      • 0
        @ 2024-4-25 21:59:00

        image

        
        
      • -1
        @ 2023-4-21 21:03:02

        #include <iostream> using namespace std; const int INf=0x3f3f3f3f; const int N=2e4+10; int main(){ long long a,b; cin >>a>>b; if(a+b>3) cout <<"NO"; else if(a+b>=0) cout <<"YES"; else cout <<"negative"; return 0; }

        • -1
          @ 2023-4-4 21:47:13

          #include<bits/stdc++.h> using namespace std; int main() { long a,b; cin>>a>>b; if(0<=a+b&&a+b<=3) cout<<"YES"; else if(a+b>=3) cout<<"NO"; else cout<<"negative"; return 0; }

          • -1
            @ 2023-3-15 20:18:56
            #include<iostream>
            using namespace std;
            
            int main()
            {
            int a,b;
            
            cin>>a>>b;
            
            if(0<=a+b&&a+b<=3)
            {
            
            	cout<<"YES";
            
            }
                else{
            
            	if(a+b>=4) {
            
            
            	cout<<"NO";	
            
            	}
            	else
            	{
            		if(a+b<0) 
            		cout<<"negative";
                    return 0; 
            	}	
            
            }
            }
            
            • -1
              @ 2023-3-15 20:18:51
              #include<iostream>
              using namespace std;
              
              int main()
              {
              int a,b;
              
              cin>>a>>b;
              
              if(0<=a+b&&a+b<=3)
              {
              
              	cout<<"YES";
              
              }
                  else{
              
              	if(a+b>=4) {
              
              
              	cout<<"NO";	
              
              	}
              	else
              	{
              		if(a+b<0) 
              		cout<<"negative";
                      return 0; 
              	}	
              
              }
              }
              
              • -1
                @ 2023-3-15 20:06:54

                #include<iostream>

                using namespace std;

                int main(){

                int a,b;
                
                cin>>a>>b;
                
                if(0<=a+b&&a+b<=3){
                
                	cout<<"YES";
                
                }else{
                
                	if(a+b>=4) {
                
                
                	cout<<"NO";	
                
                	}else{
                		if(a+b<0) cout<<"negative";
                
                	}	
                
                }
                

                }

                • -1
                  @ 2022-12-24 16:26:29

                  ``#include <iostream> #include <cstdio> #include <iomanip> #include <cmath> #include <algorithm> #include <cstring> #include <string> #include <stack> #include <queue> #define LL long long using namespace std; const int INF = 0x3f3f3f3f; const int N = 1e5 + 10; int main()` { int a,b; cin >> a >> b; if( a + b >= 0 && a + b <= 3) { cout << "YES"; } else if( a + b >= 4) { cout << "NO"; } else if ( a + b < 0) { cout << "negative"; } return 0; }

                  
                  
                  • -1
                    @ 2022-7-2 22:03:50

                    //陈儒乐//

                    #include <stdio.h>

                    #include <iostream>

                    using namespace std;

                    int main()

                    {

                    int a,b;
                    
                    cin >> a >> b;
                    
                    if(0<=a+b && a+b<=3)
                    
                    {
                    
                        cout << "YES" ;
                    
                    }
                    
                    else if(a+b>=4)
                    
                    {
                    
                        cout << "NO";
                    
                    }
                    
                    else if (a+b<0)
                    
                    {
                    
                        cout << "negative";
                    
                    }
                    

                    }

                    • -1
                      @ 2022-7-2 18:54:40

                      #include<stdio.h> #include<iostream> using namespace std; int main() { int a,b; cin>>a>>b; if(a+b>=0&&a+b<=3) { cout<<"YES"<<endl; }else if(a+b>=4) { cout<<"NO"<<endl; }else { cout<<"negative"<<endl; } }

                      • -1
                        @ 2022-3-30 21:02:19

                        #include<iostream>

                        using namespace std;

                        int main(){

                        int a,b;
                        
                        cin>>a>>b;
                        
                        if(0<=a+b&&a+b<=3){
                        
                        	cout<<"YES";
                        
                        }else{
                        
                        	if(a+b>=4) {
                        
                        
                        	cout<<"NO";	
                        
                        	}else{
                        		if(a+b<0) cout<<"negative";
                        
                        	}	
                        
                        }
                        

                        }

                      • -1

                        int a,b; cin>>a>>b; if(a+b>=4) { cout<<"NO"; } else if(a+b<0) { cout<<"negative"; } else { cout<<"YES"; } return 0; }

                        • -1
                          @ 2022-1-3 11:15:44
                          #include <stdio.h>
                          #include <iostream>
                          using namespace std;
                          int main()
                          {
                          	int a,b;
                          	cin >> a >> b;
                          	if (a+b>=4)
                          	{
                          		cout<<"NO";
                          	}
                          	else if(a+b<0)
                          	{
                          		cout<<"negative";
                          
                          	}
                          	else
                          	{
                          		cout<<"YES";
                          	}
                          	
                          
                          }
                          
                          	
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                          
                        • -4
                          @ 2021-10-19 12:47:28

                          a,b=map(int,input().split()) if a+b>=0 and a+b<=3: print("YES") if a+b>=4: print("NO") if a+b<0: print("negative")

                          • 1

                          信息

                          ID
                          886
                          时间
                          1000ms
                          内存
                          128MiB
                          难度
                          4
                          标签
                          递交数
                          666
                          已通过
                          287
                          上传者