Submission #621781

# Submission time Handle Problem Language Result Execution time Memory
621781 2022-08-04T02:20:03 Z MinaRagy06 Carnival (CEOI14_carnival) C++17
20 / 100
141 ms 260 KB
#include <bits/stdc++.h>
using namespace std;
#define lesgooo ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
// #define endl    '\n'
#define int     long long

int ask(vector<int> a)
{
    cout << a.size() << " ";
    for (auto i : a) cout << i << " ";
    cout << endl;
    int ret;
    cin >> ret;
    return ret;
}
signed main()
{
    lesgooo;
    int n;
    cin >> n;
    int par[n]{};
    for (int i = 0; i < n; i++) par[i] = 1;
    for (int i = 0; i < n; i++) for (int j = i+1; j < n; j++) if (ask({i+1, j+1}) == 2 && par[j] == par[i]) par[j]++;
    cout << "0 ";
    for (int i = 0; i < n; i++) cout << par[i] << " ";
    cout << endl;
    return 0;
}
/*
2 1 2 3 1
*/
# Verdict Execution time Memory Grader output
1 Partially correct 106 ms 208 KB Partially correct
2 Partially correct 47 ms 208 KB Partially correct
3 Partially correct 97 ms 208 KB Partially correct
4 Partially correct 61 ms 208 KB Partially correct
5 Partially correct 118 ms 216 KB Partially correct
6 Partially correct 77 ms 208 KB Partially correct
7 Partially correct 84 ms 208 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 113 ms 208 KB Partially correct
2 Partially correct 113 ms 248 KB Partially correct
3 Partially correct 58 ms 208 KB Partially correct
4 Partially correct 44 ms 208 KB Partially correct
5 Partially correct 93 ms 208 KB Partially correct
6 Partially correct 101 ms 208 KB Partially correct
7 Partially correct 98 ms 208 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 91 ms 208 KB Partially correct
2 Partially correct 86 ms 208 KB Partially correct
3 Partially correct 47 ms 208 KB Partially correct
4 Partially correct 120 ms 208 KB Partially correct
5 Partially correct 127 ms 208 KB Partially correct
6 Partially correct 56 ms 256 KB Partially correct
7 Partially correct 88 ms 208 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 66 ms 208 KB Partially correct
2 Partially correct 134 ms 208 KB Partially correct
3 Partially correct 139 ms 256 KB Partially correct
4 Partially correct 69 ms 208 KB Partially correct
5 Partially correct 112 ms 260 KB Partially correct
6 Partially correct 88 ms 252 KB Partially correct
7 Partially correct 97 ms 208 KB Partially correct
# Verdict Execution time Memory Grader output
1 Partially correct 138 ms 208 KB Partially correct
2 Partially correct 85 ms 208 KB Partially correct
3 Partially correct 110 ms 208 KB Partially correct
4 Partially correct 115 ms 208 KB Partially correct
5 Partially correct 141 ms 208 KB Partially correct
6 Partially correct 116 ms 228 KB Partially correct
7 Partially correct 55 ms 208 KB Partially correct