12 条题解

  • 3
    @ 2022-10-7 19:10:11
    #include<bits/stdc++.h> 
    using namespace std;
    int main(){
    	int x,y;
        cin>>x>>y;
        if(x>=-1&&x<=1&&y>=-1&&y<=1){
    	    cout<<"yes";
        }else{
    	    cout<<"no";
        }
    }
    
    • 1
      @ 2025-12-6 20:01:33
      using namespace std;
      int main()
      {
      	short x , y;
      	cin >> x >> y;
      	(x <= 1 && x >= -1 && y <= 1 && y >= -1)?(cout << "yes"):(cout << "no");
      	return 0;
      }
      

      全新的思路,最大化节省内存

      • 1
        @ 2025-7-30 14:30:59

        干货!可即刻复制,包AC!

        #include <iostream>
        using namespace std;
        int main()
        {
        	int px,py;
        	cin >> px >> py;
        	if (-1 <= px && px <= 1 && -1 <= py && py <= 1)
        		cout << "yes";
        	else
        		cout << "no";
        	
            return 0;
        }
        
        • 0
          @ 2025-4-13 12:02:06

          #include <bits/stdc++.h> using namespace std; int main() { int x,y; cin>>x>>y; if(x <= 1 && x >= -1 && y >= -1 && y <= 1) { cout <<"yes"; } else { cout <<"no"; } }

          • -1
            @ 2023-4-4 21:44:20

            #include<bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; if(a>=-1&&a<=1&&b>=-1&&b<=1) cout<<"yes"; else cout<<"no"; return 0; }

            • -1
              @ 2023-2-25 9:25:51

              *#include#include使用命名空间 std;int main(){int a;辛>>A;if(sqrt(a)*sqrt(a)==a){cout<<(sqrt)(a);}else{cout<<“No,Chen”;}返回 0;

              } *

              • -1
                @ 2023-2-25 9:24:09

                #include #include #include using namespace std; int main(){ int w; cin>>w; if(sqrt(w)*sqrt(w)==w){ cout <<sqrt(w); }else{ cout <<"No,Chen"; }

                return 0;
                

                }

                • -3
                  @ 2024-5-26 20:53:10

                  //禁止复制 #include using namespace std; int main(){ int x,y; cin>>x>>y; if(x>=-1&&x<=1&&y>=-1&&y<=1){ cout<<"yes"; }else{ cout<<"no"; } }

                  • -6
                    @ 2022-7-2 19:39:25

                    #include<stdio.h> #include using namespace std; int main() { int a,b; cin>>a>>b; if((a0&&b1)||(a0&&b-1)||(a0&&b0)) { cout<<"yes"<<endl; }else if((a1&&b1)||(a1&&b-1)||(a1&&b0)) { cout<<"yes"<<endl; }else if((a==-1&&b1)||(a-1&&b==-1)||(a==-1&&b==0)) { cout<<"yes"<<endl; }else { cout<<"no"<<endl; } }

                    • -6
                      @ 2022-3-30 20:53:59

                      #include

                      using namespace std;

                      int main(){

                      int x,y;
                      
                      cin>>x>>y;
                      
                      if(x>=-1&&x<=1&&y>=-1&&y<=1){
                      
                      	cout<<"yes";
                      
                      }else{
                      
                      
                      	cout<<"no";
                      
                      }
                      

                      }

                      • -6
                        @ 2022-1-23 13:44:04
                        #include <iostream>
                        using namespace std;
                        int main(){
                            int x,y;
                            scanf("%d%d",&x,&y);
                            if(x <= 1 && x >= -1 && y >= -1 && y <= 1)
                                cout<<"yes"<<endl;
                            else
                                cout<<"no"<<endl;
                            return 0;
                        }
                        • -7
                          @ 2022-1-3 10:39:27
                          #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 x,y;
                          	cin>>x>>y;
                          	if(x <= 1 && x >= -1 && y >= -1 && y <= 1)
                          	{
                          		cout <<"yes";
                          	}
                          	else 
                          	{
                          		cout <<"no";
                          	}
                          }	
                          
                          • 1

                          信息

                          ID
                          855
                          时间
                          1000ms
                          内存
                          128MiB
                          难度
                          3
                          标签
                          递交数
                          540
                          已通过
                          305
                          上传者