Submission #753759

# Submission time Handle Problem Language Result Execution time Memory
753759 2023-06-06T00:38:53 Z vjudge1 Carnival (CEOI14_carnival) C++17
0 / 100
1 ms 208 KB
#include<bits/stdc++.h>

#define MaxN 100005

using namespace std;


int n;
/*
vector<int> cLis[MaxN];
int ans[MaxN]; */


int main() {
    int t;
    scanf("%d", &n);
    printf("2 1 2\n");
    scanf("%d", &t);
    for(int i = 1; i <= n; ++i) printf("%d ", i);
    printf("\n");


    /*
    for(int c = 1; c <= n; ++c) cLis[c].clear();
    for(int i = 1; i <= n; ++i) ans[i] = -1;


    int cnt = 1;
    cLis[1].push_back(1);
    ans[1] = 1;
    for(int i = 2; i <= n; ++i) {
        int lo = 1, hi = cnt, pos = -1;
        while(lo <= hi) {
            int k = 1, mi = (lo+hi)/2;
            printf("%d %d ", mi-lo+1 + 1, i);
            for(int c = lo; c <= mi; ++c) printf("%d ", cLis[c][0]);
            printf("\n");
            scanf("%d", &k);
            if (k > mi-lo+1) {
                lo = mi+1;
            }
            else {
                pos = mi;
                hi = mi-1;
            }
        }
        if (pos == -1) {
            ++cnt;
            cLis[cnt].push_back(i);
            ans[i] = cnt;
        }
        else {
            cLis[pos].push_back(i);
            ans[i] = pos;
        }
    }


    printf("0 ");
    for(int i = 1; i <= n; ++i) printf("%d ", ans[i]);
    printf("\n");
    */


    return 0;
}

Compilation message

carnival.cpp: In function 'int main()':
carnival.cpp:16:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   16 |     scanf("%d", &n);
      |     ~~~~~^~~~~~~~~~
carnival.cpp:18:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   18 |     scanf("%d", &t);
      |     ~~~~~^~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1 ms 208 KB Time limit exceeded (wall clock)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 0 ms 208 KB Time limit exceeded (wall clock)
2 Halted 0 ms 0 KB -