Submission #64066

# Submission time Handle Problem Language Result Execution time Memory
64066 2018-08-03T09:51:46 Z Just_Solve_The_Problem Zalmoxis (BOI18_zalmoxis) C++17
0 / 100
337 ms 8440 KB
#include <bits/stdc++.h>

using namespace std;

#define ll long long

const int N = (int)1e6 + 7;
const int inf = (int)1e9 + 7;

int n, k;
ll a[N];
map < ll, int > cnt;
int table[21][N];
int numlog[N];

void build() {
  for (int i = 2; i < N; i++) {
    numlog[i] = numlog[i / 2] + 1;
  }
  for (int i = 0; i <= 20; i++) {
    for (int j = 1; j <= n; j++) {
      if (!i) {
        table[i][j] = a[j];
      } else {
        table[i][j] = min(table[i - 1][j], table[i - 1][min(j + (1 << (i - 1)), n)]);
      }
    }
  }
}

int getmin(int l, int r) {
  int lg = numlog[r - l + 1];
  return min(table[lg][l], table[lg][r - (1 << lg) + 1]);
}

main() {
  scanf("%d %d", &n, &k);
  ll mn = (ll)1e18;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    assert(a[i] <= (int)1e6);
    mn = min(mn, a[i]);
    cnt[a[i]]++;
  }
  return 0;
  int in;
  ll cur = -1;
  while (1) {
    if (cnt[mn] & 1) {
      cur = mn;
      break;
    }
    cnt[mn + 1] += cnt[mn] / 2;
    cnt[mn] = 0;
    mn++;
  }

}

Compilation message

zalmoxis.cpp:36:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
 main() {
      ^
zalmoxis.cpp: In function 'int main()':
zalmoxis.cpp:46:7: warning: unused variable 'in' [-Wunused-variable]
   int in;
       ^~
zalmoxis.cpp:47:6: warning: variable 'cur' set but not used [-Wunused-but-set-variable]
   ll cur = -1;
      ^~~
zalmoxis.cpp:37:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d %d", &n, &k);
   ~~~~~^~~~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 263 ms 8056 KB Unexpected end of file - int32 expected
2 Incorrect 228 ms 8188 KB Unexpected end of file - int32 expected
3 Incorrect 262 ms 8276 KB Unexpected end of file - int32 expected
4 Incorrect 256 ms 8284 KB Unexpected end of file - int32 expected
5 Incorrect 208 ms 8424 KB Unexpected end of file - int32 expected
6 Incorrect 209 ms 8424 KB Unexpected end of file - int32 expected
# Verdict Execution time Memory Grader output
1 Incorrect 222 ms 8424 KB Unexpected end of file - int32 expected
2 Incorrect 277 ms 8424 KB Unexpected end of file - int32 expected
3 Incorrect 204 ms 8424 KB Unexpected end of file - int32 expected
4 Incorrect 269 ms 8424 KB Unexpected end of file - int32 expected
5 Incorrect 337 ms 8440 KB Unexpected end of file - int32 expected
6 Incorrect 317 ms 8440 KB Unexpected end of file - int32 expected
7 Incorrect 215 ms 8440 KB Unexpected end of file - int32 expected
8 Incorrect 253 ms 8440 KB Unexpected end of file - int32 expected
9 Incorrect 220 ms 8440 KB Unexpected end of file - int32 expected
10 Incorrect 80 ms 8440 KB Unexpected end of file - int32 expected
11 Incorrect 177 ms 8440 KB Unexpected end of file - int32 expected
12 Incorrect 2 ms 8440 KB Unexpected end of file - int32 expected
13 Incorrect 2 ms 8440 KB Unexpected end of file - int32 expected
14 Incorrect 2 ms 8440 KB Unexpected end of file - int32 expected