Submission #689795

# Submission time Handle Problem Language Result Execution time Memory
689795 2023-01-29T11:39:57 Z IUA_Hasin Just Long Neckties (JOI20_ho_t1) C++17
0 / 100
0 ms 212 KB
#include <bits/stdc++.h>
 
#define endl                                "\n"
#define finp                                for(int i=0; i<n; i++)
#define fknp                                for(int k=0; k<n; k++)                          
#define yeap                                cout<<"YES"<<endl
#define nope                                cout<<"NO"<<endl
#define inpintn                             int n; cin>>n
#define inpintarrn                          int arr[n]; for(int i=0; i<n; i++){cin>>arr[i];}
#define inpllarrn                           long long arr[n]; for(int i=0; i<n; i++){cin>>arr[i];}                              
#define ll                                  long long
 
 
using namespace std;
 
int main ()
{
    int n;
    cin>>n;
    ll z=n+1;
    ll ar[z];
    ll arr[n];
    ll br[n];
    ll brr[n];
    for (int i=0; i<z; i++){
        cin>>ar[i];
    }
    for (int i=0; i<n; i++){
        cin>>arr[i];
    }
    sort (arr, arr+n);

    for (int i=0; i<z; i++){
        for(int k=0; k<n; k++){
                if(k<i){
                    br[k]=ar[k];
                } else if (k>=i && k<n){
                    br[k]=ar[k+1];
                }
                sort (br, br+n);
                for (int k=0; k<n; k++){
                    brr[k]=br[k]-arr[k];
                }
                sort (brr, brr+n);
            }
        cout << brr[n-1] << " ";   
    }
      
    return 0;

}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -