8 条题解

  • 2
    @ 2024-7-17 11:35:56

    #include<bits/stdc++.h> using namespace std; int man(){ int a,s,d; cin>>a; s=(a/4)+(a%4/2); d=a/2; cout<<s<<" "<<d; return 0; }

  • 1
    @ 2024-7-18 14:19:23
    
    

    #include<bits/stdc++.h> using namespace std; int main(){ int a,minn =32768 ,maxn = -1; cin>>a; for(int i= 0;i<a;i++){ for(int j = 0;j<a;j++){ if(4i+j2==a){ if(i+j>maxn) maxn = i+j; if(i+j<minn) minn = i+j; } } } if(minn ==32768 or maxn == -1) cout<<0<<" "<<0; else cout<<minn <<" "<<maxn;

    return 0;
    

    }

    • 1
      @ 2024-7-17 14:52:44

      • 0
        @ 2024-7-18 14:25:31
        
        ```#include<bits/stdc++.h>
        using namespace std;
        int main(){
        	int a,minn =32768 ,maxn = -1;
        	cin>>a;
        	for(int i= 0;i<a;i++){
        		for(int j = 0;j<a;j++){
        			if(4*i+j*2==a){
        				if(i+j>maxn) maxn = i+j;
        				if(i+j<minn) minn = i+j;
        			}
        		}
        	}
        	if(minn ==32768 or maxn == -1) cout<<0<<" "<<0;
        	else cout<<minn <<" "<<maxn;
        	
        	return 0;
        }
        • -1
          @ 2024-7-18 11:56:28

          #include<bits/stdc++.h> using namespace std; int main(){ int a,minn=32768,maxn=0; cin>>a; for(int i = 0;i<=a;i++){ for(int j = 0;j<=a;j++){ if(i4+2j == a){ if(i+j>maxn){ maxn=i+j; } if(i+j<minn){ minn=i+j; } } } } if(minn32768 or maxn0){ cout<<0<<" "<<0; }else{ cout<<minn<<" "<<maxn; } return 0;
          }

          • -2
            @ 2024-7-17 14:59:42

            #include<bits/stdc++.h> using namespace std; int main(){ int i,j,maxn=-1,minn=32768; long long a; cin>>a; for(i=0;i<a;i++){ for(j=0;j<a;j++){ if(i4+j2==a){ if(i+j<minn) minn=i+j; if(i+j>maxn) maxn=i+j;

            		}
            	}
            	
            }
            
            if(maxn==-1 or minn==32768) cout<<"0"<<" "<<"0";
            else cout<<minn<<" "<<maxn;
            return 0;
            

            }

            • -5
              @ 2024-7-17 11:50:34
              
              ```include<bits/stdc++.h> 
               using namespace std;
               int main(){
                   int x,y; 
                   cin>>x>>y;
                   int ji,tu;
                   ji=(4*x-y)/2; 
                   tu=x-ji; 
                   cout<<ji<<" "<<tu; 
                   return 0;
              
              • 1

              信息

              ID
              789
              时间
              1000ms
              内存
              64MiB
              难度
              7
              标签
              递交数
              404
              已通过
              101
              上传者