Submission #717393

# Submission time Handle Problem Language Result Execution time Memory
717393 2023-04-01T22:16:16 Z vjudge1 Table Tennis (info1cup20_tabletennis) C++
9 / 100
27 ms 2376 KB
#include <bits/stdc++.h>
#define ll long long
#define endl '\n'
using namespace std;
// made by Jassar Alqahtani

int main()
{
    ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int n,k;
    cin >> n >> k;
    int a[n + 1];
    for (int i=0; n>=i; i++)
    {
        cin >> a[i];
    }
    sort(a , a + n + 1);
    for (int i=1; n>=i; i++)
    {
        int u = a[1] + a[n];
        bool f = 0;
        for (int j=1; n/2>=j; j++)
        {
            if (u != a[j] + a[n - j - 1])
            {
                f = 1;
                break;
            }
        }
        if (f == 0)
            break;
        else
            swap(a[i] , a[0]);
    }
    for (int i=1; n>=i; i++)
    {
        cout << a[i];
        if (i == n)
            cout << endl;
        else
            cout << " ";
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 340 KB Output does not have symmetry property
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 468 KB Output does not have symmetry property
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 26 ms 2292 KB Output does not have symmetry property
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 272 KB Output does not have symmetry property
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Incorrect 1 ms 340 KB Output does not have symmetry property
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 26 ms 2376 KB Output does not have symmetry property
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 27 ms 2304 KB Output does not have symmetry property
3 Halted 0 ms 0 KB -